Linking failure in asm.js: Unexpected stdlib member #1227
-
(node:8760) V8: /home/zelos/Desktop/Kedi/kedichat/chat/node_modules/openpgp/dist/openpgp.js:2491 Linking failure in asm.js: Unexpected stdlib member I get this error every time I use openpgp |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 2 replies
-
Hello, could you please include node version, openpgp version, and a way to replicate this bug? It does not happen on other systems. |
Beta Was this translation helpful? Give feedback.
-
From the error message, it sounds like this could happen if you're extending a built-in object (of the standard library) with a new function or property (member). Are you (or a package you're importing) writing anything to In particular, the global object that's passed to the asm function at that line is console.log(Uint8Array.toString());
console.log(Object.getOwnPropertyDescriptors(Uint8Array.prototype)); and post the output here? |
Beta Was this translation helpful? Give feedback.
-
Let me know if you still have this issue. |
Beta Was this translation helpful? Give feedback.
-
I'm seeing this too:
|
Beta Was this translation helpful? Give feedback.
-
Hey @dan-turner 👋 Thanks! That looks perfectly normal. I'm assuming you're using OpenPGP.js in a larger Node.js project, though? Could you run the same two If you still get the same result, could you try to create a minimal reproducible example? For what it's worth, openpgp works fine for me in that version of Node:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Getting this exact error ( $ node --version
v14.11.0 console.log(Uint8Array.toString());
console.log(Object.getOwnPropertyDescriptors(Uint8Array.prototype)); yields:
Also the repl test works fine:
|
Beta Was this translation helpful? Give feedback.
-
Hey 👋 If it works in the REPL but not in your application, then my best guess is that there's something about the environment you're running the application in that makes the globals different from the expected ones. E.g. just a wild guess but are you using Jest? The issue could be jestjs/jest#2549. Alternatively, maybe there's another dependency of your application that's messing with the globals, or somehow interacting badly with OpenPGP.js? |
Beta Was this translation helpful? Give feedback.
-
I tried using |
Beta Was this translation helpful? Give feedback.
-
Still occurring. The tests do pass but still results in the warning. This is the output when running with the suggest
|
Beta Was this translation helpful? Give feedback.
Hey 👋 If it works in the REPL but not in your application, then my best guess is that there's something about the environment you're running the application in that makes the globals different from the expected ones. E.g. just a wild guess but are you using Jest? The issue could be jestjs/jest#2549.
Alternatively, maybe there's another dependency of your application that's messing with the globals, or somehow interacting badly with OpenPGP.js?