react-native-maps: Error on startup on react-native 0.74 Bridgeless New Architecture
Summary
Hi,
While testing the Bridgeless New Architecture of react-native 0.74 I got the following error (NOBRIDGE) ERROR Error: Exception in HostFunction: <unknown> and the following in Xcode SurfaceRegistryBinding::startSurface failed. Global was not installed..
I have ran the entire installation process step by step and the error starts when I add the following to my Podfile:
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
The following screenshot is directly after the bundle was successful.
If I’m doing something incorrect I wouldn’t know where.
Reproducible sample code
Not necessary. It happens before you can even think about implementing a MapView in the App.
Steps to reproduce
Follow the installation instructions on react-native 0.74 with the Bridgeless New Architecture enabled. Once you’re at the following step the error will show itself.
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
Expected result
I would like to see the app actually start.
Actual result
Crash on startup
React Native Maps Version
1.14.0
What platforms are you seeing the problem on?
iOS (Google Maps)
React Native Version
0.74.0
What version of Expo are you using?
Not using Expo
Device(s)
iPhone 15 Pro (Simulator)
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 27
Commits related to this issue
- Honor `requiresMainQueueSetup` in bridgeless mode for ViewManagers Summary: We [received an issue](https://github.com/react-native-maps/react-native-maps/issues/5042) in OSS where a ViewManager was c... — committed to cipolleschi/react-native by cipolleschi 3 years ago
- Honor `requiresMainQueueSetup` in bridgeless mode for ViewManagers Summary: We [received an issue](https://github.com/react-native-maps/react-native-maps/issues/5042) in OSS where a ViewManager was c... — committed to facebook/react-native by cipolleschi 3 years ago
- Honor `requiresMainQueueSetup` in bridgeless mode for ViewManagers Summary: We [received an issue](https://github.com/react-native-maps/react-native-maps/issues/5042) in OSS where a ViewManager was c... — committed to facebook/react-native by cipolleschi 3 years ago
- Honor `requiresMainQueueSetup` in bridgeless mode for ViewManagers Summary: We [received an issue](https://github.com/react-native-maps/react-native-maps/issues/5042) in OSS where a ViewManager was c... — committed to kosmydel/react-native by cipolleschi 3 years ago
- Honor `requiresMainQueueSetup` in bridgeless mode for ViewManagers Summary: We [received an issue](https://github.com/react-native-maps/react-native-maps/issues/5042) in OSS where a ViewManager was c... — committed to kosmydel/react-native by cipolleschi 3 years ago
Having same issue with 0.77.0
Hey - I’m seeing the same issue with react-native-mmkv, not sure what exactly is causing this.
Having same issue with
"react-native": "^0.78.0",@matt-dalton @mrousavy let’s move the MMKV discussion to the MMKV repo, so we can close this issue for maps.
@mym0404 sure!
Exception BreakpointsconstantsToExportwas raising an exception. At this point, I had few ways to go:[GMSServices openSourceLicenseInfo];line with an empty string => no crashes and no redboxes[GMSService openSourceLicenseInfo];in a try-catch block to see the exceptionWell, I suffered same in 0.74 Bridgeless Android. It means it is just not a issue in iOS only.
But in my project(app) it doesn’t use react-native-maps but mmkv V2 is used(IDK even it is related with MMKV). I need to investigate it further.
Logcat (android)
I had this crash en it was fixed after installing expo-dev-client somehow…
@mateki0 I’ll check when I get home from work. I’ll close the issue when all is working.
@rodrigodiasf1984 there was similar issue in the past opened in react-native repository, maybe you will find something helpful there. If not please open separate issue with your package.json and whole Podfile because I don’t think it’s connected with this one. https://github.com/facebook/react-native/issues/38283
Update: it crashes because with Bridgeless mode this function is called in background. The exception that is raised is
So we need to fix it in React Native. I don’t have a solution right away, but the fix will come.
Sorry for missleading @mHvNG I meant to put there these 3 lines.
But now I saw that it doesn’t change anything. And you are right, there’s a crash. Deleting code from appDelegate helped me because I turned off new arch which you are turning on with pod install command.
Unfortunately I don’t know how to fix it or if we are even able to do it. Maybe @brentvatne or @lukmccall are able to help here?
Edit: It’s happening on clean rn 0.74 project with turned on new arch, so it’s quite easy to reproduce
@mateki0 Sadly I don’t have those booleans… My
AppDelegate.mm:It’s basically the generated
AppDelegate.mmfile from 0.74 plus the code for adding an API key for Google Maps.