Description
The app crashes on iOS with the following error message:
[__NSArrayM insertObject:atIndex:]: object cannot be nil
Expected Behavior
The app should handle null or undefined objects gracefully and not attempt to insert a nil object into an array.
Actual Behavior
When repeatedly moving between screens (e.g., navigating forward and then back), the app eventually crashes with the error above.
Environment
Platform: iOS
React Native Version: 0.80.2
iOS Version: iOS 18.3
Device: iPhone 16 Pro Simulator
Package version: 3.4.2
Steps to Reproduce
- Launch the app on an iOS device or simulator.
- Navigate from Screen A → Screen B.
- Go back to Screen A.
- Repeat the process a few times.
Observe that the app crashes with the message:
[__NSArrayM insertObject:atIndex:]: object cannot be nil
Crash Log / Stack Trace
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Crash Video Link
https://drive.google.com/file/d/1orGmmZmEBDKJZhNSpQWhd1QLsAPN1F7Q/view?usp=sharing
Description
The app crashes on iOS with the following error message:
[__NSArrayM insertObject:atIndex:]: object cannot be nilExpected Behavior
The app should handle null or undefined objects gracefully and not attempt to insert a nil object into an array.
Actual Behavior
When repeatedly moving between screens (e.g., navigating forward and then back), the app eventually crashes with the error above.
Environment
Platform: iOS
React Native Version: 0.80.2
iOS Version: iOS 18.3
Device: iPhone 16 Pro Simulator
Package version: 3.4.2
Steps to Reproduce
Observe that the app crashes with the message:
[__NSArrayM insertObject:atIndex:]: object cannot be nilCrash Log / Stack Trace
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Crash Video Link
https://drive.google.com/file/d/1orGmmZmEBDKJZhNSpQWhd1QLsAPN1F7Q/view?usp=sharing