question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prebuilt version causes errors on Debian

See original GitHub issue

Goals

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

  1. git clone https://github.com/iotaledger/trinity-wallet && cd trinity-wallet
  2. git checkout feature/realm
  3. yarn && yarn deps:shared && yarn deps:mobile
  4. 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:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rajivshah3commented, Jan 9, 2019

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.

0reactions
rajivshah3commented, Apr 6, 2020

Hi, sorry for not responding to this for a while. I think this is fixed as we’re no longer seeing the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Upgrades from Debian 10 (buster)
Such packages are most likely to cause problems during an upgrade as they may result in file conflicts.
Read more >
DebianInstaller/FAQ - Debian Wiki
If there is a menu entry, but you get errors when you try to boot Windows There could be different reasons for this....
Read more >
gitlab-ci-multi-runner: mk-prebuilt-images.sh fails at install time
Found in version gitlab-ci-multi-runner/1.7.1+dfsg-1 ... There is two problems: 1) the cdebootstrap command is failing.
Read more >
NvidiaGraphicsDrivers - Debian Wiki
Multiple precompiled driver versions are available for Debian ... This is most often caused by the nvidia-driver package updating to a newer ......
Read more >
4. Source packages — Debian Policy Manual v4.6.2.0
Source packages should specify the most recent version number of this policy ... This makes it impossible for someone else to later reconfigure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found