Expo app refuses to launch on Expo Go (Android) but can be built into production

I have an active Expo app that is already published on Play Store and App Store. Usually for development, I use “eas update” then test said app on Expo Go. However, after making minor changes yesterday, suddenly the app cannot be launched on Expo Go on Android. The code changes did not change any dependency or config, rather just some minor UI tweaks.

While loading on Expo Go, the app simply stops on expo splash screen with the text “Checking for new update…” bellow. It freezes without any notices.

Well, the production build runs smoothly and can be published to Play Store without any crashes. I have tried to revert the codes to a previous version before the changes, remove node_modules, reinstall Expo Go on my phone, but none works. Strangely, when I do “eas update” on another Expo app, it works as usual. It seems that the problem only occurs to this Expo app.

Environment:
MacOS 10.15.7
Code 1.77.3
NPM 9.5.0
NodeJS 18.15.0
Expo 18.0.10
EAS 3.10.2
Expo Go 2.28.8
Android 10

package.json:

"dependencies": {
    "@config-plugins/ffmpeg-kit-react-native": "^5.0.0",
    "@react-native-async-storage/async-storage": "1.17.11",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/material-bottom-tabs": "^6.2.12",
    "@react-navigation/native": "^6.1.3",
    "@react-navigation/stack": "^6.3.12",
    "@reduxjs/toolkit": "^1.9.2",
    "@sentry/react-native": "4.13.0",
    "axios": "^1.3.3",
    "expo": "^48.0.10",
    "expo-application": "~5.1.1",
    "expo-av": "~13.2.1",
    "expo-build-properties": "~0.6.0",
    "expo-camera": "~13.2.1",
    "expo-clipboard": "~4.1.2",
    "expo-constants": "~14.2.1",
    "expo-dev-client": "~2.2.1",
    "expo-device": "~5.2.1",
    "expo-file-system": "~15.2.2",
    "expo-image-picker": "~13.3.1",
    "expo-media-library": "~15.0.0",
    "expo-navigation-bar": "~2.1.1",
    "expo-screen-orientation": "~5.1.1",
    "expo-sharing": "~11.2.2",
    "expo-status-bar": "~1.4.4",
    "expo-updates": "~0.16.4",
    "fbjs": "^3.0.4",
    "ffmpeg-kit-react-native": "^5.1.0",
    "moment": "^2.29.4",
    "react": "18.2.0",
    "react-dom": "^18.2.0",
    "react-native": "0.71.7",
    "react-native-gesture-handler": "^2.9.0",
    "react-native-global-props": "^1.1.5",
    "react-native-image-slider-banner": "^1.0.3",
    "react-native-paper": "^5.1.4",
    "react-native-radio-buttons-group": "^2.3.1",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-screens": "~3.20.0",
    "react-native-svg": "13.4.0",
    "react-native-vector-icons": "^9.2.0",
    "react-native-view-shot": "3.5.0",
    "react-native-web": "^0.18.12",
    "react-native-webview": "11.26.0",
    "react-redux": "^8.0.5",
    "redux": "^4.2.1",
    "redux-thunk": "^2.4.2",
    "sentry-expo": "~6.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@expo/webpack-config": "^18.0.4",
    "eslint-plugin-react-hooks": "^4.6.0"
  },
  "private": true,
  "resolutions": {
    "@expo/config-plugins": "^6.0.0"
  }

