-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Modal make iOS app freeze when visible #32504
Comments
|
I am also facing the same issue. |
Temporarily fix for me was to change Reanimated 2.3.0@beta_1 to Reanimated 2.2.4. Further reading with similar problem (crash instead of freeze): https://githubmemory.com/repo/react-native-modal/react-native-modal/issues/615. I noticed that if i used react natives Modal component it crashed, and when i used the react-native-modal packgage it freezed the screen after close. My dependencies: |
@Hollum I'm now using a Portal component as a Modal. It's working fine. but Modal of react native's also important. Hope them fix it soon |
Same problem. Seems to only freezing IOS simulator, not the mobile Expo go app or web app in dev mode. on EXPO sdk41 |
same issue here as well, |
same issue here |
same issue here as well currently using 2.3.0@beta_2 |
Downgrading to 2.2.3 version fixed my issue. |
is your RN version using 0.66.0 as well? because last time when i tried using 0.66.0 with 2.2.3 it's pretty unstable / unusable (on my current app) |
I have experienced this issue as well with From my testing, my particular issue comes from usage of I am unsure why upgrading RN from 0.64 to 0.66 caused the invisible modal issue to become more prominent for my app. |
hi - i'm not using |
interesting, so the issue seems related with the Modal itself then, i thought it was combination between |
seems like it, but I haven't come across anyone else with this issue that isn't using reanimated in their project dependencies. |
Still an issue on "react-native-reanimated": "2.2.4" and "react-native": "0.66.3" |
1.- downgrading react-native-reanimated to this solved my problem |
For now, the only work around I see here is, if platform is iOS then set modal's visibility flag after some finite delay, say 1000ms, using setTimeout else simply set modal's visibility without any delay. In my use case, I am using react-navigation 4x, react-native-reanimated v1.x on react-native 0.64.x. I was trying to show modal as soon as my parent component is mounted based on some conditions and it was react-navigation's transition animations conflicting the Modal animations causing my app to freeze. Refer to the following code snippet and see if it helps.
PS: I know this is a dirty workaround, if anybody found/finds a solution please quote a reply with it. |
hey guys, can you try to update "react-native": "0.66.4",
"react-native-reanimated": "^2.3.1", so far i never got report of any modal freezes from users anymore except if there's any 2 modals trying to show in the same exact time. |
It took me several hours for me to realise that. Thanks god I'm not the only one :) |
Hey guys, any update on this issue. This could be definitely issue with react-native. We not using react-native-reanimated and react-native-modal in our app. With custom modal component, the app is getting freeze when closing Modal component after updating react-native to v0.66.3. Same was working fine with RN v0.64. And we are facing this issue only in some of iPad Pro modals but working fine while testing in iPad, iPad Mini devices. |
@mindira5 Same issue here, using a custom modal component and react-native v0.67 the app is getting freeze. |
@mindira5 I got a fix in my application, adding in my custom modal component the state to manage the visibility instead of using only a props. It's working well now.
|
@nickolasmdasilva In my app, we are already using the state to manage the visibility |
Just trying to solve this ourselves and see other related issues that aren't linked here yet for the curious: |
rendering the modal with a portal fixed the issue for me |
Well I did it but recently I realize sometime portal is freeze on android |
Still an issue for me: The case:
├─ react-native-modal@12.1.0
├─ react-native-reanimated@2.8.0
└─ react-native@0.68.2 UPD:
-import { createNativeStackNavigator } from '@react-navigation/native-stack';
+import { createStackNavigator } from '@react-navigation/stack';
-<Modal isVisible={isVisible} />
+{isVisible ? <Modal/> : null} |
This is still an issue, happens when:
My app is build around component , and this bug makes it's unusable. I don't understand how this is not yet fixed , few years this issue is present and there is no working solution. The |
i faced this issue on expo SDK 47 while using Modal from 'react-native' (0.70.2), sadly nothing above has worked for me, i ended up using
|
Don't know the reason how this worked, I'm using like 3 modals in One screen, but only one modal was causing the problem while other two were working just fine don't know how.... but using setTimeout() method I was able to fix that one modal issue. |
I have a similar issue with 3 modals. using setTimeout() I show first one, then 2s later another and 2s later the last one. Closing the first, shows the second one successfully and I can interact with it. But closing the second one will not show the last one and now the app is frozen on the main screen.. on Android it works fine, all the Modals are showing on top of each other. |
ios 17 apps minimize then maximize happen |
as in, when closing first modal, the second one (queued up) will still show after the first gets minimized? |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
This is still happening in version 0.71.16 when you use |
I'm facing the same issue on IOS |
I faced this issue today with a component getting a function among its props and containing a Modal, like this: What worked for me was setting this https://reactnative.dev/docs/modal#presentationstyle-ios to Also, I found a post in SO saying that using |
Description
I faced this for from react native version 0.65 till now. Open a modal then close it make app freeze on both actual iOS device and simulator. When I install to new simulator or new ios device, it's fine to oepn modal on first time, but when reopen app, It makes app freeze again.
Version
0.66.1
Output of
react-native info
OS: macOS 11.2.3
CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
Memory: 49.63 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.11 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.1 => 0.66.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Open a modal then close it make app freeze on both actual iOS device and simulator, sometime can tap to view inside modal, sometime not, app is freeze. Also when modal was closed, it still make app freeze
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: