Detox: App is unresponsive after modal dismiss in release build only

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. https://github.com/facebook/react-native/issues/29492#issuecomment-681888873
  2. https://github.com/facebook/flipper/issues/1399
  3. https://github.com/wix/Detox/issues/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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 16

Most upvoted comments

@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 😃