-
-
Notifications
You must be signed in to change notification settings - Fork 588
Description
Description
iOS 17.2 beta 1 seems to crashing when using any implementation of AVPlayer
with react-native-screens
. Issue occurs only when we are using native controls
Some informations
In new iOS beta (17.2 beta 1) Apple add new UI element to AVPlayer hierarchy

When we are navigating away from screen, react-native-screens
calls traverseForScrollView
and when we are reaching it, it's throwing error that crash app
Error Message
*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty array
Workaround
We can temporarily catch
with "try catch", but it is not a very good solution because in the future we may miss some "important" error
I think we should wait for next iOS release - If this don't get fixed the next step would be to detect if you are in AVPlayer
and if so do not call the function
Steps to reproduce
To reproduce this issue we need to install xcode 15.1 beta 2
and iOS 17.2 sumulator.
Steps:
- Open provided example app
- Wait for video to load
- Navigate away from screen
- Application will crash
Snack or a link to a repository
https://github.com/abanobmikaeel/react-native-video-crash/
Screens version
3.27.0
React Native version
0.72.6
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
Any
Acknowledgements
Yes