Skip to content
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

App is unresponsive after modal dismiss in release build only #3002

Closed
1 task done
TheMakerOleguch opened this issue Oct 1, 2021 · 16 comments
Closed
1 task done

App is unresponsive after modal dismiss in release build only #3002

TheMakerOleguch opened this issue Oct 1, 2021 · 16 comments

Comments

@TheMakerOleguch
Copy link

TheMakerOleguch commented Oct 1, 2021

Description

After migration to latest detox (17.4.9 -> 18.20.3) app is not responsive after react-native standard modal is dismissed for iOS.
Tried disableSync, disable flipper and It doesn't help. Interesting part is that the issue exists only for ios.sim.release. Debug build works correctly.
We use react-navigation v5 to render stack.
After investigation using XCode debug view hierarchy, seems like modal native wrapper is not cleared after dismiss. That is why elements cannot be touched.
I saw similar issues that were close long time ago.

  1. [IOS] Not able to press on components after closing a modal  facebook/react-native#29492 (comment)
  2. Flipper Layout plugin freezes apps in some cases when using Modals facebook/flipper#1399
  3. Taps do not register on iOS simulator #1224
  • I have tested this issue on the latest Detox release and it still reproduces

Reproduction

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. Run yarn detox test ./src -c ios.sim.release --detectOpenHandles -l fatal --forceExit --workers 1 --retries 3 ios.sim.release
  2. Display react-native standard modal in react-navigation stack
  3. Tap to dismiss modal
  4. Tap any button in the app
  5. Test failed since it cannot tap element

Expected behavior

Elements should be touchable

Environment

  • Detox: 18.20.3
  • React Native: 0.64.2
  • Node: 10
  • Device: iPhone 11 simulator
  • Xcode: 12.5.1
  • iOS: 14.5
  • macOS: Bug Sur
  • Test-runner: jest-circus
@d4vidi
Copy link
Collaborator

d4vidi commented Oct 3, 2021

This sounds like a a result of moving away from EarlGrey onto DetoxSync in Detox 18 vs. 17, which is essentially more strict. I believe you need to find a way to completely dismiss the modal. Strikes me odd that it happens as so; Nevertheless, it's not an issue with Detox.

cc @alon-ha

@losh11
Copy link

losh11 commented Oct 5, 2021

I am experiencing the same bug, but with react-native-modal instead of the standard RN library modal. Are you able to test if this is the same also? This only appeared after updating to RN0.66 and react-navigation v6 (not sure which one caused this).

@TheMakerOleguch
Copy link
Author

@losh11 not sure it's related to RN0.66 or react-navigation v6. I've reproduced issue for RN0.64 and react-nav v5.
As well not sure about react-native-modal, since It's just wrapper around standard one with some tweaks.
@d4vidi It's strange since happens only for release and modal is dismissed in standard way, without some magic :)

@brascene
Copy link

brascene commented Oct 27, 2021

@losh11 I'm facing the same issue and looking for a fix, today I've updated RN to 0.66.1 and react-navigation to v6, and now, whenever I have a Modal component from react-native, after dismissing it (setting visible to false), it opens another transparent modal over full screen and it blocks any further interaction with the app. I've checked the layout inside XCode and there's another UITransitionView at the top of navigation. I'm also not sure is this coming from react-native Modal or from react-navigation...

@losh11
Copy link

losh11 commented Oct 27, 2021

@brascene the fix to this problem is updating 'react-reanimated'.

@brascene
Copy link

@losh11 which version do you have after update? I've installed "react-native-reanimated": "^2.3.0-beta.2", and the issue is still present.

@losh11
Copy link

losh11 commented Oct 27, 2021 via email

@SajevLucksman
Copy link

I'm experiencing the same issue using "react-native-reanimated": "^2.3.0-beta.2" . @losh11 and i couldn't find the version of '2.3.3' react-native-reanimated npm repo shows the latest version as '2.3.0-beta.2'.

@losh11
Copy link

losh11 commented Oct 28, 2021 via email

@brascene
Copy link

@losh11 I've tried with 2.2.3 version, but then I get another issue: Value is undefined, expected an Object, still trying to figure out this one

@losh11
Copy link

losh11 commented Oct 28, 2021 via email

@brascene
Copy link

This is what I can catch
Simulator Screen Shot - iPhone 11 - 2021-10-28 at 12 07 48
h

@stale
Copy link

stale bot commented Nov 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Nov 27, 2021
@stale
Copy link

stale bot commented Dec 4, 2021

The issue has been closed for inactivity.

@stale stale bot closed this as completed Dec 4, 2021
@d4vidi
Copy link
Collaborator

d4vidi commented Dec 5, 2021

@TheMakerOleguch we would appreciate if you put in some extra effort and try to reproduce this over a fork of our DetoxTemplate project.

@d4vidi d4vidi reopened this Dec 5, 2021
@stale stale bot removed the 🏚 stale label Dec 5, 2021
@asafkorem asafkorem self-assigned this Dec 5, 2021
@no-response
Copy link

no-response bot commented Dec 12, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author.

For more information on bots in this reporsitory, read this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants