New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on startup on react-native 0.74 Bridgeless New Architecture #5042
Comments
Hi, @mHvNG. Can you show me your AppDelegate.mm? I had the same problem and deleting these booleans helped me
|
@mateki0 Sadly I don't have those booleans... My
It's basically the generated |
@mateki0 I did some further testing to get the cause of the error or at least close enough. When I install react-native-maps with yarn and add the following to the
App startup is fine and when using with provider Apple Maps everything works and I can see and interact with the map. However when I add the following to the Podfile I get the error (stated above):
You install the following during a
My personal conclusion would be that it's an error on the Google Maps side of the library. I hope this helps somewhat. |
Thanks for checking @mHvNG. I see one difference between your and ours podfile. Can you try with this code?
I know that it's missing in documentation, but this line pod 'react-native-maps', :path => rn_maps_path was added to our example app 2 months ago so maybe it's needed now and docs should be updated. Here is whole Podfile of example app with RN 0.74: |
@mateki0 By removing this:
And adding this:
I get the following error message:
I tried the |
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 |
Yup, it's not difficult to encounter the crash. I saw that version 1.14.0 brought support for the new architecture, however at the moment it's only working without the It's working fine when I'm working with Apple Maps as the provider. Anyway thanks @mateki0 for trying. |
@mrousavy The error message itself isn't helpful unfortunately. I'm way too busy developing apps for clients to start and contribute open source libraries for RN at the moment, so my understanding of the migration from old to new architecture isn't up-to-date unfortunately. However it's weird that one |
Well, 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 found the issue and it looks like it is this line. By returning an empty string instead of |
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. |
Can you share how to trace log in this issue? It will be a great help for finding our common issues. |
Summary: We [received an issue](react-native-maps/react-native-maps#5042) in OSS where a ViewManager was configured to be initialized on the main queue, but it wasn't. This was creating a soft crash and showing a RedBox to the user. The library was going through the Interop Layer. This change makes sure that, if the ViewManager is configured to be setup in the main queue, we retrieve the constants from the Main Queue ## Changelog [iOS][Fixed] - Extract the constants from ViewManagers in the UI Thread if needed. Differential Revision: D56762253
@mym0404 sure!
|
FWIW I am getting this and don't use react-native-maps. I do use mmkv, and have upgraded to the |
Summary: We [received an issue](react-native-maps/react-native-maps#5042) in OSS where a ViewManager was configured to be initialized on the main queue, but it wasn't. This was creating a soft crash and showing a RedBox to the user. The library was going through the Interop Layer. This change makes sure that, if the ViewManager is configured to be setup in the main queue, we retrieve the constants from the Main Queue ## Changelog [iOS][Fixed] - Extract the constants from ViewManagers in the UI Thread if needed. Reviewed By: sammy-SC Differential Revision: D56762253 fbshipit-source-id: ca807b34d6e61418da9fd6a639a05f3394879f7c
@matt-dalton @mrousavy let's move the MMKV discussion to the MMKV repo, so we can close this issue for maps. |
Summary: We [received an issue](react-native-maps/react-native-maps#5042) in OSS where a ViewManager was configured to be initialized on the main queue, but it wasn't. This was creating a soft crash and showing a RedBox to the user. The library was going through the Interop Layer. This change makes sure that, if the ViewManager is configured to be setup in the main queue, we retrieve the constants from the Main Queue ## Changelog [iOS][Fixed] - Extract the constants from ViewManagers in the UI Thread if needed. Reviewed By: sammy-SC Differential Revision: D56762253 fbshipit-source-id: ca807b34d6e61418da9fd6a639a05f3394879f7c
Summary: We [received an issue](react-native-maps/react-native-maps#5042) in OSS where a ViewManager was configured to be initialized on the main queue, but it wasn't. This was creating a soft crash and showing a RedBox to the user. The library was going through the Interop Layer. This change makes sure that, if the ViewManager is configured to be setup in the main queue, we retrieve the constants from the Main Queue ## Changelog [iOS][Fixed] - Extract the constants from ViewManagers in the UI Thread if needed. Reviewed By: sammy-SC Differential Revision: D56762253 fbshipit-source-id: ca807b34d6e61418da9fd6a639a05f3394879f7c
@mHvNG It works fine for me on 0.74.1. Can you confirm that so we can close the issue? |
@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. |
I saw this issue before, but the error i got ins't the same, their talking about RunLoopObserver my error is different, i will open another issue |
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 XcodeSurfaceRegistryBinding::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
:The following screenshot is directly after the bundle was successful.
If I'm doing something incorrect I wouldn't know where.
Reproducible sample code
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.
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
The text was updated successfully, but these errors were encountered: