-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
traverseForScrollView
crash with AVPlayer [iOS 17.2 BETA 1]
#1967
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
traverseForScrollView
crash with AVPlayer [iOS 17 BETA 1]traverseForScrollView
crash with AVPlayer [iOS 17.2 BETA 1]
Hi @KrzysztofMoch, thanks for creating this issue! I confirm that this is reproducible. As we've discussed this bug at @software-mansion's mini-conference, as you've said - I suggest to wait on the next iOS 17.2 betas, as the changes that Apple have made may be the cause here (somehow, in iOS 17.0.1 I cannot reproduce this). Also, FYI: when I was debugging this issue I also saw that function |
#1969) ## Description Currently, in iOS 17.2 Beta 1-2 there's a bug that causes application to crash after going to the second screen with the video player that contains controls. This PR fixes this issue. Closes #1967. ## Changes - Added an if statement that returns if view is type of `AVPlayerView`, as we don't want to signal it about decelerating (sadly, this header file is not in UIKit's public API 😕. ## Screenshots / GIFs ### Before https://github.com/software-mansion/react-native-screens/assets/23281839/6d040536-45fb-41ea-ad8a-1c86352bf199 ### After https://github.com/software-mansion/react-native-screens/assets/23281839/6da618e4-2bf9-47fb-be9f-e73ae560f081 ## Test code and steps to reproduce You can test this change on the repro, attached in the original issue: https://github.com/abanobmikaeel/react-native-video-crash/ ## Checklist - [X] Ensured that CI passes
Hi @KrzysztofMoch @udeyrishi @timharding! I'm happy to say that we've released new version of react-native-screens (3.29.0) which has this change included! 🥳 Check it out! If you find something wrong related to the newest version (this change is still buggy or doesn't work for you) let us know 🎉 |
Thank you @tboba -- we'll give it a spin. |
I have updated react-native-screens to 3.29.0 but still my app is crashing. |
@tboba Can you please help me. Following is my package.json
|
@prashant6768 Hi, are there any errors appearing in the console while your app crashes? Also, could you please create a minimal repro that represents your problem? |
No I don't have any error in console while app is crashing. |
@prashant6768 I see that you're using expo in your project. Is your app also crashing on the custom development build (created with |
@prashant6768 based on the snack attached to this issue, this issue is irreproducible in my case - even after switching to another screen I'm not receiving any crash on the previous screen (with video). I can't do too much without further context 🤷 |
@tboba Thanks for looking into this. I really appreciate your time. Following is the link to download my complete repo. I have made this public. So you can directly download it. If you have any problems Please send me your email id. I will give you the access. |
@prashant6768 Thanks! I'll take a look onto this 👍 |
@prashant6768 I see that your project has |
@tboba My react-native-screens version is "react-native-screens": "^3.29.0" in my package.json. Have you recreated the crash on local environment? |
Hi @tboba , I am also facing the same issues even after upgrading my react-native-screens version to 3.29.0. Any clue what else could be the issue? Here's my package.json |
@benedictleekw You are using Expo AV. In Expo AV don't use "useNativeControls" and run it. It will get resolved. |
Hi @prashant6768, sorry for the lack of response from me. |
@tboba Thank you very much for your valuable time. I have resolved my issue. Thanks..... |
software-mansion#1969) ## Description Currently, in iOS 17.2 Beta 1-2 there's a bug that causes application to crash after going to the second screen with the video player that contains controls. This PR fixes this issue. Closes software-mansion#1967. ## Changes - Added an if statement that returns if view is type of `AVPlayerView`, as we don't want to signal it about decelerating (sadly, this header file is not in UIKit's public API 😕. ## Screenshots / GIFs ### Before https://github.com/software-mansion/react-native-screens/assets/23281839/6d040536-45fb-41ea-ad8a-1c86352bf199 ### After https://github.com/software-mansion/react-native-screens/assets/23281839/6da618e4-2bf9-47fb-be9f-e73ae560f081 ## Test code and steps to reproduce You can test this change on the repro, attached in the original issue: https://github.com/abanobmikaeel/react-native-video-crash/ ## Checklist - [X] Ensured that CI passes
@prashant6768 how did you solve the issue?? |
Description
iOS 17.2 beta 1 seems to crashing when using any implementation of
AVPlayer
withreact-native-screens
. Issue occurs only when we are using native controlsSome 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
callstraverseForScrollView
and when we are reaching it, it's throwing error that crash appError Message
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 functionSteps to reproduce
To reproduce this issue we need to install
xcode 15.1 beta 2
and iOS 17.2 sumulator.Steps:
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
The text was updated successfully, but these errors were encountered: