Skip to content
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

The "bundle install & & RCT_NEW_ARCH_ENABLED=1 bundle exec pod install" command results in the error "Could not find the Realm binary." #6640

Open
wisdomstar94 opened this issue Apr 28, 2024 · 12 comments

Comments

@wisdomstar94
Copy link

wisdomstar94 commented Apr 28, 2024

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

  1. Run the git clone
    git clone https://github.com/wisdomstar94/react_native_sample_app.git
  2. Move Terminal to Cloned Project
    cd react_native_sample_app
  3. checkout branch
    git checkout realmjs-issue
  4. npm install
    npm i
  5. Move to the terminal folder
    cd ./ios
  6. 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)
  7. When the ios emulator is ready, run the ios app using the command below.
    npm run ios
  8. When the app is installed in the emulator, the following error is displayed after a while.
    image

- Without a new architecture, errors will not occur.

  1. pod install
  2. npm run ios
    image

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

Copy link

sync-by-unito bot commented Apr 28, 2024

➤ PM Bot commented:

Jira ticket: RJS-2811

@wisdomstar94
Copy link
Author

I think I need to check it again, so I'll close the issue for now.

@wisdomstar94
Copy link
Author

Fixed the error reproduction process. Reopen the issue.

@wisdomstar94 wisdomstar94 reopened this Apr 29, 2024
@kraenhansen
Copy link
Member

Thanks for creating the issue. We do test with the new arch enabled:

"RCT_NEW_ARCH_ENABLED": {
"external": true,
"default": "1"
}

I've just rebased my branch upgrading our test app to 0.74.0 🤞 #6636

@kraenhansen
Copy link
Member

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.

@wisdomstar94
Copy link
Author

wisdomstar94 commented May 3, 2024

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.

@kraenhansen
Copy link
Member

kraenhansen commented May 3, 2024

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.

@wisdomstar94
Copy link
Author

@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?

@kraenhansen
Copy link
Member

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 microsoft/react-native-test-app#2015.

I'll report back as I learn more.

@kraenhansen
Copy link
Member

We don't support bridgeless on iOS and I've created #6653 to track this 👍

@wisdomstar94
Copy link
Author

@kraenhansen

Thank you for checking.

@ArindamRayMukherjee
Copy link

ArindamRayMukherjee commented May 5, 2024

For whomever stumbles upon this in the near future, reinstating the bridge helps for iOS
See reactwg/react-native-new-architecture#174
and the "Opting-out of Bridgeless" section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants