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

Realm JavaScript v2.25.0 with React Native 0.59 error #2281

Closed
edsongoncalves opened this issue Mar 13, 2019 · 25 comments
Closed

Realm JavaScript v2.25.0 with React Native 0.59 error #2281

edsongoncalves opened this issue Mar 13, 2019 · 25 comments
Assignees

Comments

@edsongoncalves
Copy link

edsongoncalves commented Mar 13, 2019

Actual Results

URL not found: https://static.realm.io/node-pre-gyp/2.25.0/realm-v2.25.0-node-v59-darwin-x64.tar.gz

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/2.25.0/realm-v2.25.0-node-v59-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for realm@2.25.0 and node@9.11.1 (node-v59 ABI, unknown) (falling back to source compile with node-gyp)
TOUCH Release/obj.target/OpenSSL.stamp
ACTION binding_gyp_vendored_realm_target_download_realm /Users/edson/projects/reactnative/phrasesv1/node_modules/realm/vendor/realm-mac-x64
internal/modules/cjs/loader.js:550
throw err;
^

Error: Cannot find module 'https-proxy-agent'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object. (/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/scripts/download-realm.js:25:25)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
make: *** [/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/vendor/realm-mac-x64] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/9.11.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node" "--module_name=realm" "--module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v59"
gyp ERR! cwd /Users/edson/projects/reactnative/phrasesv1/node_modules/realm
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/9.11.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node --module_name=realm --module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/edson/projects/reactnative/phrasesv1/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/9.11.1/bin/node" "/Users/edson/projects/reactnative/phrasesv1/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/edson/projects/reactnative/phrasesv1/node_modules/realm
node-pre-gyp ERR! node -v v9.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/9.11.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node --module_name=realm --module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)
npm WARN jest-resolve@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-resolve-dependencies@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-snapshot@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-gesture-handler@1.1.0 requires a peer of react-native-web@>= 0.7 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm@2.25.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm@2.25.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to Reproduce

npm i realm

@radeno
Copy link

radeno commented Mar 13, 2019

#2259

@cmelchior
Copy link
Contributor

RealmJS doesn't work with React Native 0.59 just yet. It seems there are underlying breaking changes we need to fix first.

@radeno
Copy link

radeno commented Mar 13, 2019

@cmelchior we have migrated to 0.59 yesterday for internal testing. But RealmJS works.

@cmelchior
Copy link
Contributor

Hmm, interesting. I was trying to upgrade our repo to 0.59 and ran into a bunch of issues doing it.

@radeno
Copy link

radeno commented Mar 13, 2019

@cmelchior hmm. iOS works normally for us at first run.
But we have done some changes for build.gradle file. Removing support for 64bit platforms what doesn't work from RN0.58 for arm64 (RN0.59 brings support for x86_64).

EDIT: Removed information about compileSdkVersion.

@radeno
Copy link

radeno commented Mar 13, 2019

@ferrannp
Copy link

ferrannp commented Mar 13, 2019

So this is the thing, if you have (from react-native 0.59.1 template) in your app/build.gradle:

include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]

The app will crash because Realm does not support 64 bits yet. So till it does, you need to change it back to:

include "armeabi-v7a", "x86"
def versionCodes = ["armeabi-v7a":1, "x86":2]

@fthernan
Copy link

So this is the thing, if you have (from react-native 0.59.1 template) in your app/build.gradle:

include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]

The app will crash because Realm does not support 64 bits yet. So till it does, you need to change it back to:

include "armeabi-v7a", "x86"
def versionCodes = ["armeabi-v7a":1, "x86":2]

Thank you ferrannp! Also, I had to include in app/build.gradle:

