realm-js
realm-js copied to clipboard
The "bundle install & & RCT_NEW_ARCH_ENABLED=1 bundle exec pod install" command results in the error "Could not find the Realm binary."
How frequently does the bug occur?
Always
Description
Enabling the new architecture of "react native" will result in an error, and if not enabled, no error will occur.
Stacktrace & log output
(NOBRIDGE) ERROR Error: Could not find the Realm binary. Please consult our troubleshooting guide: https://www.mongodb.com/docs/realm-sdks/js/latest/#md:troubleshooting-missing-binary
at TestScreen (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:143169:41)
at StaticContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:137779:17)
at EnsureSingleNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:133551:24)
at SceneView (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:137684:22)
at RCTView
at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:63054:43)
at DebugContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:139600:36)
at MaybeNestedStack (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:132109:23)
at RCTView
at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:63054:43)
at RNSScreen
at Animated(Anonymous) (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:80091:62)
at Suspender (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142171:22)
at Suspense
at Freeze (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142181:23)
at DelayedFreeze (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142135:22)
at InnerScreen (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:141955:36)
at Screen (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142097:36)
at SceneView (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:132153:22)
at Suspender (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142171:22)
at Suspense
at Freeze (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142181:23)
at DelayedFreeze (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142135:22)
at RNSScreenStack
at ScreenStack (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:142462:25)
at NativeStackViewInner (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:132351:22)
at RNCSafeAreaProvider
at SafeAreaProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:140499:24)
at SafeAreaProviderCompat (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:141276:24)
at NativeStackView
at PreventRemoveProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:136643:25)
at NavigationContent (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:137470:22)
at anonymous (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:137486:27)
at NativeStackNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:132042:18)
at EnsureSingleNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:133551:24)
at BaseNavigationContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:133147:28)
at ThemeProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:138999:21)
at NavigationContainerInner (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:138887:26)
at App
at RCTView
at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:63054:43)
at RCTView
at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:63054:43)
at AppContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:62927:25)
at react_native_sample_app(RootComponent) (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.service.apps.rnsample:116986:28)
Can you reproduce the bug?
Always
Reproduction Steps
- How to reproduce for errors
- Run the git clone
git clone https://github.com/wisdomstar94/react_native_sample_app.git
- Move Terminal to Cloned Project
cd react_native_sample_app
- checkout branch
git checkout realmjs-issue
- npm install
npm i
- Move to the terminal folder
cd ./ios
- Run the pod install command as shown below to activate the new architecture of "react native"
bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
(Source of the above command : https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-apps.md#enable-new-architecture-for-ios) - When the ios emulator is ready, run the ios app using the command below.
npm run ios
- When the app is installed in the emulator, the following error is displayed after a while.
- Without a new architecture, errors will not occur.
-
pod install
-
npm run ios
Version
12.7.1
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Mac M1 14.4.1
Build environment
Which debugger for React Native: ..
Cocoapods version
No response
➤ PM Bot commented:
Jira ticket: RJS-2811
I think I need to check it again, so I'll close the issue for now.
Fixed the error reproduction process. Reopen the issue.
Thanks for creating the issue. We do test with the new arch enabled: https://github.com/realm/realm-js/blob/a5e797c802a971bdd1112b95ef8be215186c1f9b/integration-tests/environments/react-native-test-app/package.json#L105-L108
I've just rebased my branch upgrading our test app to 0.74.0 🤞 https://github.com/realm/realm-js/pull/6636
I'm reproducing https://github.com/react-native-maps/react-native-maps/issues/5042 when running our React Native 0.74.0 branch locally 👀 and the stack doesn't seem related to Realm.
I'm reproducing react-native-maps/react-native-maps#5042 when running our React Native 0.74.0 branch locally 👀 and the stack doesn't seem related to Realm.
@kraenhansen Is my issue related to that issue you mentioned? I feel like that issue has suddenly been mentioned.
Is my issue related to that issue you mentioned?
Not directly, but I wanted to share my progress trying to run our library with RCT_NEW_ARCH_ENABLED=1
and React Native 0.74.0 to share that I'm not even able to get our integration test app to the point that you are.
@kraenhansen
I may have misunderstood it because I'm interpreting it while using a translator, To sum up, what you mean is that the issue I posted may not be a matter of realm?
I think we do have an issue, but I was unable to test it using our integration tests because we use React Native Test App which has an issue https://github.com/microsoft/react-native-test-app/issues/2015.
I'll report back as I learn more.
We don't support bridgeless on iOS and I've created https://github.com/realm/realm-js/issues/6653 to track this 👍
@kraenhansen
Thank you for checking.
For whomever stumbles upon this in the near future, reinstating the bridge helps for iOS See https://github.com/reactwg/react-native-new-architecture/discussions/174 and the "Opting-out of Bridgeless" section