Uiautomator 2 causing issues with «driver.swipe()»

When I start the server with Appium Server GUI the [driver.swipe()] command works correctly but when I start the server inside the terminal (my OS is Macintosh) with the command:
appium -p 4723 --base-path “/wd/hub”
The swipe command does not work here.

The error I get is:

selenium.common.exceptions.WebDriverException: Message: Not implemented

The log I have in the Appium terminal:

[AndroidUiautomator2Driver@bf2d (d110be75)] Calling AppiumDriver.performTouch() with args: [[{"action":"press","options":{"x":668,"y":1254}},{"action" ":"wait","options":{"ms":1654}},{"action":"moveTo","options":{"x":1145,"y":133}},{"action ":"release","options":{}}],"d110be75-f739-4d36-82ee-eb5d30c9b8af"]
[AndroidUiautomator2Driver@bf2d (d110be75)] Encountered internal error running command: NotImplementedError: Not implemented
[AndroidUiautomator2Driver@bf2d (d110be75)] at AndroidUiautomator2Driver.swipe (/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/actions.js:48:11)
[AndroidUiautomator2Driver@bf2d (d110be75)] at AndroidUiautomator2Driver.performTouch (/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/touch.js:226:25)
[AndroidUiautomator2Driver@bf2d (d110be75)] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[HTTP] <-- POST /wd/hub/session/d110be75-f739-4d36-82ee-eb5d30c9b8af/touch/perform 405 17 ms - 531
[HTTP]

Seems the version of uiautomator2 has an issue.
If you are using
appium driver install uiautomator2
to install uiautomator2, then update it by selecting a particual version.
Such as
appium driver install [email protected]
which works on my side without issues.

1 Like

It worked, thanks :heart::pray:

Same issue not working with [email protected]

Delete whatever is the current version on the system:
appium driver uninstall uiautomator2
Install this version:
appium driver install [email protected]
My problem was solved by this method.

1 Like