Native crashes using Expo 38 managed

SDK: 38
Platforms: Android and ios

We have a mobile app deployed to both Android and ios.
Managed flow we have not ejected
Within Expo, no issues.
Using Android or iOS simulators, no issues.
Deploy to standalone app and both crash at certain points in our application.
It crashes on both platforms and consistently on different devices.

Using adb logcat on Android standalone device, we see this message:
java.lang.ClassNotFoundException: host.exp.exponent.taskManager.ExpoHeadlessAppLoader

Seems this is a general Javascript error message.

In investigating we have found:

(a) some with similar problems seemed to solve by ejecting
(b) we’d like to use Sentry but we need to eject to get native crash reporting

We don’t need any native features at this point.
Unfortunately all paths seem to be pointing us to eject.
Since we don’t need any non-expo native features, we’d hate to eject just to resolve these crash issues.

Do we have any other options to debug these issues or are we forced to eject?

Since this sounds very reproducible maybe you could eject, integrate Sentry, do your testing, and then revert the eject.

Getting the same


08-06 19:13:17.616: E/libc(640): Access denied finding property "vendor.debug.egl.swapinterval"
08-06 19:13:17.620: D/LifecycleMonitor(19350): Lifecycle status change: host.exp.exponent.MainActivity@9ceec4d in: RESTARTED
08-06 19:13:17.621: D/LifecycleMonitor(19350): Lifecycle status change: host.exp.exponent.MainActivity@9ceec4d in: STARTED
08-06 19:13:17.623: E/Expo(19350): Cannot initialize app loader. host.exp.exponent.taskManager.ExpoHeadlessAppLoader
08-06 19:13:17.623: W/System.err(19350): java.lang.ClassNotFoundException: host.exp.exponent.taskManager.ExpoHeadlessAppLoader
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.Class.classForName(Native Method)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.Class.forName(Class.java:453)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.Class.forName(Class.java:378)
08-06 19:13:17.623: W/System.err(19350): 	at l.d.a.b.a(AppLoaderProvider.java:2)
08-06 19:13:17.623: W/System.err(19350): 	at l.d.a.b.b(AppLoaderProvider.java:2)
08-06 19:13:17.623: W/System.err(19350): 	at expo.modules.taskManager.TaskService.getAppLoader(TaskService.java:2)
08-06 19:13:17.623: W/System.err(19350): 	at expo.modules.taskManager.TaskService.isStartedByHeadlessLoader(TaskService.java:1)
08-06 19:13:17.623: W/System.err(19350): 	at expo.modules.taskManager.TaskManagerInternalModule.isRunningInHeadlessMode(TaskManagerInternalModule.java:1)
08-06 19:13:17.623: W/System.err(19350): 	at expo.modules.taskManager.TaskManagerInternalModule.onHostResume(TaskManagerInternalModule.java:1)
08-06 19:13:17.623: W/System.err(19350): 	at org.unimodules.adapters.react.services.d$c.onHostResume(UIManagerModuleWrapper.java:2)
08-06 19:13:17.623: W/System.err(19350): 	at com.facebook.react.bridge.ReactContext.onHostResume(ReactContext.java:5)
08-06 19:13:17.623: W/System.err(19350): 	at com.facebook.react.ReactInstanceManager.moveToResumedLifecycleState(ReactInstanceManager.java:3)
08-06 19:13:17.623: W/System.err(19350): 	at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:11)
08-06 19:13:17.623: W/System.err(19350): 	at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:3)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.reflect.Method.invoke(Native Method)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.k.a(RNObject.java:17)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.k.a(RNObject.java:12)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.k.a(RNObject.java:58)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.experience.k.onResume(ReactNativeActivity.java:3)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.experience.f.onResume(BaseExperienceActivity.java:1)
08-06 19:13:17.623: W/System.err(19350): 	at host.exp.exponent.experience.ExperienceActivity.onResume(ExperienceActivity.java:1)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
08-06 19:13:17.623: W/System.err(19350): 	at androidx.test.runner.MonitoringInstrumentation.callActivityOnResume(MonitoringInstrumentation.java:21)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.Activity.performResume(Activity.java:7300)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3814)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3854)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
08-06 19:13:17.623: W/System.err(19350): 	at android.os.Handler.dispatchMessage(Handler.java:106)
08-06 19:13:17.623: W/System.err(19350): 	at android.os.Looper.loop(Looper.java:193)
08-06 19:13:17.623: W/System.err(19350): 	at android.app.ActivityThread.main(ActivityThread.java:6718)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.reflect.Method.invoke(Native Method)
08-06 19:13:17.623: W/System.err(19350): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
08-06 19:13:17.623: W/System.err(19350): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
08-06 19:13:17.623: W/System.err(19350): Caused by: java.lang.ClassNotFoundException: Didn't find class "host.exp.exponent.taskManager.ExpoHeadlessAppLoader" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/androidx.test.tools.crawler-V7YOToxANzJO97jszGhvcw==/base.apk", zip file "/data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/base.apk", zip file "/data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/split_config.arm64_v8a.apk", zip file "/data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/androidx.test.tools.crawler-V7YOToxANzJO97jszGhvcw==/lib/arm64, /data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/lib/arm64, /data/app/androidx.test.tools.crawler-V7YOToxANzJO97jszGhvcw==/base.apk!/lib/arm64-v8a, /data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/base.apk!/lib/arm64-v8a, /data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/com.xyz.xyz_android-NillPNLUDYonLAXgOycLDg==/split_config.xxhdpi.apk!/lib/arm64-v8a, /system/lib64]]
08-06 19:13:17.623: W/System.err(19350): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
08-06 19:13:17.623: W/System.err(19350): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)


We have resolved the crashes. They were related to Google Maps permission issues. Once we entered the correct config for googleMapsApiKey in app.json, the issue was resolved. We were not seeing the issue in dev because we configured the google key via a config file in our code. This does not work using a native build, seems it must be configured via app.json.

1 Like

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