Detox: Detox 19.3.0 causes "View is not hittable at its visible point" failures

Description

I’m on Detox 19.1.0. Upgrading to 19.2.0 works just fine and I’ve got a nice green run of my 120 tests. If I further bump to 19.3.0 then I get a large amount of failures (20+) all with the same error:

DetoxRuntimeError: Test Failed: View is not hittable at its visible point. Error: Failed to hit view at point {992, 197} with `hitTest`.
- Origin view: <UIView: 0x7fa90e910b90; frame = (0 0; 1024 1366); autoresize = W+H; layer = <CALayer: 0x600000d31320>>
- Absolute origin: {0, 0}
- Hitten: <UIView: 0x7fa90e910b90; frame = (0 0; 1024 1366); autoresize = W+H; layer = <CALayer: 0x600000d31320>>
- Target view: <RCTImageView: 0x7fa91cfccb30; reactTag: 923; frame = (290 16; 32 32); clipsToBounds = YES; layer = <CALayer: 0x600000d2f220>>
- Relative point: {992, 197}
  • 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. Upgrade to Detox 19.3.0

Expected behavior

Screenshots / Video

Environment

  • Detox: 19.3.0
  • React Native: 0.65.1
  • Node: 12.13.0
  • Device: iPad Mini 6th Generation (15.0) & iPad Pro 12.9-inch (5th Generation)
  • Xcode: 13.0
  • iOS: 11.0
  • macOS: 11.6 Big Sur
  • Test-runner (select one): jest-circus

Logs

Device and verbose Detox logs

  • I have run my tests using the --loglevel trace argument and am providing the verbose log below:

https://gist.github.com/Vannevelj/ee918001bffc5ae4c794cd76f398cff8

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 26 (15 by maintainers)

Most upvoted comments

I see the same error also on Detox 20.0.1.

After closing an alert on iOS, I can’t tap on anything anymore.

So it looks like it is broken again.

   Test Failed: View is not hittable at its visible point. Error: Failed to hit view with identifier `doSearch` at point {194.99999237060547, 714.33334350585938} with hit-test
    - Origin view: <UIView: 0x7f9e50b24db0; frame = (0 0; 390 844); autoresize = W+H; layer = <CALayer: 0x6000004c50a0>>
    - Absolute origin: {0, 0}
    - Hitten: <UIView: 0x7f9e50b24db0; frame = (0 0; 390 844); autoresize = W+H; layer = <CALayer: 0x6000004c50a0>>
    - Target view: <RCTView: 0x7f9e4ffa1870; reactTag: 5085; frame = (69.3333 20; 251.333 51.3333); backgroundColor = UIExtendedSRGBColorSpace 0.0117647 0.6 0.890196 1; layer = <CALayer: 0x6000004dd0a0>>
    - Relative point: {194.99999237060547, 714.33334350585938}

@d4vidi It seems that this new hittability-check mechanism is incompatible with FullWindowOverlay from react-native-screens.

I’m currently using

"react-native": "0.69.7",
"react-native-screens": "^3.18.2",
 "detox": "^20.0.3"

Thanks @avanderberg, I understand the issue you’re having and I’m able to reproduce this. I’m working on a fix for this bug 🙂

Hey @asafkorem @d4vidi – no worries, I totally understand more information is needed. I don’t have much time left until the holiday break so unfortunately Detox 19.3.0 has taken a backseat compared to other work. I’ll try to provide the info you asked for but at least this thread is out there for others to chime in if they see the same thing. I fully appreciate the work you’ve put into Detox, it’s made my life a lot easier.

Not sure what happened, ours one was working fine just few days back. But now I am getting the same error that my login button’s view is not hittable. I am not getting the hittable issue on local though. My current detox version is “detox”: “^19.9.2”, and jest is “jest”: “^26.6.3”

@Vannevelj Can you please try to add the target button a testID and access the button element it by its ID (and not by its text)?

Sorry for the delayed response, I’m back in the office now. The test as it was already targetted via the testID. I’ve just given it a try and bumping my test suite to 19.4.1 passes without an issue – I know you’ve reverted the changes but just wanted to pass that on.

I get the same error when I execute a test with Detox version 19.3.1:

    DetoxRuntimeError: Test Failed: View is not hittable at its visible point. Error: Failed to hit view at point {187.5, 136.5} with `hitTest`.
    - Origin view: <UIView: 0x7fe16d0d7320; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x600000da0500>>
    - Absolute origin: {0, 0}
    - Hitten: <UIView: 0x7fe16d0d7320; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x600000da0500>>
    - Target view: <RCTView: 0x7fe16d1fda90; reactTag: 2043; frame = (0 0; 375 44); layer = <CALayer: 0x600000d8c760>>
    - Relative point: {187.5, 136.5}

I get the issue after this screen is displayed: Simulator Screen Shot - iPhone 8 - 2021-12-23 at 20 18 06

The steps the Detox test executes are:

  • open this Security screen
  • tap on the link “Unpair your device”
  • tap on “Cancel” (see screenshot), this closes the dialog
  • tap on the link “Unpair your device” again. This step fails with the DetoxRuntimeError above.

I notice that after the tap on Cancel that closes the dialog, the app does not react to the first tap on the Security screen. Only a second tap on the “Unpair your device” link opens the dialog again. I can reproduce this behavior when I tap with my mouse manually.

The test works fine with Detox version 18.23.1. When I use this old version, then tapping manually works fine as well.

Android is not affected by this issue.

I use

  • React Native: 0.65.1
  • Node: 14.18.2
  • Device: iPhone 8 simulator
  • Xcode: 13.2.1
  • iOS: 15.2
  • macOS: 12.1
  • Test-runner (select one): jest-circus