user1791914
user1791914

Reputation: 626

React Native app crashes immediately on iOS TestFlight

I hate to ask a question this open-ended, but I'm asking after 4 straight days of trial, error and pure desperation.

My question is:

Are there any un-obvious "gotchas" for bundling a React Native app for TestFlight? Because my app crashes on launch, but only in TestFlight. The crash reports only show RCTFatal (screenshot below).

My RN (0.54) build includes CodePush for my JS bundle, I use a Release scheme / Production certificate scheme when archiving follow all of the directions from CodePush/React Native. The app works, but not when packaged. Any idea, or best guesses what could be the case?

Update:

It's throwing an error when I run my Release Scheme on simulator:

Update (2): The conversation has been moved to chat: https://chat.stackoverflow.com/rooms/170610/discussion-on-question-by-user1791914-react-native-app-crashes-immediately-on-io

Update (3): This issue is still relevant, but I've opened up a separate question as debugging as revealed more info: React Native bundle error for Release, Babel not working?

React Native / Babel isn't compiling spread operators correctly, so this is a config issue that needs sorted.

Unhandled JS Exception: Unexpected token '...'.

Is this a Babel spread operator error?

enter image description here

Upvotes: 3

Views: 2360

Answers (1)

user1791914
user1791914

Reputation: 626

So this turned out to be a syntax/js issue after all and had nothing to do with my build. I had an instance with

{...props.children} which should have been {props.children}

in one of my jsx files. This was causing really inconsistent results with the app crashing in some cases and not in others. It also led me on a wile goose chase trying to reconfigure babel and my release build as the Debug build was handling the error silently.

Upvotes: 2

Related Questions