I have ten test suites, each containing 30 test cases. After creating a test suite collection and executing it, I sometimes encounter a “No driver found” exception, which causes some test cases to fail.
The “No driver found” error occasionally appears in test cases along with the following exceptions:
=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: ‘POST /appium/device/press_keycode’ cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
An unknown server-side error occurred while processing the command. Original error: ‘POST /appium/device/press_keycode’ cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
Build info: version: ‘4.22.0’, revision: ‘c5f3146703’
System info: os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: io.appium.java_client.android.AndroidDriver
Command: [f7335cb2-1e83-42ed-8734-8afb6aa89779, executeScript {script=mobile: pressKey, args=[{keycode=4}]}]
Capabilities {appium:appActivity: .Settings, appium:appPackage: com.android.settings, appium:autoGrantPermissions: true, appium:automationName: uiautomator2, appium:databaseEnabled: false, appium:desired: {appActivity: .Settings, appPackage: com.android.settings, autoGrantPermissions: true, automationName: uiautomator2, deviceId: , deviceName: Xiaomi 24117RN76G (Android 14), newCommandTimeout: 1800, platformName: ANDROID, platformVersion: 14, systemPort: 8290, udid: 5dxkpzw4cyy9vgkf}, appium:deviceApiLevel: 34, appium:deviceId: , appium:deviceManufacturer: Xiaomi, appium:deviceModel: 24117RN76G, appium:deviceName: 5dxkpzw4cyy9vgkf, appium:deviceScreenDensity: 450, appium:deviceScreenSize: 1080x2400, appium:deviceUDID: **************, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:newCommandTimeout: 1800, appium:pixelRatio: 2.8125, appium:platformVersion: 14, appium:statBarHeight: 104, appium:systemPort: 8290, appium:takesScreenshot: true, appium:udid: 5dxkpzw4cyy9vgkf, appium:viewportRect: {height: 2296, left: 0, top: 104, width: 1080}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Session ID: f7335cb2-1e83-42ed-8734-8afb6aa89779
at jdk.internal.reflect.GeneratedConstructorAccessor66.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:591)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:305)
at io.appium.java_client.CommandExecutionHelper.execute(CommandExecutionHelper.java:36)
at io.appium.java_client.CommandExecutionHelper.executeScript(CommandExecutionHelper.java:67)
at io.appium.java_client.android.nativekey.PressesKey.pressKey(PressesKey.java:40)
at com.kms.katalon.core.mobile.keyword.builtin.PressBackKeyword$_pressBack_closure1.doCall(PressBackKeyword.groovy:44)
at com.kms.katalon.core.mobile.keyword.builtin.PressBackKeyword$_pressBack_closure1.call(PressBackKeyword.groovy)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:30)
… 24 more