App Crashes on device but not on Expo Go - java.lang.Exception

My App is a managed workflow and Eas Cli 4.1.1 and works fine on Expo Go but crashes once insalled on device. It displays the splash screen for a second then crashes with the following Error Message which I have obtained from Logcat. Your assistance will be highly appreciated.

> Failed to launch embedded or launchable update
 java.lang.Exception: No launchable update was found. If this is a bare workflow app, make 
 sure you have configured expo-updates correctly in android/app/build.gradle.
 at expo.modules.updates.launcher.DatabaseLauncher.launch(DatabaseLauncher.kt:71)
 at expo.modules.updates.loader.LoaderTask$launchFallbackUpdateFromDisk$1.onSuccess(LoaderTask.kt:286)
at expo.modules.updates.loader.Loader.finishWithSuccess(Loader.kt:153)
at expo.modules.updates.loader.Loader.handleAssetDownloadCompleted(Loader.kt:326)
at expo.modules.updates.loader.Loader.downloadAllAssets(Loader.kt:250)
at expo.modules.updates.loader.Loader.processUpdateManifest(Loader.kt:217)
at expo.modules.updates.loader.Loader.access$processUpdateManifest(Loader.kt:25)
at expo.modules.updates.loader.Loader$start$1.onSuccess(Loader.kt:116)
at expo.modules.updates.loader.EmbeddedLoader.loadRemoteUpdate(EmbeddedLoader.kt:58)
at expo.modules.updates.loader.Loader.start(Loader.kt:102)
at expo.modules.updates.loader.LoaderTask.launchFallbackUpdateFromDisk(LoaderTask.kt:279)
at expo.modules.updates.loader.LoaderTask.start(LoaderTask.kt:136)
at expo.modules.updates.UpdatesController.start(UpdatesController.kt:395)
at expo.modules.updates.UpdatesController$Companion.initialize(UpdatesController.kt:603
 at com.facebook.react.ReactNativeHost.getReactInstanceManager(
 at$Nest$mhandleBindApplication(Unknown Source:0)
 at android.os.Handler.dispatchMessage(
 at android.os.Looper.loopOnce(
 at android.os.Looper.loop(
 at java.lang.reflect.Method.invoke(Native Method)

Error 2

Failed to download remote update from URL: 
   java.lang.Exception: There are no branches that match the current request

hey @p42nadmin ,

Some background: your app comes bundled with an ‘embedded update’. This is the code that is run from the start. Later on, when the app asks for the newest update from our servers, if there is none to be served or the new update was buggy, we will fall back to the embedded update.

Error 1: you embedded update is crashing, which is why the error says there is ‘no launchable update’. We downloaded your .aab, used bundletool to extract apk, installed apk to emulator, ran it with logcat attached and this is the error log:

FATAL EXCEPTION: create_react_context
                                                                                                    Process:, PID: 8335
                                                                                                    java.lang.IllegalStateException: Native module RNDatePicker tried to override RNDatePicker. Check the getPackages() method in, it might be that module is being created twice. If this was your intention, set canOverrideExistingModule=true. This error may also be present if the package is present only once in getPackages() but is also automatically added later during build time by autolinking. Try removing the existing entry and rebuild.
                                                                                                    	at com.facebook.react.NativeModuleRegistryBuilder.processPackage(
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackage(
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackages(
                                                                                                    	at com.facebook.react.ReactInstanceManager.createReactContext(
                                                                                                    	at com.facebook.react.ReactInstanceManager.-$$Nest$mcreateReactContext(Unknown Source:0)
                                                                                                    	at com.facebook.react.ReactInstanceManager$
2023-08-24 11:46:37.969  8335-8382  dev.expo.updates               E  {"timestamp":1692902797969,"message":"Could not emit Expo.nativeUpdatesStateChangeEvent check event; no event emitter was found.","code":"JSRuntimeError","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.UpdatesUtils.sendEventToReactNative$lambda$4(UpdatesUtils.kt:197)","expo.modules.updates.UpdatesUtils.$r8$lambda$GWsksUGhLIkRuuXJF6UlMYNZXDo(Unknown Source:0)","expo.modules.updates.UpdatesUtils$$ Source:10)","android.os.AsyncTask$SerialExecutor$","java.util.concurrent.ThreadPoolExecutor.runWorker(","java.util.concurrent.ThreadPoolExecutor$",""]}

Error 2: This happens when the app asks the servers for a new update but there is none to be served. The reason is because there is no branch linked to your channel. In our website, you can check that there is no branch linked at[account]/projects/[project]/channels. If you havent already, you can publish an update to your branch (eas update), then link the branch to your channel (eas channel:edit).

Overall: Error 1 is fatal, but Error 2 is not

1 Like

Hey @quinlanj , Thank you so much for your response which is very informative. May you please advise me on what I should do next as I dont know where RNDatePicker has been created twice?

@p42nadmin no problem! As for the RNDatePicker error, I’d recommend checking your dependencies. From a cursory search, if you declare multiple datepicker dependencies they could be trying to overwrite each other: Native module RNDatePicker tried to override RNDatePicker · Issue #787 · react-native-datetimepicker/datetimepicker · GitHub

1 Like

Thank you so much @quinlanj Ive had a look and realised that my package.json file, had multiple date-picker modules in the dependencies`

( "@react-native-community/datetimepicker": “7.2.0”, “react-native-date-picker”: “^4.2.14” & “react-native-datepicker”: “^1.7.2”).

I removed

( "“react-native-date-picker”: “^4.2.14” & “7.2.0” & “react-native-datepicker”: “^1.7.2”`).

I then I cleaned the cache, ran yarn and rebuilt. I then followed what you did and used bundletool to extract apk, installed apk to emulator, ran it with logcat and Im still facing the below issues:

FATAL EXCEPTION: mqt_native_modules
Process:, PID: 10604
The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
at com.facebook.internal.Validate.sdkInitialized(Validate.kt:117)
at com.facebook.appevents.AppEventsLoggerImpl.(AppEventsLoggerImpl.kt:630)
at com.facebook.appevents.AppEventsLoggerImpl.(AppEventsLoggerImpl.kt:70)
at com.facebook.appevents.AppEventsLogger.(AppEventsLogger.kt:106)
at com.facebook.appevents.AppEventsLogger.(Unknown Source:0)
at com.facebook.appevents.AppEventsLogger$Companion.newLogger(AppEventsLogger.kt:357)
at com.facebook.appevents.AppEventsLogger.newLogger(Unknown Source:2)
at com.facebook.reactnative.androidsdk.FBAppEventsLoggerModule.initialize(
at com.facebook.react.bridge.ModuleHolder.doInitialize(
at com.facebook.react.bridge.ModuleHolder.markInitializable(
at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceInitialized(
at com.facebook.react.bridge.CatalystInstanceImpl$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(
at android.os.Looper.loopOnce(
at android.os.Looper.loop(
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$

Hi @p42nadmin

Are you using react-native-fbsdk-next?

Did you install it as per the instructions here?

Note: as with other native modules, although the instructions say you must prebuild, this is not 100% true. Actually, if you are using the Managed workflow, when you run eas build, the build server will automatically run npx expo prebuild. So although it is necessary to prebuild, it is not necessary for you to prebuild.

1 Like

Hi @wodin Thank you for your response, I followed your instructions and my app is working now and did not crash when opened. I really appreciate it

Hey @wodin , quick question do you know how or where I can find infor to solve this below issue I face when building ios?

The Swift pod FirebaseCoreInternaldepends uponGoogleUtilities, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers!globally in your Podfile, or specify:modular_headers => true for particular dependencies.

Hmm… not sure.

There’s stuff about modular_headers here:

1 Like

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