Expo iOS TestFlight crashes on startup

Expo Diagnostics : Expo CLI 4.10.1 environment info:
OS: macOS 11.2.3
Shell: 5.8 - /bin/zsh
Node: 16.0.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.17.0 - /usr/local/bin/npm
CocoaPods: 1.10.1 - /usr/local/bin/pod
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 31
Build Tools: 31.0.0
System Images: android-26 | Google Play Intel x86 Atom
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
expo: ^42.0.0 => 42.0.3
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
react-native-web: ^0.17.1 => 0.17.1
expo-cli: 4.10.1
Expo Workflow: managed

Hello guys,

I work on an react native application managed with Expo. Up to here, all works fine. My releases with TestFlight works fine but today I face to a new problem. All my builds on TestFlight crashes on startup. At the beginning, I was thinking about an error from me, but when I try to reinstall my old builds (I’m sure they works because I tested it) the application face to the same bug. So, my theory is, my TestFlight release is going to fetch an Apple Server and he can’t maybe(I know Apple has some issues yesterday and today)… So it crashes… DO you have an idea or do you think Apple is the problem ?

There is my crashes log from TestFlight, I verified it it’s the same crashes on my old builds than on my last builds.

I have new informations on crashes, I get this logs on all of my builds :

Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
    "<NSLayoutConstraint:0x281394af0 V:|-(>=0)-[UIImageView:0x121d05150]   (active, names: '|':UIView:0x11fd156f0 )>",
    "<NSLayoutConstraint:0x281394b90 V:[UIImageView:0x121d05150]-(10)-[UIView:0x11fd156f0]   (active)>"

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x281394b90 V:[UIImageView:0x121d05150]-(10)-[UIView:0x11fd156f0]   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
BackgroundSession <B601EDD8-BACA-4FF5-8715-E0ECABBACBF1> connection to background transfer daemon invalidated

Invariant Violation: Native module cannot be null.

Unhandled JS Exception: Invariant Violation: Native module cannot be null.

you’re attempting to use a library that either isn’t installed or hasn’t been properly set up.

Yeah that’s logic… But I tried to eject my project and set it with bare workflow and it’s worsk fine… That’s really interesting because all of my previous working builds crashes on startup…

Perhaps you published to the same channel as your apps on testflight. Note that expo build automatically publishes by default.

I don’t use expo build, I used expo build:ios and I download my ipa and upload it via transporter to appstore connect. What do you mean about channels ?

expo build:ios (or expo build:android) is what I meant. That explains it then. You changed the code to require some new dependency not supported by the managed workflow and then ran expo build:ios. That caused the new JavaScript to be published, breaking your app on TestFlight when it did an OTA update.

See Release Channels and Advanced Release Channels

Ohhhh Okay it’s insane !! And the OTA updates are supported by the bare workflow ?

Yes, OTA updates are supported in the Bare workflow. See the installation instructions here:

My bug is still here… This is my package.json

  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  "dependencies": {
    "@expo/vector-icons": "^12.0.5",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/netinfo": "6.0.0",
    "@react-native-firebase/app": "^12.3.0",
    "@react-navigation/native": "^5.9.8",
    "@react-navigation/stack": "^5.14.5",
    "@stripe/stripe-react-native": "0.1.4",
    "expo": "^42.0.0",
    "expo-constants": "~11.0.1",
    "expo-notifications": "~0.12.3",
    "expo-permissions": "~12.1.1",
    "expo-status-bar": "~1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
    "react-native-animated-nav-tab-bar": "^3.1.4",
    "react-native-awesome-alerts": "^1.5.2",
    "react-native-extra-dimensions-android": "^1.2.5",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-material-chip": "^1.0.2",
    "react-native-modal-overlay": "^1.3.1",
    "react-native-paper": "^4.9.2",
    "react-native-popup-confirm-toast": "^2.0.2",
    "react-native-progress": "^5.0.0",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-reanimated": "^2.2.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-status-bar-height": "^2.6.0",
    "react-native-tags": "^2.2.0",
    "react-native-vector-icons": "^8.1.0",
    "react-native-web": "^0.17.1",
    "react-navigation": "^4.4.4"
  "devDependencies": {
    "@babel/core": "~7.9.0"
  "private": true

Maybe it’s the stripe react native package that causes this bug ? This is the package I added when it the bug appears. This is really interesting because this bug is only in production mode… With expo go or standalone build on my simulator it works very well…

If you’re building @stripe/stripe-react-native into a standalone iOS app you need to use EAS Build (or build it locally, e.g. with eas build --local)

1 Like

Yeahhh that’s solution ! I miss to read this line ! Thank you very much for your help !
And what’s the explanation ? Why build the project locally will be good for stripe ? And not with the expo build:ios ? What’s the differences ?

1 Like

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

@stripe/stripe-react-native includes native code. expo build does not supoort custom native code. For that you use eas build (or eas build --local)

1 Like