ExpoKit 27 crash at start

I’m trying to migrate from ExpoKit 26 to 27 but when I test the app on my GenyMotion Emulator I got a “Unfortunately, ‘appName’ has stopped.”

I succefuly upgraded from ExpoKit 25 to 26 in the past, it seems something is wrong this time…

So far, I’ve tried two ways to upgrade:

  1. from a working ExpoKit 26 project:
  1. starting a new Expo SDK 27 Project
  • create a new expo project with the XDE Client
  • copy and past src folders, assets folders
  • complete app.json and package.json to match the previous project.
  • npm install
  • exp detach
  • exp start
  • build in Android Studio and running app.

Both ways lead to the same error. Is there something I missed for the 27.0.0 release?

Here is what I get when running adb logcat

05-20 12:20:36.640  1588  2075 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=fr.microstory.android/host.exp.exponent.MainActivity (has extras)} from uid 10008 on display 0
05-20 12:20:36.659  1588  2109 I ActivityManager: Start proc 3537:fr.microstory.android/u0a78 for activity fr.microstory.android/host.exp.exponent.MainActivity
05-20 12:20:36.688  3537  3537 E libprocessgroup: failed to make and chown /acct/uid_10078: Read-only file system
05-20 12:20:36.688  3537  3537 W Zygote  : createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
05-20 12:20:36.689  3537  3537 I art     : Late-enabling -Xcheck:jni
05-20 12:20:36.703  1359  1723 D AudioFlinger: mixer(0xf1d80000) throttle end: throttle time(11)
05-20 12:20:36.749  1588  1611 I art     : Background sticky concurrent mark sweep GC freed 3569(209KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 13MB/13MB, paused 9.387ms total 20.835ms
05-20 12:20:36.802  3550  3550 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:36.802  3550  3550 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_dependencies_apk.apk@classes.dex: Permission denied
05-20 12:20:36.803  3550  3550 I dex2oat : dex2oat took 691.295us (threads: 4)
05-20 12:20:36.806  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.284  1986  2140 E Surface : getSlotFromBufferLocked: unknown buffer: 0xe1442a80
05-20 12:20:37.801  3537  3537 W art     : /data/app/fr.microstory.android-1/split_lib_dependencies_apk.apk has in excess of 100 dex files. Please consider coalescing and shrinking the number to  avoid runtime overhead.
05-20 12:20:37.869  3552  3552 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.869  3552  3552 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_0_apk.apk@classes.dex: Permission denied
05-20 12:20:37.869  3552  3552 I dex2oat : dex2oat took 301.961us (threads: 4)
05-20 12:20:37.871  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.888  3554  3554 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.888  3554  3554 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_1_apk.apk@classes.dex: Permission denied
05-20 12:20:37.888  3554  3554 I dex2oat : dex2oat took 267.081us (threads: 4)
05-20 12:20:37.889  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.911  3556  3556 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.911  3556  3556 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_2_apk.apk@classes.dex: Permission denied
05-20 12:20:37.911  3556  3556 I dex2oat : dex2oat took 273.127us (threads: 4)
05-20 12:20:37.914  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.930  3558  3558 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.930  3558  3558 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_3_apk.apk@classes.dex: Permission denied
05-20 12:20:37.930  3558  3558 I dex2oat : dex2oat took 705.833us (threads: 4)
05-20 12:20:37.934  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.956  3560  3560 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.956  3560  3560 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_4_apk.apk@classes.dex: Permission denied
05-20 12:20:37.956  3560  3560 I dex2oat : dex2oat took 173.237us (threads: 4)
05-20 12:20:37.958  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.979  3562  3562 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.980  3562  3562 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_5_apk.apk@classes.dex: Permission denied
05-20 12:20:37.980  3562  3562 I dex2oat : dex2oat took 630.927us (threads: 4)
05-20 12:20:37.982  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:37.992  3564  3564 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:37.992  3564  3564 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_6_apk.apk@classes.dex: Permission denied
05-20 12:20:37.992  3564  3564 I dex2oat : dex2oat took 441.794us (threads: 4)
05-20 12:20:37.993  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:38.016  3566  3566 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:38.016  3566  3566 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_7_apk.apk@classes.dex: Permission denied
05-20 12:20:38.016  3566  3566 I dex2oat : dex2oat took 604.692us (threads: 4)
05-20 12:20:38.018  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:38.032  3568  3568 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:38.033  3568  3568 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_8_apk.apk@classes.dex: Permission denied
05-20 12:20:38.033  3568  3568 I dex2oat : dex2oat took 556.244us (threads: 4)
05-20 12:20:38.034  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:38.061  3570  3570 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
05-20 12:20:38.061  3570  3570 E dex2oat : Failed to create oat file: /data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_9_apk.apk@classes.dex: Permission denied
05-20 12:20:38.061  3570  3570 I dex2oat : dex2oat took 287.232us (threads: 4)
05-20 12:20:38.063  3537  3537 W art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/fr.microstory.android-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@fr.microstory.android-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
05-20 12:20:38.076  3537  3537 I MultiDex: VM with version 2.1.0 has multidex support
05-20 12:20:38.076  3537  3537 I MultiDex: install
05-20 12:20:38.076  3537  3537 I MultiDex: VM has multidex support, MultiDex support library is disabled.
05-20 12:20:38.092  3537  3537 D FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
05-20 12:20:38.105  3537  3537 W InstanceID/Rpc: Failed to resolve REGISTER intent, falling back
05-20 12:20:38.105  3537  3537 W InstanceID/Rpc: Both Google Play Services and legacy GSF package are missing
05-20 12:20:38.106  3537  3537 D FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
05-20 12:20:38.126  3537  3537 I FA      : App measurement is starting up, version: 9877
05-20 12:20:38.126  3537  3537 I FA      : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
05-20 12:20:38.126  3537  3537 D FA      : Debug-level message logging enabled
05-20 12:20:38.126  3537  3537 D FA      : AppMeasurement singleton hash: 264509681
05-20 12:20:38.138  3537  3537 V FA      : Collection enabled
05-20 12:20:38.138  3537  3537 V FA      : App package, google app id: fr.microstory.android, 1:367315174693:android:f968efbb41d1fa7a
05-20 12:20:38.138  3537  3537 I FA      : To enable faster debug mode event logging run:
05-20 12:20:38.138  3537  3537 I FA      :   adb shell setprop firebase.analytics.debug-mode fr.microstory.android
05-20 12:20:38.156  3537  3537 V FA      : Registered activity lifecycle callback
05-20 12:20:38.157  3537  3537 I FirebaseInitProvider: FirebaseApp initialization successful
05-20 12:20:38.159  3537  3574 V FA      : Using local app measurement service
05-20 12:20:38.179  3537  3537 I InstantRun: starting instant run server: is main process
05-20 12:20:38.192  3537  3584 W GooglePlayServicesUtil: Google Play Store is missing.
05-20 12:20:38.192  1588  1614 W ActivityManager: Unable to start service Intent { act=com.google.android.gms.ads.identifier.service.START pkg=com.google.android.gms } U=0: not found
05-20 12:20:38.337  3537  3597 I stetho  : Listening on @stetho_fr.microstory.android_devtools_remote
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo: Encountered an error connecting to Google Play Services
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo$CachedInfo.getAndCacheGoogleAdvertisingId(DeviceInfo.java:207)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo$CachedInfo.getAdvertisingId(DeviceInfo.java:187)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo$CachedInfo.<init>(DeviceInfo.java:57)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo$CachedInfo.<init>(DeviceInfo.java:42)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo.getCachedInfo(DeviceInfo.java:260)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.DeviceInfo.prefetch(DeviceInfo.java:266)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.AmplitudeClient$2.run(AmplitudeClient.java:285)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.AmplitudeClient.runOnLogThread(AmplitudeClient.java:1793)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.AmplitudeClient.initializeDeviceInfo(AmplitudeClient.java:280)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.AmplitudeClient.access$100(AmplitudeClient.java:40)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at com.amplitude.api.AmplitudeClient$1.run(AmplitudeClient.java:232)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at android.os.Handler.handleCallback(Handler.java:739)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at android.os.Handler.dispatchMessage(Handler.java:95)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at android.os.Looper.loop(Looper.java:148)
05-20 12:20:38.348  3537  3595 E com.amplitude.api.DeviceInfo:  at android.os.HandlerThread.run(HandlerThread.java:61)
05-20 12:20:38.353  3537  3595 W GooglePlayServicesUtil: Google Play Store is missing.
05-20 12:20:38.368  3537  3537 D ShortcutBadger: Finding badger
05-20 12:20:38.372  3537  3537 D ShortcutBadger: Current badger:me.leolin.shortcutbadger.impl.DefaultBadger
05-20 12:20:38.375  3537  3537 V fb-UnpackingSoSource: locked dso store /data/user/0/fr.microstory.android/lib-main
05-20 12:20:38.375  3537  3537 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/fr.microstory.android/lib-main
05-20 12:20:38.375  3537  3537 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/fr.microstory.android/lib-main
05-20 12:20:38.404  3537  3537 V FA      : onActivityCreated
05-20 12:20:38.519  3537  3537 W AsyncCondition: Could not find listener for key: openOptimisticExperienceActivity
05-20 12:20:38.519  3537  3537 W AsyncCondition: Could not find listener for key: openExperienceActivity
05-20 12:20:38.520  1588  1614 I ActivityManager: START u0 {flg=0xc080000 cmp=fr.microstory.android/host.exp.exponent.experience.HomeActivity} from uid 10078 on display 0
05-20 12:20:38.521  1588  1614 I ActivityManager: Ignoring FLAG_ACTIVITY_NEW_DOCUMENT, launchMode is "singleInstance" or "singleTask"
05-20 12:20:38.525  3537  3537 D AndroidRuntime: Shutting down VM
05-20 12:20:38.525  3537  3537 E AndroidRuntime: FATAL EXCEPTION: main
05-20 12:20:38.525  3537  3537 E AndroidRuntime: Process: fr.microstory.android, PID: 3537
05-20 12:20:38.525  3537  3537 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.microstory.android/host.exp.exponent.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread.-wrap11(ActivityThread.java)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5417)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-20 12:20:38.525  3537  3537 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at host.exp.exponent.ExponentManifest.fetchCachedManifest(ExponentManifest.java:276)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at host.exp.exponent.AppLoader.start(AppLoader.java:86)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at host.exp.exponent.experience.DetachActivity.onCreate(DetachActivity.java:90)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:6237)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
05-20 12:20:38.525  3537  3537 E AndroidRuntime:        ... 9 more
05-20 12:20:38.578  1588  3285 I OpenGLRenderer: Initialized EGL, version 1.4
05-20 12:20:38.647  1588  3285 W EGL_emulation: eglSurfaceAttrib not implemented
05-20 12:20:38.647  1588  3285 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xda9f2520, error=EGL_SUCCESS
05-20 12:20:38.856  3537  3587 D Exponent: Loaded exp.host status page.
05-20 12:20:39.023  1588  1617 W ActivityManager: Activity pause timeout for ActivityRecord{61451cc u0 fr.microstory.android/host.exp.exponent.MainActivity t47}
05-20 12:20:46.647  1588  1617 W ActivityManager: Launch timeout has expired, giving up wake lock!

