Crashing Android Published App Only - RuntimeException

  1. SDK Version: 41.0.1
  2. Platforms(Android/iOS/web/all): Android

Hi, I’m publishing an app for iOS and Android and everything is running great in Expo go. It’s also running great on TestFlight through Apple and when I side-load my App Bundle on an Android device.

However, when I publish an app through the Google Play Store, the app opens first time and upon subsequent openings it crashes completely.

I’ve checked the crash logs and I get the below. Weirdly, whenever I clear the app store/cache on my device, it opens fine the next time before crashing on subsequent openings. I’m having difficulty as obviously I can’t replicate this problem in development, only through launching the app as installed through the Play Store.

Has anyone come across this before? I’ve searched but can’t find an answer or piece it together from the exception.

Any help would be greatly appreciated.

java.lang.RuntimeException: 
  at host.exp.exponent.experience.BaseExperienceActivity.lambda$consumeErrorQueue$0 (BaseExperienceActivity.java:210)
  at host.exp.exponent.experience.BaseExperienceActivity.lambda$consumeErrorQueue$0$BaseExperienceActivity (BaseExperienceActivity.java)
  at host.exp.exponent.experience.-$$Lambda$BaseExperienceActivity$KACrV8PgD2oygGCw48QyqHbt-ok.run (-.java:2)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:246)
  at android.app.ActivityThread.main (ActivityThread.java:8528)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)

Hey @adamblakleysentireal, are there any processes that you can identify that only run on subsequent runs of the app? If you can, it would be helpful to see all the code that is executed during your app’s launch/startup flow.

Cheers,
Adam

Hi @adamjnav , I actually dug a little deeper with another person line by line and spotted something I thought innocuous at first.

We use rem values to define lineheight through the application for text components. Initially this actually caused a crash when exporting to .apk. We identified several sources of this problem, components rendered in the drawer of the app. Once fixed, this stopped being a problem.

However it looks like it might still be an issue with .apb files which are now required for Play Store release.

We have no methods that would run only on subsequent app launches apart from a call to a serverside method that returns a clean result and causes no errors.

java.lang.RuntimeException: Expo encountered a fatal error: Error while updating property 'lineHeight' in shadow node of type: RCTText at
host.exp.exponent.experience.q.G(BaseExperienceActivity.java:7)
at host.exp.exponent.experience.q.H(Uknown Source:0)
at host.exp.exponent.experience.q.run(Uknown Source:2)
at android.os.Handler.handleCallback(Handler.java:833)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.man(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Just posting the solution here in case this is stumbled upon.

Using rem values in extended stylesheets caused the issue. Because we used a string, we were getting a cast to double error.

Replacing these strings with a reference fixed the issue immediately.

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