realm / realm-js

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

Error installing in React Native project (sync archive missing from S3) #3551

Closed voidrender closed 3 years ago

voidrender commented 3 years ago

Goals

Attempting to install realm from npm in a React Native app.

Expected Results

Realm should install successfully.

Actual Results

Realm fails to install sync dependencies. It looks like https://static.realm.io/downloads/sync/realm-sync-node-cocoa-10.1.5.tar.gz is missing from S3.

> realm@10.1.2 install /Users/vagrant/git/node_modules/realm
> node-pre-gyp install --fallback-to-build -j 8 ${npm_config_arch:+--target_arch=${npm_config_arch}}
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for realm@10.1.2 and node@12.19.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error connect ETIMEDOUT 52.216.142.235:443 
  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  TOUCH Release/obj.target/OpenSSL.stamp
  ACTION binding_gyp_vendored_realm_target_download_realm /Users/vagrant/git/node_modules/realm/vendor/realm-mac-x64
  TOUCH Release/obj.target/scripts.stamp
  LIBTOOL-STATIC Release/nothing.a
Resolved requirements: {
  SYNC_SERVER_FOLDER: 'sync',
  SYNC_ARCHIVE: 'realm-sync-node-cocoa-10.1.5.tar.gz',
  SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-10.1.5'
}
Resolved options: { platform: 'mac', sync: true, arch: 'x64' }
No lockfile found at the target /Users/vagrant/git/node_modules/realm/vendor/realm-mac-x64, proceeding.
Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-10.1.5.tar.gz
warning: /Applications/Xcode-12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
FetchError: request to https://static.realm.io/downloads/sync/realm-sync-node-cocoa-10.1.5.tar.gz failed, reason: connect ETIMEDOUT 52.217.71.147:443
    at ClientRequest.<anonymous> (/Users/vagrant/git/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT'
}
make: *** [/Users/vagrant/git/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/Cellar/node@12/12.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/Cellar/node@12/12.19.1/bin/node" "/usr/local/Cellar/node@12/12.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--jobs=8" "--module=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64/realm.node" "--module_name=realm" "--module_path=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=4" "--node_napi_label=napi-v4"
gyp ERR! cwd /Users/vagrant/git/node_modules/realm
gyp ERR! node -v v12.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node@12/12.19.1/bin/node /usr/local/Cellar/node@12/12.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --jobs=8 --module=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64/realm.node --module_name=realm --module_path=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=4 --node_napi_label=napi-v4' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/vagrant/git/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node@12/12.19.1/bin/node" "/Users/vagrant/git/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "-j" "8"
node-pre-gyp ERR! cwd /Users/vagrant/git/node_modules/realm
node-pre-gyp ERR! node -v v12.19.1
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node@12/12.19.1/bin/node /usr/local/Cellar/node@12/12.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --jobs=8 --module=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64/realm.node --module_name=realm --module_path=/Users/vagrant/git/node_modules/realm/compiled/napi-v4_darwin_x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=4 --node_napi_label=napi-v4' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm@10.1.2 install: `node-pre-gyp install --fallback-to-build -j 8 ${npm_config_arch:+--target_arch=${npm_config_arch}}`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the realm@10.1.2 install script.## Steps to Reproduce

Code Sample

Version of Realm and Tooling

voidrender commented 3 years ago

Could be that an SSL cert expired? https://github.com/realm/realm-js/issues/2719

voidrender commented 3 years ago

It looks like this has been fixed.