I’ve completed the upgrade for iOS (same project) and it works like a charm.
It seems to be Android related, maybe something is wrong in my MainActivity or maybe I missed somthing somewhere making the app crashing at start on Android…
Any thought?

  • I’ve started a project from scratch using exp init
  • Copy and past sources from my Expokit 26 project.
  • changed App.js / app.json and package.json to match with the libs used and src folder.

From here the app run as it should using exp start and then exp android
Then I detached exp detach and everything compiles.
When lauching the app, it crashed with the same error message.

I’m using 2 lib that need to be linked react-native-fs and react-native-iap.
And even if I don’t link it, the app crashes.

Weird enough I did the same without incorporating my project code:

  • started a project from scratch using exp init
  • changed nothing
  • exp detach
  • run from Android Studio
    and I got the same result: App Crashes at start

In all case i get this error in the console log (where I get exp log): [exp] Metro Bundler failed to start. (code: EPERM)

Hi @alanlanglois! In the future please only post one issue or forum post, it’s difficult to go between the two to figure out what’s going on.

The [exp] Metro Bundler failed to start. (code: EPERM) seems important. It looks like there are a bunch of different solutions that people have tried for that: Metro Bundler failed to start EPERM - Google Search

The stack trace from android suggests that it doesn’t know about the development url. What is in DetachBuildConstants.DEVELOPMENT_URL? It should point to the url printed out by exp start.

