Closed compojoom closed 4 years ago
If you're using the React Native JS bundler, then the code you're writing gets run through Babel before it gets sent to Hermes. That would likely greatly transform the generator and the async
function into something completely different using regenerator
, at the moment.
To help reproduce this, it would be useful to have a minimal JS bundle which demonstrates the error when run with Hermes. For example, a file bundle.js
which when run with Hermes using ./hermes bundle.js
throws the error.
Alternately, you can put a small React Native project on GitHub which shows the issue when running Hermes on your Android phone and we can try and reproduce from there. It would be much harder for us to diagnose an issue on the full size app in a private repository because there would simply be significantly more code compared to a minimal example which shows the error. In particular, it seems that the error is being thrown by either your app or a third-party library that wants a wallet
to be loaded, so figuring out why it doesn't think the wallet is loaded is a good first step to finding a minimal failing case.
@avp - yes, the error is thrown by our library, but only when ran on Hermes and not on JSC
I'll try to make a smaller example that reproduces the error, but I'm not really very optimistic that I'll manage to reproduce it outside of the spaghetti code we currently have :D
Closing this for now, feel free to reopen if you are still able to reproduce independently.
We just ran into a strange crash in Production mode and after several hours of debugging it turned out that if we disable Hermes and use JSC the app works fine.
So basically this code causes the crash
The error that is shown to us comes from this line: const initialNavigationAction = yield call(checkForInitialURL) If we remove it - then the app works fine. CheckForInitialURL does nothing special:
if I switch those 2 lines around:
then the app works. As I said it works fine with JSC.
The app is currently in a private repo, but if soemeone from the team would like to give it a try I can provide you with access to it.
We have a standard build.gradle:
Tested on RN 0.61.4 with hermes 0.2.1