expo: Apps sometimes crash (call stack at BaseExperienceActivity$2.run)
after the battery bug i released a new android app. But I still see some crashes:
SDK: 35
java.lang.RuntimeException:
at host.exp.exponent.experience.BaseExperienceActivity$2.run (BaseExperienceActivity.java:196)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7076)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Devices: Galaxy A50 (a50) android 9 Galaxy A40 (a40) android 9
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 66 (30 by maintainers)
at SDK 36 same
I’ve put the code here
Please let me know if you have improvements 😃
I wanted to check for updates periodically. I originally tried using
setInterval()but found out that’s not a good idea when you’re trying to do something every 6 hours.The
tick,setTick()stuff in my code is a workaround for that. So every time the user clicks on a button to navigate to another screen the app checks if enough time has passed since the last update check. If so, it updatestickwhich causes theuseEffect()body to run again, which causes it to check for updates.So this is all a bit convoluted and I’m sure there’s a better way.
@wodin, would you mind posting your complete fix? I assume that you implemented it in App.js? Thanks
I also have this issue:
Only android device : Samsung Galaxy S9 (starlte), Android 9, Huawei P20 (HWEML), Android 9
My package.json
app.json not use userInterfaceStyle
Does anyone have same issue?
Bear in mind that the title of this issue is very non-specific, so a truncated/corrupted bundle would be just one cause of this
BaseExperienceActivity$2.runerror.That said, the Updates module is being extracted so that it can be used in the Bare workflow. I think it’s supposed to be released with SDK 37 at the end of March.
I can’t find the issue or the pull request now, though 😅 Ah, here’s the “umbrella” issue for these updates. There are a few different issues/PRs for the Updates module extraction and the Android one is still in progress by the looks of things. https://github.com/expo/expo/issues/6513 https://github.com/expo/expo/pull/6625
Perhaps you can try it out and test how it behaves if you deliberately truncate the bundle. I was able to reproduce the crashes in a managed app like this:
@cruzach and @ide, is there a plan to include fixing this in an upcoming release of ExpoKit? It seems to have been narrowed down to a problem with OTA updates being incomplete on Android and then getting into an unrecoverable state. Thanks for looking into this.
Any news ?
@liogate I think you might be running into the dark mode issue
EDIT: Sorry, I see you already linked to that issue in your comment 😃
Same problem here on SDK 35 and SDK 36
I don’t know what I can do.
I’m not sure, I pushed OTA updates, so I don’t know if it happen specifically for OTA updates. I’m using expo ejected (with expokit). I have the issue since SDK 35, currently I’m in SDK 36 and the issue persist.
@Xrew I suggest running your app locally in production mode with
expo start --no-dev --minify, that may help you find out what is causing your app to crash