App runs fine locally but hangs on splash screen after deploying to TestFlight

Hi all,

Running into an issue after upgrading Expo (to SDK 36) and react-navigation (to 4.0.10).

I’m able to run my project locally using the iPhone simulator and on a device via Expo client, but when I launch the application distributed via TestFlight (using the .ipa generated by Expo), I get stuck on the splash screen.

Upon further investigation from looking at logs in Console with my device plugged in, the following error is thrown when launching the application:

Invariant Violation: requireNativeComponent: "RNCSafeAreaView" was not found in the UIManager.

This error is located at:
    in RNCSafeAreaView
    in Unknown
    in Unknown
    in n
    in Unknown
    in Unknown
    in C
    in p
    in RCTView
    in RCTView
    in l
    in RCTView
    in n
    in RCTView
    in n
    in _
    in C
    in p
    in p
    in C
    in P
    in c
    in f
    in y
    in Unknown
    in RCTView
    in RCTView
    in h

I ran npm ls react-native-safe-area-view to see which packages are dependent on react-native-safe-area-view, and the following output was this:

├── react-native-safe-area-view@1.0.0
├─┬ react-navigation@4.0.10
│ └─┬ @react-navigation/native@3.6.2
│   └── react-native-safe-area-view@0.14.8
└─┬ react-navigation-tabs@2.7.0
  └── react-native-safe-area-view@0.14.8

so I’m assuming that the problem is related to react-navigation.

My dependencies:

    "expo-cli": "3.7.11",
    "@react-native-community/masked-view": "^0.1.6",
    "expo": "^36.0.2",
    "react": "16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
    "react-native-reanimated": "~1.4.0",
    "react-native-safe-area-context": "0.6.0",
    "react-native-safe-area-view": "1.0.0",
    "react-native-screens": "2.0.0-alpha.12",
    "react-navigation": "^4.0.10",
    "react-navigation-drawer": "^2.3.3",
    "react-navigation-stack": "^2.0.15",
    "react-navigation-tabs": "^2.7.0",

What could be causing the delta between what I’m running locally vs. whats bundled into the .ipa?

Thanks,
Jason

Found the problem… I had upgraded react-navigation V3 -> V4, Expo SDK 34 -> 36, and react-native-safe-area-view 0.14.8 -> 1.0.

In our project, we have an app.json we use for development and one we use at build time (our ci machine does find and replace on certain fields e.g. build/version number and sets them accordingly). The problem mentioned above was caused by not updating the expo sdk field from 34 -> 36 in the app.json we use at build time. So what happened was I was using sdk36 locally but actually built our artifacts using sdk34. When running Expo sdk <= 34, react-native-safe-area-view should be 0.14.8, but we had set it to 1.0.0 in package.json.

Simple mistake but hope this provides closure.

Thanks,
Jason

1 Like

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