Setup configuration:
uiautomator2 version : 2.35.0
appium version : 2.3.0
webdriverio version : 8.15.0
node version : 16.18.0
Code block that's causing issue:
touchActionAPI:browser.touchAction([ { action: "press", x: xStart, y: yStart }, { action: "wait", ms: speed }, { action: "moveTo", x: xFinish, y: yFinsh }, { action: "release" } ])touchPerformAPI:browser.touchPerform([ { action: "press", options: { x: xStart, y: yStart } }, { action: "wait", options: { ms: speed } }, { action: "moveTo", options: { x: xFinish, y: yFinsh } }, { action: "release", options: {} } ])
Error:
VError: a BeforeAll hook errored, process exiting: node_modules/test-package/dist/test-steps.js:66: Not implemented
at Runtime.runTestRunHooks (/tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/@cucumber/cucumber/lib/runtime/run_test_run_hooks.js:23:23)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Runtime.start (/tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/@cucumber/cucumber/lib/runtime/index.js:53:9)
at async runCucumber (/tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/@cucumber/cucumber/lib/api/run_cucumber.js:106:21) {
jse_shortmsg: 'a BeforeAll hook errored, process exiting: node_modules/test-package/dist/test-steps.js:66',
jse_cause: unknown method: Not implemented
at getErrorFromResponseBody (file:///tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/webdriver/build/utils.js:194:12)
at NodeJSRequest._request (file:///tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/webdriver/build/request/index.js:164:23)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Browser.wrapCommandFn (file:///tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/@wdio/utils/build/shim.js:72:29)
at async Browser.wrapCommandFn (file:///tmp/scratchTyFrlT.scratch/test-packageo45mGa/node_modules/test-package/node_modules/@wdio/utils/build/shim.js:72:29),
jse_info: {},
cause: [Function: ve_cause]
}
I suspect a bug in latest version of Appium driver
uiautomator2, as I am also seeing this issue. Solved by installing older version ofuiautomator2, as described in: Uiautomator 2 causing issues with «driver.swipe()». This post mentions using v2.29.4, I've found up to v2.29.11 works. My experiments reveal duping bug in v2.30.0 - latest (v2.35.0).Steps to fix, on your Appium server: