Unable to run EAS build. Crash on APP start after SDK 47 update.

In your post, please share:

  • Whether you are bare or managed workflow: managed
  • Your eas-cli version: eas-cli/3.1.1 linux-x64 node-v16.13.0
  • What you have tried so far

When running the app after upgrading to SDK 47 It crashes immediately. After look in the app logs with adb I can only only see the update loader exception. Does anyone know if this is relevant? I assume it gets swallowed or am I missing something?

adb logs
12-27 15:51:20.118 3733 3760 E LoaderTask: java.lang.Exception: This app (ID: 9dd13de1-5962-4492-8afd-f0b286c71c03) has no updates available on the channel named "staging" and branch named "staging" for the platform "android" and runtime version "exposdk:47.0.0"
12-27 15:51:20.118 3733 3760 E LoaderTask: at expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:312)

Do you use the expo-updates package to check for updates after the app is loaded? It’s hard to tell without more of the ADB logs, but the only scenario where something like this could cause a crash that I could hypothesize is perhaps you’re fetching the update even if it’s not available. The automatic update checking that occurs after the app starts should not do this.

If you can remove any of your update checking code and it then works (it would take two restarts of the app by default for an update to take effect once you do that), that would indicate there’s an issue in your update checking logic. You could also try comparing it to the update checking logic demonstrated here.

I did use expo-updates . However I stopped when moving to SDK 45. There was still a reference to it in package.json so I removed it. Here is the the complete log from ADB which seems to have changed slightly now there is no reference to expo-updates in package.json

eas.json

 "staging": {
      "distribution": "internal",
      "channel": "staging",
      "env": {
        "CAREFOR_EMAR_ENVIRONMENT": "staging"
      }
    },
