Release Android crash with java.lang.RuntimeException


#1

Hi all! I released my app on the store (woohoo!), but I got 2 crashes on Android with this message:

java.lang.RuntimeException: 
  at android.app.ActivityManager$TaskDescription.<init>(ActivityManager.java:1167)
  at host.exp.exponent.h.f.a(ExperienceActivityUtils.java:100)
  at host.exp.exponent.t.a(ExponentManifest.java:368)
  at host.exp.exponent.t.onPostExecute(ExponentManifest.java:331)
  at android.os.AsyncTask.finish(AsyncTask.java:667)
  at android.os.AsyncTask.-wrap1(Unknown Source:0)
  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
  at android.os.Handler.dispatchMessage(Handler.java:105)
  at android.os.Looper.loop(Looper.java:164)
  at android.app.ActivityThread.main(ActivityThread.java:6535)
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

I suppose it is caused by Expo, but is it really?
What could create this crash?


#2

Thanks for reporting this – does this crash happen each time you try to open the app, or was it just two times out of many runs? Also do you mind sharing your exp.json/app.json file since some of its fields affect the piece of code that is crashing?


#3

Hi! It’s now 5 times out of many runs. I’m not the one experiencing these crashes, but I do recieve the reports in Google Play Console from the app users.

{
  "expo": {
    "name": "Vibestar",
    "icon": "./src/main/assets/logo/logo_app.png",
    "loading": {
      "hideExponentText": true,
      "backgroundColor": "#181a35",
      "icon": "./src/main/assets/logo/loading_logo.png",
    },
    "version": "1.0.1",
    "facebookScheme": "MY_FACEBOOK_SCHEME",
    "slug": "vibestar",
    "sdkVersion": "15.0.0",
    "orientation": "portrait",
    "ios": {
      "bundleIdentifier": "BUNDLE_ID"
    },
    "android": {
      "package": "SAME_AS_BUNDLE_ID" //format: com.SOMETHING.SOMETHING_ELSE
    }
  }
}

Started to receive other kind of crash related tot the backPress

java.lang.NullPointerException: 
  at host.exp.exponent.experience.a.onBackPressed(BaseExperienceActivity.java:90)
  at android.app.Activity.onKeyUp(Activity.java:2482)
  at host.exp.exponent.experience.m.onKeyUp(ReactNativeActivity.java:226)

But I think this is something I can fix myself with the BackHandler of React-Native


#4

Thanks for the reports! I’ll fix these crashes in the next android version.


#5

Thanks! Please keep me in touch when it will be release!


#6

We updated Expo (Android) in the Play Store today (version 1.17.0), which we believe addresses this crash. We’ll update the standalone app builders soon too.


#7

Thanks!
For the standalone app builders, will it fix the issue on already built app, that i’ll update with exp publish?


#8

@arivest you’ll need to run exp build again to get a new apk


#9

Hi again!
Bringing bad news with other crash my app got :stuck_out_tongue:

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleCreateService(ActivityThread.java:2939)
  at android.app.ActivityThread.access$1900(ActivityThread.java:163)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1445)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:148)
  at android.app.ActivityThread.main(ActivityThread.java:5585)
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: java.lang.NullPointerException: 
  at host.exp.exponent.gcm.RegistrationIntentService.onCreate(RegistrationIntentService.java:40)
  at android.app.ActivityThread.handleCreateService(ActivityThread.java:2929)

and

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2726)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2787)
  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4568)
  at android.app.ActivityThread.-wrap19(ActivityThread.java:0)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1510)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:154)
  at android.app.ActivityThread.main(ActivityThread.java:6247)
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by: java.lang.RuntimeException: 
  at android.app.ActivityManager$TaskDescription.<init>(ActivityManager.java:982)
  at host.exp.exponent.h.f.a(ExperienceActivityUtils.java:100)
  at host.exp.exponent.o.a(ExponentManifest.java:327)
  at host.exp.exponent.h.e.a(ExperienceActivityUtils.java:94)
  at host.exp.exponent.experience.e.run(ExperienceActivity.java:393)
  at android.app.Activity.runOnUiThread(Activity.java:5942)
  at host.exp.exponent.experience.ExperienceActivity.a(ExperienceActivity.java:335)
  at host.exp.exponent.experience.ExperienceActivity.a(ExperienceActivity.java:246)
  at host.exp.exponent.experience.ExperienceActivity.onCreate(ExperienceActivity.java:140)
  at android.app.Activity.performCreate(Activity.java:6757)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)

Are these crash coming from what I code or it’s from Expo?


#10

Are you sure that’s using the new .apk from exp build? That second crash should be fixed. I’ll look into the first one.


java.lang.RuntimeException: Could not load exp://exp.host/@username/project
#11

Hey @jesse I’m using detached version and tried updating ExpoView to SDK 19, but still getting this error. Is there anything I can change in android files themselves to fix it?


#12

Which error are you getting in the detached app?


#13
Exception java.lang.RuntimeException: Could not load app.
host.exp.exponent.kernel.ExpoViewKernel.handleError (ExpoViewKernel.java:76)
host.exp.expoview.ExponentActivity$1.onError (ExponentActivity.java:100)
host.exp.exponent.ExponentManifest$3.onFailure (ExponentManifest.java:211)
host.exp.exponent.network.ExponentHttpClient.tryHardCodedResponse (ExponentHttpClient.java:148)
host.exp.exponent.network.ExponentHttpClient.access$100 (ExponentHttpClient.java:36)
host.exp.exponent.network.ExponentHttpClient$2.onResponse (ExponentHttpClient.java:99)
okhttp3.RealCall$AsyncCall.execute (RealCall.java:126)
okhttp3.internal.NamedRunnable.run (NamedRunnable.java:32)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
java.lang.Thread.run (Thread.java:818)


Caused by host.exp.exponent.exceptions.ManifestException:
host.exp.exponent.ExponentManifest$3.onFailure (ExponentManifest.java:211)
host.exp.exponent.network.ExponentHttpClient.tryHardCodedResponse (ExponentHttpClient.java:148)
host.exp.exponent.network.ExponentHttpClient.access$100 (ExponentHttpClient.java:36)
host.exp.exponent.network.ExponentHttpClient$2.onResponse (ExponentHttpClient.java:99)
okhttp3.RealCall$AsyncCall.execute (RealCall.java:126)
okhttp3.internal.NamedRunnable.run (NamedRunnable.java:32)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
java.lang.Thread.run (Thread.java:818)

Hm, now after looking at it, might be a different error.


#14

Also created this thread before: java.lang.RuntimeException: Could not load exp://exp.host/@username/project


#15

The same thing is happening to me


#16

I’m getting the same error every time when I started my app downloaded from google play store.
On emulator via android studio everything works. Any idea?


#17

any solution for this problem?


#18

Hi All I’m also getting same issue on Google play store. Should I need to publish apk again.

Im using Android studio 3.1.5 version. Any one have idea? Why this crash happing?