realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.81k stars 577 forks source link

Could not find the Realm binary. #6935

Closed miwara closed 4 days ago

miwara commented 5 days ago

How frequently does the bug occur?

Always

Description

I have updated react-native to 0.76 in my application. When I run android build with react-native set to 0.76, I get the following error

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, js engine: hermes

I accessed the url in this message and saw the following solution.

Afterwards, try and rebuild for Android. If you are still encountering problems, ensure that node_moduels/realm/react-native/android/src/main/jniLibs contains a realm binary for your architecture. If this is missing, try reinstalling the realm npm package.

However, I cannot find the react-native folder under node_moduels/realm/. I deleted node_modules and reinstalled it, but it didn't make any difference.

My node_modules/realm/ looks like this

$ ls node_modules/realm
PrivacyInfo.xcprivacy  RealmJS.podspec        binding                dist                   package.json           react-native.config.js
README.md              bindgen                binding.gyp            index.react-native.js  prebuilds              scripts

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

12.14.0

What services are you using?

Local Database only

Are you using encryption?

-- select --

Platform OS and version(s)

android

Build environment

$ npx react-native info
info Fetching system and libraries information...
System:
  OS: macOS 15.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 114.86 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.12.2
    path: ~/.anyenv/envs/nodenv/versions/20.12.2/bin/node
  Yarn: Not Found
  npm:
    version: 10.5.0
    path: ~/.anyenv/envs/nodenv/versions/20.12.2/bin/npm
  Watchman:
    version: 2024.11.11.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.13.0
    path: ~/.anyenv/envs/rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12550806
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 18.0.2.1
    path: ~/.anyenv/envs/jenv/shims/javac
  Ruby:
    version: 3.1.3
    path: ~/.anyenv/envs/rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 13.6.8
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Cocoapods version

No response

sync-by-unito[bot] commented 5 days ago

➤ PM Bot commented:

Jira ticket: RJS-2923

miwara commented 4 days ago

This issue was resolved below. https://github.com/realm/realm-js/issues/6933#issuecomment-2479451888 Thank you.