Driver not found for UiAutomator2

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. 
Response code 500. Message: 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) 
Host info: host: 'SELIM_AHMED_SQA', ip: '[spoiler]172.20.8.115[/spoiler]'
Build info: version: '4.22.0', revision: 'c5f3146703'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.13'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[Capabilities {appium:app: E:\OneDrive - Apsis Solutio..., appium:appActivity: .Settings, appium:appPackage: com.android.settings, appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:deviceId: , appium:deviceName: R58RB1K2ZJT, appium:fullReset: false, appium:newCommandTimeout: 300.0, appium:noReset: true, appium:platformName: Android, appium:platformVersion: 13, appium:systemPort: 8296, appium:udid: R58RB1K2ZJT, platformName: ANDROID}]}]
Capabilities {appium:app: E:\OneDrive - Apsis Solutio..., appium:appActivity: .Settings, appium:appPackage: com.android.settings, appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:deviceId: , appium:deviceName: R58RB1K2ZJT, appium:fullReset: false, appium:newCommandTimeout: 300.0, appium:noReset: true, appium:platformName: Android, appium:platformVersion: 13, appium:systemPort: 8296, appium:udid: R58RB1K2ZJT, platformName: ANDROID}
	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:491)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: 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) 
Host info: host: 'SELIM_AHMED_SQA', ip: '172.20.8.115'
Build info: version: '4.22.0', revision: 'c5f3146703'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.13'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[Capabilities {appium:app: E:\OneDrive - Apsis Solutio..., appium:appActivity: .Settings, appium:appPackage: com.android.settings, appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:deviceId: , appium:deviceName: R58RB1K2ZJT, appium:fullReset: false, appium:newCommandTimeout: 300.0, appium:noReset: true, appium:platformName: Android, appium:platformVersion: 13, appium:systemPort: 8296, appium:udid: R58RB1K2ZJT, platformName: ANDROID}]}]
Capabilities {appium:app: E:\OneDrive - Apsis Solutio..., appium:appActivity: .Settings, appium:appPackage: com.android.settings, appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:deviceId: , appium:deviceName: R58RB1K2ZJT, appium:fullReset: false, appium:newCommandTimeout: 300.0, appium:noReset: true, appium:platformName: Android, appium:platformVersion: 13, appium:systemPort: 8296, appium:udid: R58RB1K2ZJT, platformName: ANDROID}
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
	at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:176)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
	at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:270)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:91)
	at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:99)
	at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:574)
	at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:551)
	at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startMobileDriver(MobileDriverFactory.java:468)
	at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startExistingApp(MobileInspectorController.java:153)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartAndroidApp(MobileLocalAppComposite.java:557)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite.smartStartApp(MobileLocalAppComposite.java:526)
	at com.kms.katalon.composer.mobile.objectspy.components.MobileLocalAppComposite$12$1.call(MobileLocalAppComposite.java:497)
	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

appium driver installed ?

1 Like

Yes I have installed UiAutomator2 properly but still the error shows

Hi @selim.ahmed,

Thank you for letting us know your issue.

I found a similar discussion with solution as a reference here: Katalon return error (Could not find a driver for automationName 'uiautomator2' and platformName 'android'). Please take a look and see if it works

It, works thanks for sharing.

2 Likes