Hi @jesse thanks for your help!
The build DEVELOPMENT URL doesn’t seems to be right:
public static final String DEVELOPMENT_URL = "";

It also says: // This file is auto-generated. Please don't rename!
Sounds like it doesn’t auto-generate this var.

I’ve tried anyway and rename this var with another address than the one exactly given in exp start but this one:
exp31805e2108a944619[…]e038://192.168.1.45:19000
rather than this one:
expb7f249fd277[…]2af969157b270://nw-kks.alanlanglois.msfs27.exp.direct:80
PLUS I removed the realtime and cloud firewall to avoid the EPERM error.
and it worked!

I’m not sure why this development URL is not set automatically, but it was definitely the cause of the crash.

Ok I’m glad you figured out the EPERM error.

Sorry that the file isn’t being auto generated. Can you try running exp prepare-detached-build in the project directory and see if it works? It should autogenerate that file. That command is supposed to be ran as a pre-build script when you build the Android project.

1 Like

Hi @jesse

It changes this variable to DEVELOPMENT_URL = “exp31805e210[…]df4e0bb248e038://localhost:80”
I guess it works even if before it wasn’t localhost but my ip (which should result to the same).
Thanks for the tips, is this referenced in the doc?

Ok, I’m not really sure why that script wasn’t being called when you tried building the app. We don’t reference in the doc because it’s supposed to happen automatically, but it would be good for us to add some steps to debug.

Anyone got any solution ? I am getting the same issue.
I got this in my cli console

..............
:app:installDevDebug
Installing APK 'app-dev-debug.apk' on 'SM-G610F - 7.0' for app:devDebug
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 3 mins 37.821 secs
Starting: Intent { cmp=host.exp.exponent/.LauncherActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }

But when I try to run the app in my device I got the popup “Sample Expo App has stopped … Close app”
Then it got closed.

@anil1712 did you try this?

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