React native app crash on TestFlight

Good day everyone.

I have a react native app which works on dev mode on my device - Iphone 13 pro version: 18.5, but when deployed to TestFlight and installed on same device it crashes when ever I click on any TextInput. I downloaded the crash file but finding it difficult to pinpoint the problem.

I want to know what the problem is, if it's related to an installed package or code base or any other.

Any help will be appreciated!!!

Thanks.

Answered by DTS Engineer in 850654022

There are limits to how much I can help you with your third-party tooling; if you need help with those, I recommend that you raise this via the support channel for those tools. Still, I wanted to offer some insight into the overall issue here.

Both of your crash reports suggest that you have a memory management issue. You’re crashing deep in Apple libraries as they try to work with Objective-C objects. I have a couple of suggestions on that front.

First, you’re encountering this problem on TestFlight but it’s unlikely to be TestFlight related. I suspect that it’s actually tied to your Debug vs Release build configuration. When you test at your desk you use the Debug build configuration, but when you submit to the App Store you use the Release build configuration. It’s very common to see memory management problems like this show up only in the Release configuration.

You can tease these apart using the Xcode organiser. See Isolating Code Signing Problems from Build Problems.

You can also tweak your project to build and run the Release build by default. To do that, choose Product > Scheme > Edit Scheme and, select Run on the left, switch to the Info tab, and choose Release from the Build Configuration popup.

The debugger won’t work well in the Release build configuration, but if it reproduces the crash then that’s progress.

My second suggestion is to deploy the standard memory debugging tools. If this is a memory management issue, these can help to make the problem more reproducible, and hence more debuggable.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

And this is the initial crash log I got before editing and trying or sorts of solutions relating to the problem I saw on Stack overflow.

There are limits to how much I can help you with your third-party tooling; if you need help with those, I recommend that you raise this via the support channel for those tools. Still, I wanted to offer some insight into the overall issue here.

Both of your crash reports suggest that you have a memory management issue. You’re crashing deep in Apple libraries as they try to work with Objective-C objects. I have a couple of suggestions on that front.

First, you’re encountering this problem on TestFlight but it’s unlikely to be TestFlight related. I suspect that it’s actually tied to your Debug vs Release build configuration. When you test at your desk you use the Debug build configuration, but when you submit to the App Store you use the Release build configuration. It’s very common to see memory management problems like this show up only in the Release configuration.

You can tease these apart using the Xcode organiser. See Isolating Code Signing Problems from Build Problems.

You can also tweak your project to build and run the Release build by default. To do that, choose Product > Scheme > Edit Scheme and, select Run on the left, switch to the Info tab, and choose Release from the Build Configuration popup.

The debugger won’t work well in the Release build configuration, but if it reproduces the crash then that’s progress.

My second suggestion is to deploy the standard memory debugging tools. If this is a memory management issue, these can help to make the problem more reproducible, and hence more debuggable.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The first crash report you posted looks to be associated with a bug in UIKit - note that your app crashed because of an uncaught ObjC exception "-[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: 0x20eaf0f68)", and that the "Last Exception Backtrace" shows that -[__NSDictionaryM setObject:forKey:] was called by a chain of UIKit methods.

I expect this is resolved in the latest iOS 26 beta.

See here for general guidance on interpreting crash reports generated because of uncaught exceptions: https://developer.apple.com/documentation/xcode/addressing-language-exception-crashes

React native app crash on TestFlight
 
 
Q