-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RN 0.63.0 + enableHermes -> crash on start #298
Comments
I also noticed error line shown before above exceptions:
|
Could you check The SoLoader error should be benign: if the app does not explicitly specify a VM at Runtime, React Native will simply try to load JSC, Hermes Debug, and Hermes Release in turn until one succeeds. |
@willholen , thank you for you answer.
|
@alexkrav There appears to be a native exception thrown during the initial bundle execution, but unfortunately all the information about what went wrong was lost during the C++-to-Java Exception conversion, resulting in the rather unhelpful Meanwhile, can you see if you're able to attach a native debugger and get a stack trace of this (handled) C++ exception? It will probably be unsymbolicated, but it would be very helpful just to see which libraries are involved. For example, whether the exception originally came from |
thank you @willholen
|
Obviously Flipper shouldn't be crashing, but I'm glad it got further. Since it appears that you're now hitting an abort/assert instead a C++ exception, the logged error details are hopefully more useful than before. Can you please include the whole logcat dump from this new crash (plus a pageful before it starts)? Do you get the same result in release builds as in this development build? |
@willholen, thanks for release build suggestion. Release build started without exception and shows the first UI screen (log in screen) ! |
@alexkrav Hi. I was experiencing similar error when upgrading from 0.62.2 to 0.63.1. In my case the issue was that I had undefined values in StyleSheet
The error was coming from react-native/Libraries/StyleSheetValidation.js validateStyle (line 50), which is parsing your StyleSheets in dev mode. The problem in my codebase was that I was using Platform.select(...) inside Stylesheet without specifying android config, which was returning undefined and causing validation error. Also disabling hermes gave me a better stacktrace to spot the issue. |
@jakmak24 Thank you. Unfortunately, this is not my case. |
@alexkrav My (incomplete) understanding of this crash is:
In a release build, the bundle is built on the host before the app runs. The hope was that this would fail and reveal a JS compilation error due to some syntax that Hermes doesn't support, but since it succeeded there does not appear to be any such problems in the release version of the JavaScript bundle. Could you:
|
and Now I have SIGABRT 11 :-) |
@alexkrav Did you originally see an error that prevented the creation of |
@willholen |
I have the same issue when migrating from react-native 62 to react-native 63.2. |
Similarly getting this after enabling hermes on my app, it seems that these errors can be caused by bits of JS that the engine doesn't like. Commenting out large chunks of the app then running npm start -- --reset-cache fixes things until I find the next issue. Edit: actually my issue was largely to do with storybook, the above mentioned really helped me, it seemed random at first however Im guessing that's down to some clever treeshaking.
|
It looks like we also have the same issue, probably related to storybook. |
hi there, experiencing the same issue here, we don't know the reason yet, disabling it for now. |
You can force to use v0.5.1 of hermes: 1- that's works for me , i'm currently using the version 0.63.2 |
I've tried multiple Hermes versions, from 0.1.1 right up to 0.6.0 including the one listed above and I still get the app crashing on startup :( |
One thing to note @Eli-Nathan, you do need to do a gradlew clean when updating hermes engine to "hermes-engine": "0.5.1". yarn start --reset-cache is not enough. Updating to 0.5.1 did fix things for me.
|
That seems to have fixed the Hermes issue! Although...
but with Hermes v0.5.1 the |
What version of RN are you running? I'm not sure setting hermesCommand is necessary. I definitely don't have that set, I haven't actually seen this perhaps it's deprecated? |
I'm on 0.63.2, yeah it gave me and error when i removed that line but another clean and build and we're all good. Android sure loves a good clean 🙄 Thanks! |
if you upgrade hermes, you need to change the
|
Thanks guys for your investigation ! I just commented the import of the root of my storybook folder and now it's working ! |
I'm still encountering the problem, even after installing When trying to build a release build, I'm getting several errors:
This is the order they appear in the debug tab of Android Studio. When disabling Hermes, only the last error still persists:
|
E/unknown:ReactNative: Unable to launch logbox because react was unable to create the root view |
@alexkrav if you're getting a signal 11, you should be getting a native stack trace in logcat. If you can reproduce it with 0.5.1 or newer, there are instructions to symbolicate the native stack here: https://github.com/facebook/hermes/blob/master/doc/ReactNativeIntegration.md#reporting-native-crashes. Or you can post the crash from logcat, and we can try to help, but only for 0.5.1 and newer. |
@fritzfr and @songhanlin your errors do not seem to be related to the one in this issue. Please use the "New Issue" button or go to https://github.com/facebook/hermes/issues/new/choose to file a new issue. Thanks! |
@mhorowitz Thank you. |
Seems like this could be related. facebook/react-native#25537 I think I'm encountering the same issue, very difficult to track down. I was using a custom fork of RN (almost identical to 0.63.2). I removed that to go back to vanilla 0.63.2. As soon as I did that the app started crashing on boot. edit: doh! Android Studio inserted |
@alexkrav I was looking at the stack trace you're showing, and this might be an issue we've been seeing for a while, but haven't found a fix for yet. Specifically, the crash you mention is in I'll separate that crash into a different task, because this task has become over-aggregated. There are various crashes detailed here, and we can't follow all the threads. |
For any future occurrences or information on the |
Bug Description
Got this failure after switching to RN 0.63.0 and enabling Hermes (following https://reactnative.dev/docs/hermes):
Hermes version: ?
React Native version: 0.63.0
Android version: Android 10
Device: Samsung galaxy s20
From logcat:
Please help. Thank you.
The text was updated successfully, but these errors were encountered: