Prebuilt version causes errors on Debian
See original GitHub issueGoals
We use jest
to run our tests but one of them fails on our CI, which uses a docker image based on node:8.12-stretch
. This is the error it gives:
FATAL ERROR: v8::FunctionTemplate::SetCallHandler FunctionTemplate already instantiated
1: node::Abort() [/usr/bin/node]
2: 0x8cce9c [/usr/bin/node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/bin/node]
4: v8::FunctionTemplate::SetCallHandler(void (*)(v8::FunctionCallbackInfo<v8::Value> const&), v8::Local<v8::Value>) [/usr/bin/node]
5: 0x7f029f624f68 [/trinity-wallet/src/shared/node_modules/realm/compiled/node-v57_linux_x64/realm.node]
6: 0x8ce6d4 [/usr/bin/node]
7: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/bin/node]
8: 0xb0d64c [/usr/bin/node]
9: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/bin/node]
10: 0xad4a43842fd
Aborted
I can reproduce this by pulling the buildpack-deps:stretch
image, manually installing yarn
, and running the tests again. I saw this thread but I don’t think this issue is specific to ElasticBeanstalk as I’m able to reproduce it locally in a Docker container. I tried rebuilding realm
from source as the thread suggested (npm rebuild realm --build-from-source
) and the tests succeeded. It seems like the prebuilt binary is the one that causes this error.
Expected Results
Test should pass
Actual Results
Fatal error thrown by node
with the stacktrace shown above
Steps to Reproduce
git clone https://github.com/iotaledger/trinity-wallet && cd trinity-wallet
git checkout feature/realm
yarn && yarn deps:shared && yarn deps:mobile
cd src/mobile && yarn test
I’ll try to reproduce this with a smaller project, as cloning our entire codebase is probably not the easiest way to reproduce this
Version of Realm and Tooling
- Realm JS SDK Version:
2.21.0
- Node or React Native: Node
- Client OS & Version:
node:8.12-stretch
or buildpack-deps:stretch - Node version: 8.12.0, can also reproduce on 8.14.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Hi @kneth , sorry about that. I probably should have given instructions so you could reproduce on an inactive branch. We’ve been using
npm rebuild realm —build-from-source
to get around this issue because we needed our tests to pass on the CI. I’ll try to make a sample project that doesn’t include this workaround so that the bug is reproducible.Hi, sorry for not responding to this for a while. I think this is fixed as we’re no longer seeing the issue