app.json:

 "updates": {
      "fallbackToCacheTimeout": 0,
      "url": "https://u.expo.dev/6d82d764-b16d-4bb6-9fbf-a7c07928b3d2"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "",
      "buildNumber": "1",
      "userInterfaceStyle": "light",
      "requireFullScreen": true,
      "infoPlist": {
        "NSCameraUsageDescription": "This app ...",
        "NSPhotoLibraryAddUsageDescription": "This app ...",
        "NSPhotoLibraryUsageDescription": "This app ...."
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/favicon.png",
        "backgroundColor": "#212529",
        "backgroundImage": "./assets/favicon.png"
      },
      "icon": "./assets/favicon.png",
      "package": "PACKAGE",
      "permissions": [
        "android.permission.ACCESS_FINE_LOCATION",
        "android.permission.ACCESS_COARSE_LOCATION",
        "android.permission.ACCESS_NETWORK_STATE",
        "android.permission.INTERNET",
        "android.permission.WAKE_LOCK",
        "android.permission.VIBRATE",
        "android.permission.RECEIVE_BOOT_COMPLETED",
        "android.permission.CAMERA",
        "android.permission.READ_EXTERNAL_STORAGE",
        "android.permission.WRITE_EXTERNAL_STORAGE",
        "android.permission.ACCESS_MEDIA_LOCATION",
        "android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"
      ],
      "userInterfaceStyle": "light",
      "versionCode": 39
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      [
        "expo-camera",
        {
          "cameraPermission": "This app needs..."
        }
      ],
      [
        "expo-image-picker",
        {
          "photosPermission": "This app needs ..."
        }
      ],
      [
        "expo-media-library",
        {
          "photosPermission": "This app needs permission...",
          "savePhotosPermission": "This app needs permission...",
          "isAccessMediaLocationEnabled": true
        }
      ],
      [
        "expo-screen-orientation",
        {
          "initialOrientation": "PORTRAIT"
        }
      ],
      "sentry-expo",
      [
        "@config-plugins/ffmpeg-kit-react-native",
        {
          "package": "full-gpl"
        }
      ],
      [
        "expo-build-properties",
        {
          "android": {
            "compileSdkVersion": 31,
            "targetSdkVersion": 31,
            "minSdkVersion": 24,
            "buildToolsVersion": "31.0.0",
            "packagingOptions": {
              "pickFirst": [
                "lib/arm64-v8a/libc++_shared.so",
                "lib/armeabi-v7a/libc++_shared.so",
                "lib/x86/libc++_shared.so",
                "lib/x86_64/libc++_shared.so"
              ]
            }
          },
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ],
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
        }
      ]
    },
    "extra": {
      "eas": {
        "projectId": "EASPROJECTID"
      }
    },
    "runtimeVersion": {
      "policy": "sdkVersion"
    }

hmmm… I’m not sure. Do you see anything if you run adb logcat -d while the phone is connected to your computer with a USB cable?

Thanks for the tips. I got this log

05-03 14:33:45.050 17286 17580 E ReactNativeJS: TypeError: Cannot read property ‘expo_module_name’ of undefined, js engine: hermes

05-03 14:33:45.053 17286 17580 I ReactNativeJS: Running "main

05-03 14:33:45.054 17286 17580 E ReactNativeJS: Invariant Violation: “main” has not been registered. This can happen if:

05-03 14:33:45.054 17286 17580 E ReactNativeJS: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.

05-03 14:33:45.054 17286 17580 E ReactNativeJS: * A module failed to load due to an error and AppRegistry.registerComponent wasn’t called., js engine: hermes

05-03 14:33:45.062 17286 17581 W System.err: java.lang.reflect.InvocationTargetException

05-03 14:33:45.062 17286 17581 W System.err: at java.lang.reflect.Method.invoke(Native Method)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.DefaultJSExceptionHandler.handleException(DefaultJSExceptionHandler.java:70)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:3)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:3)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl.access$1100(CatalystInstanceImpl.java:1)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:3)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:8)

05-03 14:33:45.062 17286 17581 W System.err: at android.os.Looper.loop(Looper.java:225)

05-03 14:33:45.062 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:38)

05-03 14:33:45.062 17286 17581 W System.err: at java.lang.Thread.run(Thread.java:919)

05-03 14:33:45.063 17286 17581 W System.err: Caused by: com.facebook.react.common.JavascriptException: TypeError: Cannot read property ‘expo_module_name’ of undefined, js engine: hermes, stack:

05-03 14:33:45.063 17286 17581 W System.err: EventEmitter@1:635240

05-03 14:33:45.063 17286 17581 W System.err: anonymous@1:2431603

05-03 14:33:45.063 17286 17581 W System.err: loadModuleImplementation@1:67122

05-03 14:33:45.063 17286 17581 W System.err: guardedLoadModule@1:66671

05-03 14:33:45.063 17286 17581 W System.err: metroRequire@1:66299

05-03 14:33:45.063 17286 17581 W System.err: anonymous@1:2416642

05-03 14:33:45.063 17286 17581 W System.err: loadModuleImplementation@1:67122

05-03 14:33:45.063 17286 17581 W System.err: guardedLoadModule@1:66671

05-03 14:33:45.063 17286 17581 W System.err: metroRequire@1:66299

05-03 14:33:45.063 17286 17581 W System.err: anonymous@1:683781

05-03 14:33:45.063 17286 17581 W System.err: loadModuleImplementation@1:67122

05-03 14:33:45.063 17286 17581 W System.err: guardedLoadModule@1:66671

05-03 14:33:45.063 17286 17581 W System.err: metroRequire@1:66299

05-03 14:33:45.063 17286 17581 W System.err: anonymous@1:73455

