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

Could not find realm binary when show react-native component in native iOS app #6803

Open
Mekongoabanda opened this issue Jul 22, 2024 · 1 comment

Comments

@Mekongoabanda
Copy link

Mekongoabanda commented Jul 22, 2024

could not find realm binary

How frequently does the bug occur?

Always

Description

Hello guys, i hope you're well
Has anyone ever had a problem with Realm when they want to use a react-native component in an iOS ViewController?
Error: Could not find real binary
I have already tried several possible solutions (the one proposed in log included). For information:

  • I don't use new arch
  • "@realm/react": "0.8.0",
  • "react": "18.2.0",
  • "react-native": "0.74.1",
  • in native part, i use #import <React/RCTRootView.h> , #import <React/RCTBundleURLProvider.h>

For example, in my index.js i've try to show ModuleEntryPoint.tsx registred like that:
AppRegistry.registerComponent("ModuleEntryPoint", () => ModuleEntryPoint);
When i call it from my native code (Objective-C or Swift).
and I use Realm in ModuleEntryPoint.tsx I have this error, but when I do not use realm my compsant is displayed normally and works well
I need help

Stacktrace & log output

** 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
Error: Unable to resolve module ./node_modules/realm/binding/generated/native.react-native from /Users/../Documents/projectName: 

None of these files exist:
  * node_modules/realm/binding/generated/native.react-native(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * node_modules/realm/binding/generated/native.react-native/index(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:112:15)
    at DependencyGraph.resolveDependency (/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
    at /node_modules/metro/src/lib/transformHelpers.js:156:21
    at Server._resolveRelativePath (/node_modules/metro/src/Server.js:1023:12)
    at async Server._explodedSourceMapForBundleOptions (node_modules/metro/src/Server.js:971:35)
    at async Promise.all (index 0)
    at async Server._symbolicate (/node_modules/metro/src/Server.js:928:26)
    at async Server._processRequest (node_modules/metro/src/Server.js:394:7)

Can you reproduce the bug?

Always

Reproduction Steps

  • Have React project with realm
  • Try to show React component where realm is used in UIViewController in native app
  • launch your native app with Xcode (make sure that metro serveur running on port (8081 by default)

Version

react version 0.74.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

iOS (all versions)

Build environment

Which debugger for React Native: ..

Cocoapods version

1.14.3

Copy link

sync-by-unito bot commented Jul 22, 2024

➤ PM Bot commented:

Jira ticket: RJS-2869

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

1 participant