java.lang.RuntimeException

How can I determine the reason why my standalone app crashes?
It happens only in one model (more below). A user informed me and I was able to find the next error message on Google Play Console:

java.lang.RuntimeException: 
  at host.exp.exponent.experience.BaseExperienceActivity$2.run (BaseExperienceActivity.java:206)
  at android.os.Handler.handleCallback (Handler.java:836)
  at android.os.Handler.dispatchMessage (Handler.java:103)
  at android.os.Looper.loop (Looper.java:203)
  at android.app.ActivityThread.main (ActivityThread.java:6339)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1084)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:945)

What does that mean? Maybe somebody can set me in the right direction?
SDK Version: 36
Platforms: Android 7.1.1 (Motorola Moto E (4) Plus)

Thanks!

A RuntimeException is a generic “error” that happens at runtime. The test of this StackTrace doesn’t say anything about what’s going on.

The best way to determine the cause is to use something like sentry and/or fabric/crashlytics. It is explained here in the docs. You will then receive a crash log via these systems when they restart the app. Usually these crash logs hold more information than just what you posted.

My guess is that this specific phone does not correctly implement an ASOP standard, which is something that happens every once in a while and causes crashes on specific models only.

1 Like

Great, appreciate your help!

1 Like

Maybe this will help somebody?
The error was with the prop “numberOfLines” in a component. My mistake was to declare a number for iOS but not for Android…

numberOfLines = { Platform.OS == 'IOS' && 1 }

and so in Android that will be like writing…

numberOfLines = { undefined }

That was causing the App to crash, but only in a small number of Android devices.

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