iOS app crashes instantly in TestFlight, never in Simulator

When I upload my iOS app to TestFlight, install it, and run it, it flashes the splash screen and then crashes. The app works with npm run ios in simulators and on my phone through XCode, no problems. The only crash report I can see in XCode from TestFlight says:

#2	0x100d31198 in -[EXAppViewController maybeShowError:] ()
#3	0x100d50998 in handleFatalReactError_block_invoke_2 ()

I’ve looked all over for a solution, but there just isn’t enough info to go on here. I’ve even tried changing the Scheme in XCode from Debug to Release, and it still works fine in XCode.

  "dependencies": {
    "@react-native-community/masked-view": "0.1.6",
    "algoliasearch": "^4.2.0",
    "axios": "^0.19.2",
    "babel-plugin-module-resolver": "^4.0.0",
    "expo": "^37.0.8",
    "expo-barcode-scanner": "~8.1.0",
    "expo-image-picker": "~8.1.0",
    "expo-updates": "~0.1.0",
    "firebase": "7.9.0",
    "formik": "^2.1.4",
    "numeral": "^2.0.6",
    "prop-types": "^15.7.2",
    "react": "~16.9.0",
    "react-dom": "16.9.0",
    "react-instantsearch-native": "^6.4.0",
    "react-native": "~0.61.5",
    "react-native-elements": "^1.2.7",
    "react-native-formik": "^1.7.8",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-keyboard-aware-scrollview": "^2.1.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-material-textfield": "^0.16.1",
    "react-native-qrcode-svg": "^6.0.3",
    "react-native-reanimated": "~1.7.0",
    "react-native-safe-area-context": "0.7.3",
    "react-native-screens": "~2.2.0",
    "react-native-svg": "^12.1.0",
    "react-native-unimodules": "~0.9.0",
    "react-native-web": "^0.11.7",
    "react-native-webview": "8.1.1",
    "react-navigation": "^4.3.5",
    "react-navigation-stack": "^2.3.9",
    "react-navigation-tabs": "^2.8.11",
    "recompose": "^0.30.0",
    "tipsi-stripe": "^7.5.3",
    "yup": "^0.28.3"
  },
1 Like

This happened to me if I:

  • forgot to expo publish before running the build that I then uploaded to TestFlight (using fastlane)
  • thought I had published the expo bundle but actually published an older version with a bug
  • didn’t upgrade sentry-expo to the latest version

The sentry-expo upgrade was the actual fix for me, but the first two items masked that fact, because the bundle in the app that I uploaded to TestFlight crashed the app before it could get far enough to download the updated bundle without the bug.

1 Like

I don’t see sentry-expo in your dependencies, but I’d launch console.app on your Mac with your device attached and see if there’s an unhandled JavaScript exception in the logs.

2 Likes

Thanks for the quick feedback. Running expo publish didn’t help. (As a side note, you don’t need to run expo publish whenever you upload a new build to the App Store right? At least the Expo documentation doesn’t seem to say it.)

When I looked at console.app I see:

Unhandled JS Exception: TypeError: null is not an object (evaluating 'A.init')

Still kind of enigmatic; any ideas on this?

I did see a similar exception at launch (evaluating StripeModule.init) because of using expo-payments-stripe in the Managed Workflow, but I saw the same error in simulators at the time, plus I changed to tipsi-stripe since then.

I finally found the problem: I was using expo build:ios on an ejected app.

I am facing same issue, is there any fix on that issue?