05-03 14:33:45.063 17286 17581 W System.err: loadModuleImplementation@1:67122

05-03 14:33:45.063 17286 17581 W System.err: guardedLoadModule@1:66628

05-03 14:33:45.063 17286 17581 W System.err: metroRequire@1:66299

05-03 14:33:45.063 17286 17581 W System.err: global@1:65883

05-03 14:33:45.063 17286 17581 W System.err: at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:5)

05-03 14:33:45.063 17286 17581 W System.err: … 10 more

05-03 14:33:45.068 17286 17581 W System.err: java.lang.reflect.InvocationTargetException

05-03 14:33:45.069 17286 17581 W System.err: at java.lang.reflect.Method.invoke(Native Method)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.DefaultJSExceptionHandler.handleException(DefaultJSExceptionHandler.java:70)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:3)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:3)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl.access$1100(CatalystInstanceImpl.java:1)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:3)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:8)

05-03 14:33:45.069 17286 17581 W System.err: at android.os.Looper.loop(Looper.java:225)

05-03 14:33:45.069 17286 17581 W System.err: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:38)

05-03 14:33:45.069 17286 17581 W System.err: at java.lang.Thread.run(Thread.java:919)

05-03 14:33:45.069 17286 17581 W System.err: Caused by: com.facebook.react.common.JavascriptException: Invariant Violation: “main” has not been registered. This can happen if:

05-03 14:33:45.069 17286 17581 W System.err: * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.

05-03 14:33:45.069 17286 17581 W System.err: * A module failed to load due to an error and AppRegistry.registerComponent wasn’t called., js engine: hermes, stack:

05-03 14:33:45.069 17286 17581 W System.err: invariant@1:84870

05-03 14:33:45.069 17286 17581 W System.err: runApplication@1:279093

05-03 14:33:45.069 17286 17581 W System.err: __callFunction@1:93630

05-03 14:33:45.069 17286 17581 W System.err: anonymous@1:92141

05-03 14:33:45.069 17286 17581 W System.err: __guard@1:93078

05-03 14:33:45.069 17286 17581 W System.err: callFunctionReturnFlushedQueue@1:92099

05-03 14:33:45.069 17286 17581 W System.err: at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:5)

05-03 14:33:45.069 17286 17581 W System.err: … 10 more

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: Unhandled SoftException

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by DeviceInfo

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:35)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.modules.deviceinfo.DeviceInfoModule.invalidate(DeviceInfoModule.java:4)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:6)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:35)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:7)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.handleCallback(Handler.java:914)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.dispatchMessage(Handler.java:100)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Looper.loop(Looper.java:225)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:38)

05-03 14:33:45.070 17286 17581 E unknown:ReactContextBaseJavaModule: at java.lang.Thread.run(Thread.java:919)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: Unhandled SoftException

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by NativeAnimatedModule

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:35)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.animated.NativeAnimatedModule.invalidate(NativeAnimatedModule.java:1)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:6)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:35)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:7)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.handleCallback(Handler.java:914)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.dispatchMessage(Handler.java:100)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Looper.loop(Looper.java:225)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:38)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at java.lang.Thread.run(Thread.java:919)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: Unhandled SoftException

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by FrescoModule

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:35)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.modules.fresco.FrescoModule.invalidate(FrescoModule.java:4)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:6)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:35)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:7)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.handleCallback(Handler.java:914)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Handler.dispatchMessage(Handler.java:100)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at android.os.Looper.loop(Looper.java:225)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at abi48_0_0.com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:38)

05-03 14:33:45.073 17286 17581 E unknown:ReactContextBaseJavaModule: at java.lang.Thread.run(Thread.java:919)

05-03 14:33:45.077 17286 17581 D m : WARNING: getPackageName called on ScopedContext

05-03 14:33:45.080 17286 17581 I ExpoModulesCore: :white_check_mark: ModuleRegistry was destroyed

05-03 14:33:45.080 17286 17581 I ExpoModulesCore: :white_check_mark: AppContext was destroyed

05-03 14:33:45.081 17286 17581 I ExpoModulesCore: :white_check_mark: KotlinInteropModuleRegistry was destroyed

The app also doesn’t work on iOS version of Expo Go as well, but instead of freezing like in the Android phone, it force quits immediately without any error prompt.

I’m not sure exactly what’s wrong, but I think you have some sort of JavaScript error in your code.

If you roll back to the version before your minor UI changes, I assume that still works in Expo Go?
What if you then redo one part of the change at a time until it breaks again? That might help to pinpoint the problematic change.