Katalon return error (Could not find a driver for automationName 'uiautomator2' and platformName 'android')

When I am trying to start mobile recorder or spy
I faced this error
Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’.

when run this
‘appium driver list --installed’
I found below
√ Listing installed drivers

  • uiautomator2@2.45.0 [installed (npm)]

(Lower-level error: Could not find installed driver to support given caps)
at getResponseForW3CError (C:\Users\alaa.abdelghafar\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\protocol\errors.js:1118:9)
at asyncHandler (C:\Users\alaa.abdelghafar\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\protocol\protocol.js:491:57)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘FIS-1004’, ip: ‘192.168.1.18’, os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: SwipeableAndroidDriver

I tried to edit project capabilities and nothing happened need support.

1 Like

Install the uiAutomator2 manually:

  • Please help to go to your terminal and run the below command to download the uiAutomator2:

appium driver install uiautomator2

1 Like

I have same problem. Katalon return the error. Normally I can use normally appium and uiautomator2 with appium inspector. I did again appium driver install uiautomator2. Everything is normal. But I cannot handle this problem.
when run this
‘appium driver list --installed’
I found below
uiautomator2@3.0.4 [installed (npm)]

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘192.168.1.81’, ip: ‘fe80:0:0:0:428:81fa:ec0:2f2c%en0’, os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.4’, java.version: ‘17.0.7’

Driver info: driver.version: SwipeableAndroidDriver

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

at getResponseForW3CError (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1118:9)

at asyncHandler (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:491:57)

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘192.168.1.81’, ip: ‘fe80:0:0:0:428:81fa:ec0:2f2c%en0’, os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.4’, java.version: ‘17.0.7’

Driver info: driver.version: SwipeableAndroidDriver

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)

at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12.run(MobileLocalAppComposite.java:488)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘192.168.1.81’, ip: ‘fe80:0:0:0:428:81fa:ec0:2f2c%en0’, os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.4’, java.version: ‘17.0.7’

Driver info: driver.version: SwipeableAndroidDriver

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

at getResponseForW3CError (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1118:9)

at asyncHandler (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:491:57)

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘192.168.1.81’, ip: ‘fe80:0:0:0:428:81fa:ec0:2f2c%en0’, os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.4’, java.version: ‘17.0.7’

Driver info: driver.version: SwipeableAndroidDriver

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)

at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)

at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.execute(SwipeableAndroidDriver.java:1)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)

at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)

at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:85)

at com.kms.katalon.core.appium.driver.SwipeableAndroidDriver.(SwipeableAndroidDriver.java:23)

at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:560)

at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:542)

at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:467)

at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startExistingApp(MobileInspectorController.java:148)

at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:500)

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)

at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)

… 2 more

Caused by: java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)

… 22 more

Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘192.168.1.81’, ip: ‘fe80:0:0:0:428:81fa:ec0:2f2c%en0’, os.name: ‘Mac OS X’, os.arch: ‘aarch64’, os.version: ‘14.4’, java.version: ‘17.0.7’

Driver info: driver.version: SwipeableAndroidDriver

remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘uiautomator2’ and platformName ‘android’. Have you installed a driver that supports those capabilities? Run ‘appium driver list --installed’ to see. (Lower-level error: Could not find installed driver to support given caps)

at getResponseForW3CError (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1118:9)

at asyncHandler (/opt/homebrew/Cellar/appium/2.5.1/libexec/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:491:57)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)

at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)

at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)

… 26 more

The following does the trick in Terminal:
appium driver install uiautomator2

don’t use the UIAutomator 3.x version, I recommend using the 2.4x version instead. From version 3.x , Appium have some breaking change make the 3.x cannot use with KS.

1 Like

When I tried your suggestion (downgraded uiautomator2 → 2.4x), There is no change. Are there any other suggestions? thanks in aadvance.

appium driver list --installed
:heavy_check_mark: Listing installed drivers

  • xcuitest@7.9.1 [installed (npm)]
  • uiautomator2@2.45.1 [installed (npm)]

Guys, I solved the problem. As you know, we install Appium globally. When we install the drivers (uiautomator2) with npm on a Mac computer, it is written into the .appium/node_modules/.cash/appium/extensions.yaml file (not global). The problem here is that the extensions.yaml file under npm-global is empty. When I copy the contents of this file into the .npm-global/node_modules/.cash/appium/extensions.yaml file, it works fine.

You don’t need to set APPIUM_HOME if you don’t want to! By default, Appium will set APPIUM_HOME to the directory .appium in your user home directory.

These installed packages will be managed by extensions.yaml in $APPIUM_HOME/node_modules/.cache/appium/extensions.yaml.

Hi,

It is great to hear that you have solved your issue. Thank you for sharing your steps to resolve it. If it is all done now, please help mark the solution for this topic. Thank you