-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Double Modal blocking UI after AppState change #50399
Comments
Tip Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.8. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
Tip Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
Something important to consider: Now, I faced it again (on another project). So, this issue may be there since... 10 years ago. If you find a fix, consider creating a E2E test, in order to avoid having it again in the future 🙏 |
Hi @BrodaNoel, i tried the same reproducer using the Modal example we have in RNTester. However, the issue does not reproduce on RNTester, as you can see in the video below. Could it be that there is something in your code or another library involved that can be cause of the issue? |
@cipolleschi But... Did you actually opened a second (2nd) modal after the app went back to active, as it's mentioned in the steps to reproduce? As far as I see, you closed only 1 modal, so, there were no 2 modals opened there. Something seem to be broken (or maybe you haven't seen the description that mention about 2 modals being opened) |
Please make sure to read carefully the description of the issue. There should be 2 modals opened in some moment. Again, steps to reproduce:
User should be able to close Modal 2 and then Modal 1. Currently, as soon as the code tries to open Modal 2, the modal 2 is not opened, so you still see Modal 1 and you close it. |
@BrodaNoel Modal2 appears for me on Android. I wonder if this is specific to iOS? I don't think you're facing the same issue as me, but dropping a link in case it might be of any help: #50415 (though I'm working primarily on Android) |
I only tested it on iOS |
Oh, I see. The problem here is that, when the you present a new modal, you can only present it in the topmost ViewController.
App should present Modal1, and Modal1 should present Modal2 However, upon resuming the App, the Modal1 is shown, and the App tries to present Modal2, but Modal1 is already presented and iOS prevent Modal2 to be shown. |
Interesting. I'll try a workaround to open Modal 2 only when Modal 1 gets close. Grazie mille! |
Description
Issue already reported on Expo, but seems to be unrelated to Expo
expo/expo#35779
What platform(s) does this occur on?
iOS
Where did you reproduce the issue?
Important considerations
Summary
The app get totally freezed when I do this:
The app will check the AppState change, and it will open the "SECOND" modal. But it will not be shown.
Click on "Close" on the first modal you leaved opened.
Then try to tap on the "Tap here to increment number".
You will see it doesn't increment.
I'm not sure if this is an Expo or React Native error
Environment
Expo Doctor Diagnostics
Steps to reproduce
React Native Version
0.76.7
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@brodanoel/broken-modal
Screenshots and Videos
trim.A98CB7F0-226E-47AD-A8F7-7252E0337976.MOV
The text was updated successfully, but these errors were encountered: