io.appium.uiautomator2.common.exceptions.NoSuchDriverException
dipakkumar1225 opened this issue · 0 comments
dipakkumar1225 commented
Description
Yesterday it is working fine. But today I am getting error message
org.openqa.selenium.NoSuchSessionException: The session identified by 29d06f45-a489-44de-a010-dfa411eb8d3e is not known
Build info: version: '4.19.1', revision: 'abe0ee07dc'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
Environment
- Java client build version : 9.2.1
- Appium server version: 2.3.0
- Desktop OS/version used to run Appium: Windows 10
- Node.js version : v18.18.0
- Mobile platform/version under test: Android
- Real device or emulator/simulator: Moto Edge 30
Code To Reproduce Issue [ Good To Have ]
public class AppTest {
@AndroidFindBy(accessibility = "open menu")
private WebElement webElementOpenMenu;
@Test
public void demaoTest() {
AppiumDriverLocalService appiumDriverLocalService = null;
AppiumDriver appiumDriver = null;
try {
appiumDriverLocalService = AppiumDriverLocalService.buildService(new AppiumServiceBuilder()
.withIPAddress("127.0.0.1")
.usingPort(4723)
.withArgument(GeneralServerFlag.RELAXED_SECURITY)
.withArgument(GeneralServerFlag.SESSION_OVERRIDE)
.withArgument(GeneralServerFlag.USE_DRIVERS, "uiautomator2")
.withArgument(GeneralServerFlag.BASEPATH, "/wd/hub/")
.withArgument(GeneralServerFlag.LOG_LEVEL, "info:debug")
.withTimeout(Duration.ofSeconds(180)));
appiumDriverLocalService.start();
UiAutomator2Options uiAutomator2Options = new UiAutomator2Options()
.setAutomationName(AutomationName.ANDROID_UIAUTOMATOR2)
.setApp(System.getProperty("user.dir" + File.separator + "app" + File.separator + "android" + File.separator + "Android-MyDemoAppRN.1.3.0.build-244.apk"))
.setFullReset(false)
.setNoReset(true)
.setPlatformName("android")
.setPlatformVersion("13")
.setUdid("ZD222CJSXB")
.setAppPackage("com.saucelabs.mydemoapp.rn")
.setAppActivity("com.saucelabs.mydemoapp.rn.MainActivity");
appiumDriver = new AndroidDriver(appiumDriverLocalService.getUrl(), uiAutomator2Options);
PageFactory.initElements(new AppiumFieldDecorator(appiumDriver, Duration.ofSeconds(30)), this);
webElementOpenMenu.click();
} finally {
appiumDriver.quit();
appiumDriverLocalService.stop();
}
}
}
Link To Appium Logs
Please find the complete log:
https://gist.github.com/dipakkumar1225/0d5ddc800282375d9cb77b6468d62af1
Log for the above attached sample code:
https://gist.github.com/dipakkumar1225/5401087916d0cbb83b6f1ed9c3b31638