Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

unable to use with prebuild for Electron 4 because of ABI incompatibilities #133

Closed
Akumzy opened this issue Oct 11, 2018 · 14 comments
Closed
Assignees
Labels

Comments

@Akumzy
Copy link

Akumzy commented Oct 11, 2018

I just I deleted and re-install my node_modules since then I started getting this error
electron version: 4.0.0@beta.1
system: Ubuntu
v8_natives_data:symbol lookup error: /home/akumzy/node_modules/keytar/build/Release/keytar.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE

@dannyseo517
Copy link

Same with:
keytar: 4.3.0
electron: 3.0.4
node: 10.2.1
npm: 5.6.0

tested with electron-quick-start.

@kerabromsmu
Copy link

I deleted and reinstalled the node_modules, but nothing changed. Electron reports the same error after that

@janis91
Copy link

janis91 commented Jan 7, 2019

Same here.

I can reproduce this error only when using keytar v4.3.0.
With v4.2.1 it is working regardless of the electron version (3 or 4). Node version 10.

Hope this helps.

@bendemboski
Copy link

I can reproduce this error only when using keytar v4.3.0.
With v4.2.1 it is working regardless of the electron version (3 or 4). Node version 10.

I'm pretty sure this is because only 4.3.0 has prebuilt binaries that work with electron 3/4 (ABI version 64). So if you're using 4.2.1, you'll be falling back on building them locally.

So I guess it looks like the problem is not in the source code, but something about how the prebuilt binaries are being built...

@vladimiry
Copy link

Facing a similar issue. Though not just with keytar, but with sodium-native too, possibly with all the native modules that go with prebuilts. I ended up for now forcing removing all the prebuilts and then triggering rebuilding from sources.

@bendemboski
Copy link

I'm pretty sure I've tracked down the cause of this. It's this bug in node-abi that is making prebuild and prebuild-install think that the same binaries can be used for Electron 3 and Electron 4, when in reality the ABI changed between them.

@shiftkey
Copy link
Contributor

shiftkey commented Jan 9, 2019

@bendemboski thanks for digging into this. I'll keep an eye on electron/node-abi#55.

@shiftkey shiftkey changed the title v8_natives_data:symbol lookup error keytar.node:undefined symbol unable to build for Electron 4 because of ABI incompatibilities Jan 21, 2019
@shiftkey shiftkey changed the title unable to build for Electron 4 because of ABI incompatibilities unable to use with prebuild for Electron 4 because of ABI incompatibilities Jan 21, 2019
@shiftkey
Copy link
Contributor

While we're blocked on Electron getting it's own Node ABI version for the 4.x series, the 4.3.2 release has a workaround that ensures prebuild-install is not attempted for Electron 4.x builds.

Please try it out and see if this makes your lives easier.

@shiftkey
Copy link
Contributor

shiftkey commented Feb 2, 2019

The Electron team just opened electron/electron#16687 which will change the ABI version for the 4.0.x series to 69 (rather than 64). Once that makes it into a stable release we can refine the patch in #154 to only catch matches to the old (incorrect) ABI version.

@shiftkey
Copy link
Contributor

shiftkey commented Feb 5, 2019

This has taken a while for all the upstream pieces to be resolved, but the two last PRs I've opened today should close this out:

Upgrading to the latest 4.x release should get you back to a happy place once those are released.

@adeperio
Copy link

Hi @shiftkey looking forward to the new keytar prebuilds. Currently I am unable to build a windows build on mac with electron 4.0.4 and I suspect a new update to the keytar prebuilds might help

@bendemboski
Copy link

@adeperio the v4.4.0 release has the latest prebuild-install and electron-v69 binaries, and should work fine for you with electron >= 4.0.4 -- I'm using it with 4.0.4 and it's working fine for me.

@BitForger
Copy link

BitForger commented Apr 24, 2019

Experiencing this issue with keytar@4.5.0 node@10.11 electron@4.1.4. It's been the reported error or

Error: The module '<path-to-project>/node_modules/keytar/build/Release/keytar.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 69. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing

When I rebuild like directed in posts it results in the error thrown in #134 and I causes the app to crash. Suggestions?

@BitForger
Copy link

Experiencing this issue with keytar@4.5.0 node@10.11 electron@4.1.4. It's been the reported error or

Error: The module '<path-to-project>/node_modules/keytar/build/Release/keytar.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 69. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing

When I rebuild like directed in posts it results in the error thrown in #134 and I causes the app to crash. Suggestions?

Resolved this by following the steps in #134 (comment) and rolling electron version back to ^4.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants