Detox: [ANDROID] Error performing 'single click'

Created on 5 Oct 2018  路  13Comments  路  Source: wix/Detox

Description

When tapping on a simple element I get "Error performing single click".
It works perfectly on iOS.
Also the button I am trying to click is plain and not supposed to be hidden by anything

await element(by.id('help')).tap();

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 9.0.4
  • React Native: 0.57.1
  • Node: 10.7.0
  • Device: Any device (Genymotion)
  • Xcode: 10.0
  • macOS: 10.13.6

Device and verbose Detox logs

detox[62085] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"invoke","params":{"target":{"type":"Class","value":"com.wix.detox.espresso.EspressoDetox"},"method":"perform","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"android.support.test.espresso.Espresso"},"method":"onView","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForTestId","args":["help"]}}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"android.support.test.espresso.action.ViewActions"},"method":"click","args":[]}}]},"messageId":4}
detox[62085] TRACE: [DetoxServer.js/MESSAGE] role=tester action=invoke (sessionId=76655d6f-d9da-6604-9b0e-070d9e104391)
detox[62085] TRACE: [DetoxServer.js/MESSAGE] role=testee action=error (sessionId=76655d6f-d9da-6604-9b0e-070d9e104391)
detox[62085] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"error","params":{"error":"Error performing 'single click - At Coordinates: 1251, 1858 and precision: 16, 16' on view '(with tag value: is \"help\" and view has effective visibility=VISIBLE)'."},"messageId":4}
馃彋 stale

Most helpful comment

Still waiting to hear if this will be resolved. We can't move forward utilizing detox for android if we can't even "click" to login to the app and perform the functions.

All 13 comments

Can you supply a project which recreates this issue ?
P.S. Detox was not tested with RN57 yet

Any updates on getting detox up and running with 57?

Soon庐 馃槃

Same issue, works great with IOS, fails on Android :( Really hoping we can get this working quickly!

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.

Still waiting to hear if this will be resolved. We can't move forward utilizing detox for android if we can't even "click" to login to the app and perform the functions.

I'm getting the same. On IOS it works, but on android it crashes.
This is RN .57. I'm not sure if it works on .56 as we never had our tests running on android...

Here is the log output:

detox[85972] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 85984]: /Users/xx/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:54826 -e detoxSessionId 80ef283d-9519-a64d-1acc-3cb79de016ee -e debug false com.xxx.android.react.xxx.test/android.support.test.runner.AndroidJUnitRunner
detox[85972] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=80ef283d-9519-a64d-1acc-3cb79de016ee
detox[85972] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 85984]: /Users/xx/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:54826 -e detoxSessionId 80ef283d-9519-a64d-1acc-3cb79de016ee -e debug false com.xxx.android.react.xxx.test/android.support.test.runner.AndroidJUnitRunner

 Error: Error: Error while updating property 'region' of a view managed by: AIRMap
      at Client.execute (node_modules/detox/src/client/Client.js:80:28)
      at InvocationManager.execute (node_modules/detox/src/invoke.js:11:33)
      at ActionInteraction.execute (node_modules/detox/src/android/expect.js:116:29)
      at Element.tap (node_modules/detox/src/android/expect.js:196:63)
      at Context.it.only (e2e/firstTest.spec.js:187:54)



child_process.js:662
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.release --loglevel verbose   --reuse  --grep :ios: --invert     --artifacts-location "artifacts/android.emu.release.2019-01-08 11-29-32Z"
    at checkExecSyncError (child_process.js:622:11)
    at Object.execSync (child_process.js:659:13)
    at runMocha (/Apps/xxx/source/node_modules/detox/local-cli/detox-test.js:129:6)
    at run (/Apps/xxx/source/node_modules/detox/local-cli/detox-test.js:82:7)
    at Object.<anonymous> (/Apps/xxx/source/node_modules/detox/local-cli/detox-test.js:217:1)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)

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.

It's really disappointing that this is not being addressed :(

Detox runs internally at Wix on RN57.8 successfully.
Can you provide a project that demonstrates this issue? (as requested in October).
Help us help you...

Not sure if this helps the case but I was having similar issue on android.
The visibility test for my login button was passing when the app starts:
await waitFor(element(by.id('loginButton').and(by.id('userId')).and(by.text('NEXT')))).toBeVisible().withTimeout(5000)

Then after typing the field when it was time to click loginButton it was failing and Error performing 'single click' was happening:
await element(by.id('userId')).typeText('someUserId')
await element(by.id('loginButton')).tap()

I noticed the keyboard coming up and the button was not visible anymore. Added scrolling code. For my case I scrolled down to the end to ensure the visibility of the button:
await element(by.id('loginPageScroll')).scrollTo('bottom');

And it passed.
I'm fairly new to E2E test automation. Just trying to help and I hope it does :)

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.

The issue has been closed for inactivity.

Was this page helpful?
0 / 5 - 0 ratings