Open n9lsjr opened 3 weeks ago
Thanks for the report. It's difficult to tell completely without a minimal test case that we can run with the hermes
command line tool that demonstrates differences between Hermes and the other engines.
A couple starting points:
If you're able to find a more focused minimal reproduction, I think that'd really help make more progress.
Thanks for the quick reply and the detailed response, King.👑 I will try to investigate this further. 👍
I have scanned a few other discussions and issues about WASM support and what I can tell is that "asm.js" files should work in hermes? So I think you were right about the WASM support. The JS file i provided is compiled with a newer emscripten which does not output asm.js.
The other file i was talking about (which does work on v8/jsc) compiled with "fastcomp" should output asm.js but this file does not work either. Could the optimizations and minification be a problem here?
const test = require('turtlecoin-crypto.js')
Does not give any output.
Found (one) difference in behavior upon modifying the code to call the result of the module.
Hermes throws a TypeError if you try to access .stack
on a non-Error, and the code you've linked creates an object obj
which has its .__proto__
set to a constructed Error
. When you try to access obj.stack
, we use a getter on the .stack
property of the Error to construct the string for the stack trace. Hermes then throws because the this
value passed to the getter isn't an Error, while V8 (e.g.) walks the prototype chain to find the JSError.
We'll look into possible solutions.
Ok interesting! Thanks for the help 👍
Any update on this?
Bug Description
I've been trying to load an emscripten compiled file with hermes with no success. First I thought it was the minification of the emscripten flags present but it's still the same result even with all minifications turned off. The code works (minfied) on both V8 and JSC engine. Can you give me any hints on what could be changed to make it work and what is the core difference between Hermes and the others engines?
gradle clean
and confirmed this bug does not occur with JSCUsing the latest(?) version of hermes with
React Native version: 0.73.4 OS: Any Platform: IOS/ANDROID
Steps To Reproduce
If you want to test it this is the file i'm trying to load. https://github.com/kryptokrona/kryptokrona-crypto/blob/master/dist/turtlecoin-crypto.js (non-minified)
code example:
The Expected Behavior