01-05 12:40:09.524   189   192 E android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup35: Permission denied
01-05 12:40:09.753  5374  5401 E dev.expo.updates: {"timestamp":1672922409749,"message":"Failed to download manifest from URL: https:\/\/u.expo.dev\/9dd13de1-5962-4492-8afd-f0b286c71c03","code":"UpdateFailedToLoad","level":"error","stacktrace":["expo.modules.updates.logging.UpdatesLogger.logEntryString(UpdatesLogger.kt:135)","expo.modules.updates.logging.UpdatesLogger.error(UpdatesLogger.kt:96)","expo.modules.updates.logging.UpdatesLogger.error(UpdatesLogger.kt:86)","expo.modules.updates.logging.UpdatesLogger.error$default(UpdatesLogger.kt:81)","expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:309)","expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)","okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)","java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)","java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)","java.lang.Thread.run(Thread.java:923)"]}
01-05 12:40:09.764  5374  5401 E Loader  : Failed to download manifest from URL: https://u.expo.dev/9dd13de1-5962-4492-8afd-f0b286c71c03
01-05 12:40:09.764  5374  5401 E Loader  : java.lang.Exception: "channel-name" is not allowed to be empty. The headers "expo-runtime-version", "expo-channel-name", and "expo-platform" are required. They can also be set with the query parameters "runtime-version", "channel-name", and "platform".
01-05 12:40:09.764  5374  5401 E Loader  :      at expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:312)
01-05 12:40:09.764  5374  5401 E Loader  :      at expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)
01-05 12:40:09.764  5374  5401 E Loader  :      at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
01-05 12:40:09.764  5374  5401 E Loader  :      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
01-05 12:40:09.764  5374  5401 E Loader  :      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
01-05 12:40:09.764  5374  5401 E Loader  :      at java.lang.Thread.run(Thread.java:923)
01-05 12:40:09.773  5374  5401 E dev.expo.updates: {"timestamp":1672922409770,"message":"UpdatesController onBackgroundUpdateFinished: Error: \"channel-name\" is not allowed to be empty. The headers \"expo-runtime-version\", \"expo-channel-name\", and \"expo-platform\" are required. They can also be set with the query parameters \"runtime-version\", \"channel-name\", and \"platform\".","code":"Unknown","level":"error","stacktrace":["expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:312)","expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)","okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)","java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)","java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)","java.lang.Thread.run(Thread.java:923)"]}
01-05 12:40:09.794  5374  5401 E LoaderTask: Failed to download remote update
01-05 12:40:09.794  5374  5401 E LoaderTask: java.lang.Exception: "channel-name" is not allowed to be empty. The headers "expo-runtime-version", "expo-channel-name", and "expo-platform" are required. They can also be set with the query parameters "runtime-version", "channel-name", and "platform".
01-05 12:40:09.794  5374  5401 E LoaderTask:    at expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:312)
01-05 12:40:09.794  5374  5401 E LoaderTask:    at expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)
01-05 12:40:09.794  5374  5401 E LoaderTask:    at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
01-05 12:40:09.794  5374  5401 E LoaderTask:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
01-05 12:40:09.794  5374  5401 E LoaderTask:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
01-05 12:40:09.794  5374  5401 E LoaderTask:    at java.lang.Thread.run(Thread.java:923)
01-05 12:40:10.934  5374  5421 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6172724d in tid 5421 (mqt_js), pid 5374 (m.markybry.eMar)
01-05 12:40:11.012  5432  5432 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-05 12:40:11.013  5432  5432 F DEBUG   : Build fingerprint: 'Android/sdk_phone_x86/generic_x86:11/RSR1.210210.001.A1/7193139:userdebug/dev-keys'
01-05 12:40:11.013  5432  5432 F DEBUG   : Revision: '0'
01-05 12:40:11.013  5432  5432 F DEBUG   : ABI: 'x86'
01-05 12:40:11.013  5432  5432 F DEBUG   : Timestamp: 2023-01-05 12:40:11+0000
01-05 12:40:11.013  5432  5432 F DEBUG   : pid: 5374, tid: 5421, name: mqt_js  >>> com.markybry.eMar <<<
01-05 12:40:11.013  5432  5432 F DEBUG   : uid: 10123
01-05 12:40:11.014  5432  5432 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6172724d
01-05 12:40:11.014  5432  5432 F DEBUG   :     eax 61727241  ebx bd66f9d8  ecx bd65eb70  edx bbdaebe8
01-05 12:40:11.014  5432  5432 F DEBUG   :     edi cfbf7300  esi 0000000b
01-05 12:40:11.014  5432  5432 F DEBUG   :     ebp bbdaeaa8  esp bbdaea80  eip bd65eb92
01-05 12:40:11.178  5432  5432 F DEBUG   : backtrace:
01-05 12:40:11.178  5432  5432 F DEBUG   :       #00 pc 0001eb92  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libjscexecutor.so (facebook::jsc::JSCRuntime::cloneSymbol(facebook::jsi::Runtime::PointerValue const*)+34) (BuildId: 400f23b79d9f7fc71fc787428f70fcbcf6180cf0)
01-05 12:40:11.178  5432  5432 F DEBUG   :       #01 pc 0001f640  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libjscexecutor.so (facebook::jsc::JSCRuntime::symbolToString(facebook::jsi::Symbol const&)+64) (BuildId: 400f23b79d9f7fc71fc787428f70fcbcf6180cf0)
01-05 12:40:11.178  5432  5432 F DEBUG   :       #02 pc 000becd8  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jsi::String::createFromAscii(facebook::jsi::Runtime&, char const*, unsigned int)+104) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.178  5432  5432 F DEBUG   :       #03 pc 000bec51  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jsi::String::createFromAscii(facebook::jsi::Runtime&, char const*)+113) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.179  5432  5432 F DEBUG   :       #04 pc 000b9ba6  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jsi::Object::getProperty(facebook::jsi::Runtime&, char const*) const+102) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.179  5432  5432 F DEBUG   :       #05 pc 0014eff6  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (reanimated::NativeProxy::installJSIBindings()+262) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.179  5432  5432 F DEBUG   :       #06 pc 0017b338  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jni::detail::MethodWrapper<void (reanimated::NativeProxy::*)(), &(reanimated::NativeProxy::installJSIBindings()), reanimated::NativeProxy, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>)+216) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.179  5432  5432 F DEBUG   :       #07 pc 0017b3cb  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jni::detail::CallWithJniConversions<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>), void, facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>::call(facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>))+75) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)
01-05 12:40:11.179  5432  5432 F DEBUG   :       #08 pc 0017b192  /data/app/~~KTCDFiaqZutUlURN-qdjdA==/com.markybry.eMar-AHdNm-HiSO3ZhnBp8ECLjg==/lib/x86/libreanimated.so (facebook::jni::detail::FunctionWrapper<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*, void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::NativeProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>))+82) (BuildId: e3df992bf84339bb87faa9ac1cf5518ce3bcf015)

Looks like the expo.update was a red-herring, and is a handled exception. The issue was with reanimated. I had downgraded it from the official expo version because of a web build issue. Using the expo approved version resolves the issue.

Web issue with the reanimated was resolved by following Reanimated - Expo Documentation

2 Likes

Glad you got it resolved and thanks for sharing the root cause and a solution for it @markybry :clap:

1 Like