android {
    ...
    defaultConfig {
        ...
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
}

@sajsanghvi
Copy link

I keep getting this error on iOS with Realm, RN .59
Exception '-[RCTCxxBridge jsContextRef]: unrecognized selector sent to instance 0x7fc1036004b0' was thrown from JS thread

@badaz
Copy link

badaz commented Mar 24, 2019

Any info on when realmjs will support x64? Will it be before the Google Play Store rejects any non 64 compatible upgrade to apps (august 19)?

@MichaelHuy
Copy link

Any info on when realmjs will support x64? Will it be before the Google Play Store rejects any non 64 compatible upgrade to apps (august 19)?

Hi Realm Core team,
any update on this?

@cmelchior
Copy link
Contributor

The plan is to add support for React Native 0.59 shortly, followed by 64 bit support right after that. I don't have any exact dates though.

@badaz
Copy link

badaz commented Mar 26, 2019

Thanks!

@mkamals
Copy link

mkamals commented Mar 29, 2019

Was happy to have worked with Realm for Native Android but this disappointed me with React Native. I am unable to install the Realm in RN 0.59.x and RN 0.58.x.

@badaz
Copy link

badaz commented Mar 29, 2019

It works in 0.58.x

@Kyniska
Copy link

Kyniska commented Apr 3, 2019

Same problem. Is this the place to look for an update announcement?

@Dhirajbhujbal
Copy link

Hi I just started to use Realm with React Native 0.59 version, have gone through some discussion found that downgrading the version of Realm will work with 0.59, So I downgraded the version of Realm to ^1.0.2 but it's still not working correctly impact it sometimes run sometime not
can anyone please guide what is best version combination for Realm and React Native.

Thanks in advance. also, please suggest me a good article for learning the Realm from scratch

@Kyniska
Copy link

Kyniska commented May 12, 2019

I've been advised RN must be in 0.58, max, with support for 0.59 having no expected support date (thanks people). In honesty, I still haven't gotten the two to work.

@sreeragk1
Copy link

Hi,

Please reply for the following :

  1. Just wanted to clarify whether realm@2.27.0 supports react-native 0.59 version ?

  2. If not, Any expected date for the release of supported realm version?

Is following error is due to realm version compatibility?
Error during npm install realm@2.27.0

node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\node-v9.11.2-win-x64\node.exe C:\Program Files\node-v9.11.2-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files\node-v9.11.2-win-x64\node_modules\realm\compiled\node-v59_win32_x64\realm.node --module_name=realm --module_path=C:\Program Files\node-v9.11.2-win-x64\node_modules\realm\compiled\node-v59_win32_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Program Files\node-v9.11.2-win-x64\node_modules\realm\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\Program Files\node-v9.11.2-win-x64\node.exe" "C:\Program Files\node-v9.11.2-win-x64\node_modules\realm\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Program Files\node-v9.11.2-win-x64\node_modules\realm

@kneth
Copy link
Contributor

kneth commented Jun 12, 2019

@sreeragk1 We don't support node 9 - try either node 8 or node 10.

@bmunkholm
Copy link
Contributor

@kneth Could we check for the node version and give a clear message up front?

@Kyniska
Copy link

Kyniska commented Jun 12, 2019

I haven't seen anytihng about realm connecting with RN0.59 yet and staff haven't given any indication about arrival point. I fought thhrough version recommendation changes for days, then decided to stop wasting time and just wait (Was being reminded of my old days with Windows way too much)

@kneth
Copy link
Contributor

kneth commented Jun 27, 2019

I have successfully been able to create small apps using React Native v0.59 and Realm JS v2.28.1. Older versions of Realm JS might not work but please use a recent version.

@kneth kneth closed this as completed Jun 27, 2019
@haripermadi
Copy link

I keep getting this error on iOS with Realm, RN .59
Exception '-[RCTCxxBridge jsContextRef]: unrecognized selector sent to instance 0x7fc1036004b0' was thrown from JS thread

I also keep getting that error, I used RN 0.59 and realm 2.22.0. Is there any solution?

@kneth
Copy link
Contributor

kneth commented Aug 16, 2019

I recommend that you upgrade. For example, v2.24.0 adds support for RN v0.58, and I have created small test apps using recent version using RN v0.59.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests