Android standalone builds crash after fresh installation

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): Android 9, SGS 9+

When my users install my app from the app store, the app crashes with the following output:

java.lang.RuntimeException: Expo encountered a fatal error: Unexpected end of script

no stack
  at host.exp.exponent.experience.BaseExperienceActivity$2.run (BaseExperienceActivity.java:206)
  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:6986)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1445)

When they launch it a second time, it works.

edit: this seems to be Android standalone app crashing on Android X · Issue #6523 · expo/expo · GitHub

Hi, we’re experiencing a similar problem after releasing an update with expo v36.0.0, we’re trying to release a patch with v36.0.2 right now. Have you managed to fix it or find any more info?

I can’t quite remember what I did, but I rebuilt it again and it seemed to work. I also installed sentry.io to catch JS error in production.

I don’t think this is the “dark mode” issue. That seems to cause errors like the following:

Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'width' in shadow node of type: RCTView

Whereas this one looks like an incomplete JavaScript bundle:

java.lang.RuntimeException: Expo encountered a fatal error: Unexpected end of script

I think this might be more relevant:
https://github.com/expo/expo/issues/5839#issuecomment-572296759

By the way a pull request has been merged to fix the dark mode related crash:

https://github.com/expo/expo/pull/6825#issuecomment-579016559

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.