Unable to run parallel test for native android app programatically

Description
Im trying to perform parallel mobile automation testing, where the two appium session will be triggered problematically through the script, it was working with me while ago but dont really why its not now not sure maybe be appium version or node version, once the test start the app start on both devices normally and test executed on one emulator then stop and continue on the other device lead to both test are failing it seems that at certain point appium server mixed up and cant differentiate between the two emulator

Environment :

  • Appium 1.15.1:
  • Ubuntu 18.04
  • Node.js 12.11.1
  • Mobile platform Android 10
  • Emulator
  • Appium CLI

Appium logs

org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the 'normalizeTagNames' driver setting to 'true' in order to workaround the problem.

Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘warrior’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘5.0.0-31-generic’, java.version: ‘1.8.0_221’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {appActivity: com.sfdmobile.MainActivity, appPackage: com.sarajevo.food.dictionary, autoGrantPermissions: true, automationName: uiAutomator2, avd: Pixel, clearSystemFiles: true, databaseEnabled: false, desired: {appActivity: com.sfdmobile.MainActivity, appPackage: com.sarajevo.food.dictionary, autoGrantPermissions: true, automationName: uiAutomator2, avd: Pixel, clearSystemFiles: true, deviceName: Pixel, platformName: android, platformVersion: 10, udid: emulator-5556, unlockKey: 0122882435abA, unlockType: password}, deviceApiLevel: 29, deviceManufacturer: Google, deviceModel: Android SDK built for x86, deviceName: emulator-5556, deviceScreenDensity: 560, deviceScreenSize: 1440x2560, deviceUDID: emulator-5556, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, pixelRatio: 3.5, platform: LINUX, platformName: Android, platformVersion: 10, statBarHeight: 84, takesScreenshot: true, udid: emulator-5556, unlockKey: 0122882435abA, unlockType: password, viewportRect: {height: 2308, left: 0, top: 84, width: 1440}, warnings: {}, webStorageEnabled: false}
Session ID: b2c20ca0-d354-4b05-b435-de3f1809ec8d
*** Element info: {Using=xpath, value=//android.widget.TextView[contains(@text, ‘Next’)]}

at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:192)
at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:1)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
at io.appium.java_client.pagefactory.AppiumElementLocator.waitFor(AppiumElementLocator.java:99)
at io.appium.java_client.pagefactory.AppiumElementLocator.findElement(AppiumElementLocator.java:119)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:59)
at io.appium.java_client.android.AndroidElement$$EnhancerByCGLIB$$b598166c.click(<generated>)
at Pages.LandingPage.sign_as_Tourist(LandingPage.java:93)
at Tests.LandingPageTest.Verify_user_can_use_tourist_mode(LandingPageTest.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:584)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.testng.TestRunner.privateRun(TestRunner.java:770)
at org.testng.TestRunner.run(TestRunner.java:591)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:41)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:443)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:67)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the ‘normalizeTagNames’ driver setting to ‘true’ in order to workaround the problem.
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘warrior’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘5.0.0-31-generic’, java.version: ‘1.8.0_221’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {appActivity: com.sfdmobile.MainActivity, appPackage: com.sarajevo.food.dictionary, autoGrantPermissions: true, automationName: uiAutomator2, avd: Pixel, clearSystemFiles: true, databaseEnabled: false, desired: {appActivity: com.sfdmobile.MainActivity, appPackage: com.sarajevo.food.dictionary, autoGrantPermissions: true, automationName: uiAutomator2, avd: Pixel, clearSystemFiles: true, deviceName: Pixel, platformName: android, platformVersion: 10, udid: emulator-5556, unlockKey: 0122882435abA, unlockType: password}, deviceApiLevel: 29, deviceManufacturer: Google, deviceModel: Android SDK built for x86, deviceName: emulator-5556, deviceScreenDensity: 560, deviceScreenSize: 1440x2560, deviceUDID: emulator-5556, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, pixelRatio: 3.5, platform: LINUX, platformName: Android, platformVersion: 10, statBarHeight: 84, takesScreenshot: true, udid: emulator-5556, unlockKey: 0122882435abA, unlockType: password, viewportRect: {height: 2308, left: 0, top: 84, width: 1440}, warnings: {}, webStorageEnabled: false}
Session ID: b2c20ca0-d354-4b05-b435-de3f1809ec8d
*** Element info: {Using=xpath, value=//android.widget.TextView[contains(@text, ‘Next’)]}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
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:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
I am in onTestStart method Verify_user_can_use_tourist_mode start [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getSession() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{}} [debug] [W3C (a2932803)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“Nexus”,“platformVersion”:“10”,“udid”:“emulator-5554”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“emulator-5554”,“platformVersion”:“10”,“udid”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 200 15 ms - 1159 [HTTP] [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getSession() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{}} [debug] [W3C (a2932803)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“Nexus”,“platformVersion”:“10”,“udid”:“emulator-5554”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“emulator-5554”,“platformVersion”:“10”,“udid”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 200 18 ms - 1159 [HTTP] [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getSession() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac] with body: {} [HTTP] --> GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d [HTTP] {} [debug] [W3C (b2c20ca0)] Calling AppiumDriver.getSession() with args: [“b2c20ca0-d354-4b05-b435-de3f1809ec8d”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/3639fdc8-9a78-401e-9533-47b9511b0b9a] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“3639fdc8-9a78-401e-9533-47b9511b0b9a”,“value”:{}} [debug] [W3C (b2c20ca0)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Pixel”,“clearSystemFiles”:true,“deviceName”:“Pixel”,“platformVersion”:“10”,“udid”:“emulator-5556”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Pixel”,“clearSystemFiles”:true,“deviceName”:“emulator-5556”,“platformVersion”:“10”,“udid”:“emulator-5556”,“deviceUDID”:“emulator-5556”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d 200 17 ms - 1159 [HTTP] [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{}} [debug] [W3C (a2932803)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“Nexus”,“platformVersion”:“10”,“udid”:“emulator-5554”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“emulator-5554”,“platformVersion”:“10”,“udid”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 200 22 ms - 1159 [HTTP] [HTTP] --> POST /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element [HTTP] --> POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element [HTTP] {“using”:"-android uiautomator",“value”:“new UiSelector().text(“Visit your favourite venue or discover a new place”)”} [HTTP] {“using”:"-android uiautomator",“value”:“new UiSelector().text(“Visit your favourite venue or discover a new place”)”} [debug] [W3C (a2932803)] Calling AppiumDriver.findElement() with args: ["-android uiautomator",“new UiSelector().text(“Visit your favourite venue or discover a new place”)”,“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [W3C (b2c20ca0)] Calling AppiumDriver.findElement() with args: ["-android uiautomator",“new UiSelector().text(“Visit your favourite venue or discover a new place”)”,“b2c20ca0-d354-4b05-b435-de3f1809ec8d”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’ [debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’ [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8205/wd/hub/session/3639fdc8-9a78-401e-9533-47b9511b0b9a/element] with body: {“strategy”:"-android uiautomator",“selector”:“new UiSelector().text(“Visit your favourite venue or[ discover a new place”)”,“context”:"",“multiple”:false} debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/element] with body: {“strategy”:"-android uiautomator",“selector”:“new UiSelector().text(“Visit your favourite venue or discover a new place”)”,“context”:"",“multiple”:false} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{“ELEMENT”:“adc7fefb-25a3-4c70-95b8-ee296da73484”,“element-6066-11e4-a52e-4f735466cecf”:“adc7fefb-25a3-4c70-95b8-ee296da73484”}} [debug] [W3C (a2932803)] Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“adc7fefb-25a3-4c70-95b8-ee296da73484”,“ELEMENT”:“adc7fefb-25a3-4c70-95b8-ee296da73484”} [HTTP] <-- POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element 200 1422 ms - 137 [HTTP] [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element/adc7fefb-25a3-4c70-95b8-ee296da73484/displayed [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.elementDisplayed() with args: [“adc7fefb-25a3-4c70-95b8-ee296da73484”,“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [WD Proxy] Matched ‘/element/adc7fefb-25a3-4c70-95b8-ee296da73484/attribute/displayed’ to command name ‘getAttribute’ [debug] [WD Proxy] Got response with status 200: {“sessionId”:“3639fdc8-9a78-401e-9533-47b9511b0b9a”,“value”:{“ELEMENT”:“ba720834-4611-4fc4-b6b8-7c5bdcfbea2f”,“element-6066-11e4-a52e-4f735466cecf”:“ba720834-4611-4fc4-b6b8-7c5bdcfbea2f”}} [debug] [W3C (b2c20ca0)] Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“ba720834-4611-4fc4-b6b8-7c5bdcfbea2f”,“ELEMENT”:“ba720834-4611-4fc4-b6b8-7c5bdcfbea2f”} [HTTP] <-- POST /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element 200 1436 ms - 137 [HTTP] [debug] [WD Proxy] Proxying [GET /element/adc7fefb-25a3-4c70-95b8-ee296da73484/attribute/displayed] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/element/adc7fefb-25a3-4c70-95b8-ee296da73484/attribute/displayed] with body: {} [HTTP] --> GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element/ba720834-4611-4fc4-b6b8-7c5bdcfbea2f/displayed [HTTP] {} [debug] [W3C (b2c20ca0)] Calling AppiumDriver.elementDisplayed() with args: [“ba720834-4611-4fc4-b6b8-7c5bdcfbea2f”,“b2c20ca0-d354-4b05-b435-de3f1809ec8d”] [debug] [WD Proxy] Matched ‘/element/ba720834-4611-4fc4-b6b8-7c5bdcfbea2f/attribute/displayed’ to command name ‘getAttribute’ [debug] [WD Proxy] Proxying [GET /element/ba720834-4611-4fc4-b6b8-7c5bdcfbea2f/attribute/displayed] to [GET http://localhost:8205/wd/hub/session/3639fdc8-9a78-401e-9533-47b9511b0b9a/element/ba720834-4611-4fc4-b6b8-7c5bdcfbea2f/attribute/displayed] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:“true”} [debug] [W3C (a2932803)] Responding to client with driver.elementDisplayed() result: true [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element/adc7fefb-25a3-4c70-95b8-ee296da73484/displayed 200 411 ms - 14 [HTTP] [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getSession() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{}} [debug] [W3C (a2932803)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“Nexus”,“platformVersion”:“10”,“udid”:“emulator-5554”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“emulator-5554”,“platformVersion”:“10”,“udid”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 200 11 ms - 1159 [HTTP] [HTTP] --> POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element [HTTP] {“using”:“xpath”,“value”:"//android.widget.TextView[contains(@text, ‘Next’)]"} [debug] [W3C (a2932803)] Calling AppiumDriver.findElement() with args: [“xpath”,"//android.widget.TextView[contains(@text, ‘Next’)]",“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’ [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/element] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[contains(@text, ‘Next’)]",“context”:"",“multiple”:false} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“3639fdc8-9a78-401e-9533-47b9511b0b9a”,“value”:“true”} [debug] [W3C (b2c20ca0)] Responding to client with driver.elementDisplayed() result: true [HTTP] <-- GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element/ba720834-4611-4fc4-b6b8-7c5bdcfbea2f/displayed 200 436 ms - 14 [HTTP] [HTTP] --> GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d [HTTP] {} [debug] [W3C (b2c20ca0)] Calling AppiumDriver.getSession() with args: [“b2c20ca0-d354-4b05-b435-de3f1809ec8d”] [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/3639fdc8-9a78-401e-9533-47b9511b0b9a] with body: {} [debug] [WD Proxy] Got response with status 200: {“sessionId”:“3639fdc8-9a78-401e-9533-47b9511b0b9a”,“value”:{}} [debug] [W3C (b2c20ca0)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Pixel”,“clearSystemFiles”:true,“deviceName”:“Pixel”,“platformVersion”:“10”,“udid”:“emulator-5556”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Pixel”,“clearSystemFiles”:true,“deviceName”:“emulator-5556”,“platformVersion”:“10”,“udid”:“emulator-5556”,“deviceUDID”:“emulator-5556”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d 200 12 ms - 1159 [HTTP] [HTTP] --> POST /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element [HTTP] {“using”:“xpath”,“value”:"//android.widget.TextView[contains(@text, ‘Next’)]"} [debug] [W3C (b2c20ca0)] Calling AppiumDriver.findElement() with args: [“xpath”,"//android.widget.TextView[contains(@text, ‘Next’)]",“b2c20ca0-d354-4b05-b435-de3f1809ec8d”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’ [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8205/wd/hub/session/3639fdc8-9a78-401e-9533-47b9511b0b9a/element] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[contains(@text, ‘Next’)]",“context”:"",“multiple”:false} [WD Proxy] Got an unexpected response with status 500: {“sessionId”:“3639fdc8-9a78-401e-9533-47b9511b0b9a”,“value”:{“error”:“unknown error”,“message”:“Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the ‘normalizeTagNames’ driver setting to ‘true’ in order to workaround the problem.”,“stacktrace”:“io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the ‘normalizeTagNames’ driver setting to ‘true’ in order to workaround the problem.\n\tat io.appium.uiautomator2.core.AccessibilityNodeInfoDumper.findNodes(AccessibilityNodeInfoDumper.java:233)\n\tat io.appium.uiautomator2.utils.ElementLocationHelpers.getXPathNodeMatch(ElementLocationHelpers.java:86)\n\tat io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:100)\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeReque… [debug] [W3C] Matched W3C error code ‘unknown error’ to UnknownError [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{“ELEMENT”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”,“element-6066-11e4-a52e-4f735466cecf”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”}} [debug] [W3C (a2932803)] Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”,“ELEMENT”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”} [HTTP] <-- POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element 200 232 ms - 137 [HTTP] [HTTP] --> POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element/d747bdf8-95d4-4cd3-a4f5-cc9a646fd689/click [HTTP] {“id”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”} [debug] [W3C (a2932803)] Calling AppiumDriver.click() with args: [“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”,“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [WD Proxy] Matched ‘/element/d747bdf8-95d4-4cd3-a4f5-cc9a646fd689/click’ to command name ‘click’ [debug] [WD Proxy] Proxying [POST /element/d747bdf8-95d4-4cd3-a4f5-cc9a646fd689/click] to [POST http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/element/d747bdf8-95d4-4cd3-a4f5-cc9a646fd689/click] with body: {“element”:“d747bdf8-95d4-4cd3-a4f5-cc9a646fd689”} [debug] [W3C (b2c20ca0)] Encountered internal error running command: An unknown server-side error occurred while processing the command. Original error: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the ‘normalizeTagNames’ driver setting to ‘true’ in order to workaround the problem. [debug] [W3C (b2c20ca0)] io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView). Try changing the ‘normalizeTagNames’ driver setting to ‘true’ in order to workaround the problem. [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.core.AccessibilityNodeInfoDumper.findNodes(AccessibilityNodeInfoDumper.java:233) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.utils.ElementLocationHelpers.getXPathNodeMatch(ElementLocationHelpers.java:86) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.handler.FindElement.findElement(FindElement.java:100) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:72) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345) [debug] [W3C (b2c20ca0)] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345) [debug] [W3C (b2c20ca0)] at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435) [debug] [W3C (b2c20ca0)] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [debug] [W3C (b2c20ca0)] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) [debug] [W3C (b2c20ca0)] at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345) [debug] [W3C (b2c20ca0)] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366) [debug] [W3C (b2c20ca0)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352) [debug] [W3C (b2c20ca0)] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911) [debug] [W3C (b2c20ca0)] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) [debug] [W3C (b2c20ca0)] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611) [debug] [W3C (b2c20ca0)] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552) [debug] [W3C (b2c20ca0)] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466) [debug] [W3C (b2c20ca0)] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [debug] [W3C (b2c20ca0)] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140) [debug] [W3C (b2c20ca0)] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [debug] [W3C (b2c20ca0)] at java.lang.Thread.run(Thread.java:919) [debug] [W3C (b2c20ca0)] Caused by: org.jdom2.input.JDOMParseException: Error in building: Ill-formed XML document (missing opening tag for android.widget.TextView) [debug] [W3C (b2c20ca0)] at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:236) [debug] [W3C (b2c20ca0)] at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:253) [debug] [W3C (b2c20ca0)] at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1091) [debug] [W3C (b2c20ca0)] at io.appium.uiautomator2.core.AccessibilityNodeInfoDumper.findNodes(AccessibilityNodeInfoDumper.java:213) [debug] [W3C (b2c20ca0)] … 33 more [debug] [W3C (b2c20ca0)] Caused by: org.xml.sax.SAXException: Ill-formed XML document (missing opening tag for android.widget.TextView) [debug] [W3C (b2c20ca0)] at org.jdom2.input.sax.SAXHandler.endElement(SAXHandler.java:879) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:164) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatParser.appendBytes(Native Method) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:523) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:484) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:322) [debug] [W3C (b2c20ca0)] at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:285) [debug] [W3C (b2c20ca0)] at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217) [debug] [W3C (b2c20ca0)] … 36 more [debug] [W3C (b2c20ca0)] [HTTP] <-- POST /wd/hub/session/b2c20ca0-d354-4b05-b435-de3f1809ec8d/element 500 222 ms - 5151 [HTTP] I am in onTestFailure method Verify_user_can_use_tourist_mode failed [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/screenshot [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getScreenshot() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:null} [debug] [WD Proxy] Matched ‘/screenshot’ to command name ‘getScreenshot’ [debug] [WD Proxy] Proxying [GET /screenshot] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/screenshot] with no body [debug] [W3C (a2932803)] Responding to client with driver.click() result: null [HTTP] <-- POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element/d747bdf8-95d4-4cd3-a4f5-cc9a646fd689/click 200 245 ms - 14 [HTTP] [HTTP] --> GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 [HTTP] {} [debug] [W3C (a2932803)] Calling AppiumDriver.getSession() with args: [“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:“iVBORw0KGgoAAAANSUhEUgAABaAAAAoACAYAAABH9IXPAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N13mFTl+cbx+5xp2zuwLL13REGKUkSsJPZGbFFjwWjU2DXRGBNjotEU\n/amJvWNFY0MULHRUEJDels7C9j7tnN8fKyvDLLBlZmcXvp/r8krmnXPO+8yK7Mw973le49a04bYA\nAAAAAAAAAIgwM9YFAAAAAAAAAAAOTQTQAAAAAAAAAICoIIAGAAAAAAAAAEQFATQAAAAAAAAAICoI\noAEAAAAAAAAAUUEADQAAAAAAAACICgJoAAAAAAAAAEBUEEADAAAAAAAAAKKCABoAAAAAAAAAEBUE\n0AAAAAAAAACAqCCABgAAAAAAAABEBQE0AAAAAAAAACAqCKABAAAAAAAAAFFBAA0AAAAAAAAAiAoC\naAAAAAAAAABAVDhjXQDQWhmGoZTsLPU/dawGn3G8cgb2Unx6imTbkmHUHGTbtceX7NitLd+t0OK3\nP9W6Wd+quqRc9l7PA/VlOkwZDocMw5Bh/vg9om0rGAjICgRjWxwAAAAAAMBejFvThpOAAfVkGIYS\nMlJ1zj/uVO/xI+ROjJexJ2xuANuyVFlYooWvfKBpf35SVtCKQrU4FBiGIVd8nFwJcXLHe+ROiFdc\ncqI8KYnyJCXIHR8nGYaCPr9KduxW2a4CBap98lZUyldRpaA/EOuXAAAAAAAADmME0EA9GIahjC45\n+u3sV+WO9/y06jQCbMvS7vWb9e/xl8lbURWx66L1MgxDTo9bcSlJSsxMU+dhA9R52EB1HjpA7Qf0\n3O95tm3LW1ahvNUbtX72Iq35YoEKNmxVVUmZvOWVzfgKAAAAAAAAahBAAweRmJWum2e9ouR2mY1a\n7VxfViCoO9uNlm… [debug] [UiAutomator2] Getting session details from server to mix in [debug] [WD Proxy] Matched ‘/’ to command name ‘getSession’ [debug] [WD Proxy] Proxying [GET /] to [GET http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac] with body: {} [debug] [W3C (a2932803)] Responding to client with driver.getScreenshot() result: “iVBORw0KGgoAAAANSUhEUgAABaAAAAoACAYAAABH9IXPAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N13mFTl+cbx+5xp2zuwLL13REGKUkSsJPZGbFFjwWjU2DXRGBNjotEU\n/amJvWNFY0MULHRUEJDels7C9j7tnN8fKyvDLLBlZmcXvp/r8krmnXPO+8yK7Mw973le49a04bYA\nAAAAAAAAAIgwM9YFAAAAAAAAAAAOTQTQAAAAAAAAAICoIIAGAAAAAAAAAEQFATQAAAAAAAAAICoI\noAEAAAAAAAAAUUEADQAAAAAAAACICgJoAAAAAAAAAEBUEEADAAAAAAAAAKKCABoAAAAAAAAAEBUE\n0AAAAAAAAACAqCCABgAAAAAAAABEBQE0AAAAAAAAACAqCKABAAAAAAAAAFFBAA0AAAAAAAAAiAoC\naAAAAAAAAABAVDhjXQDQWhmGoZTsLPU/dawGn3G8cgb2Unx6imTbkmHUHGTbtceX7NitLd+t0OK3\nP9W6Wd+quqRc9l7PA/VlOkwZDocMw5Bh/vg9om0rGAjICgRjWxwAAAAAAMBejFvThpOAAfVkGIYS\nMlJ1zj/uVO/xI+ROjJexJ2xuANuyVFlYooWvfKBpf35SVtCKQrU4FBiGIVd8nFwJcXLHe+ROiFdc\ncqI8KYnyJCXIHR8nGYaCPr9KduxW2a4CBap98lZUyldRpaA/EOuXAAAAAAAADmME0EA9GIahjC45\n+u3sV+WO9/y06jQCbMvS7vWb9e/xl8lbURWx66L1MgxDTo9bcSlJSsxMU+dhA9R52EB1HjpA7Qf0\n3O95tm3LW1ahvNUbtX72Iq35YoEKNmxVVUmZvOWVzfgKAAAAAAAAahBAAweRmJWum2e9ouR2mY1a\n7VxfViCoO9uNlm0d+quh9wSs7sT4Jl/Ltm3ZQUu+qmoFff4IVBc7hmHI4XYpJTtLXY4epIE/P049\nxwxVQk… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/screenshot 200 1074 ms - 230118 [HTTP] [debug] [WD Proxy] Got response with status 200: {“sessionId”:“f1c53593-c64f-444e-8724-25e3f2055aac”,“value”:{}} [debug] [W3C (a2932803)] Responding to client with driver.getSession() result: {“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“Nexus”,“platformVersion”:“10”,“udid”:“emulator-5554”},“platformName”:“android”,“appActivity”:“com.sfdmobile.MainActivity”,“appPackage”:“com.sarajevo.food.dictionary”,“unlockKey”:“0122882435abA”,“unlockType”:“password”,“autoGrantPermissions”:true,“automationName”:“uiAutomator2”,“avd”:“Nexus”,“clearSystemFiles”:true,“deviceName”:“emulator-5554”,“platformVersion”:“10”,“udid”:“emulator-5554”,“deviceUDID”:“emulator-5554”,“deviceApiLevel”:29,“deviceScreenSize”:“1440x2560”,“deviceScreenDensity”:560,“deviceModel”:“Android SDK built for x86”,… [HTTP] <-- GET /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794 200 910 ms - 1159 [HTTP] [HTTP] --> POST /wd/hub/session/a2932803-a6da-406c-9ac6-703cc83ab794/element [HTTP] {“using”:“xpath”,“value”:”//android.widget.TextView[contains(@text, ‘Next’)]”} [debug] [W3C (a2932803)] Calling AppiumDriver.findElement() with args: [“xpath”,”//android.widget.TextView[contains(@text, ‘Next’)]",“a2932803-a6da-406c-9ac6-703cc83ab794”] [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’ [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8205/wd/hub/session/f1c53593-c64f-444e-8724-25e3f2055aac/element] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[contains(@text, ‘Next’)]",“context”:"",“multiple”:false} Screenshot captured for test case:Verify_user_can_use_tourist_mode

Code To Reproduce Issue

`public class BaseSetup {

public static AndroidDriver driver = null;
protected AppiumDriverLocalService service;
public WebDriverWait wait;

@Parameters({“deviceName”,“platformVersion”,“udid”,“URL_”,“Sport”,“deviceId”,“sysPort”,“bootStrap”,“wdaPort”,“path”})
@BeforeMethod(alwaysRun = true)
public void setUp (String deviceName, String platformVersion, String udid, String URL_, String Sport, String deviceId, String sysPort, String bootStrap, String wdaPort, String path) throws Exception {

System.out.println("Driver Is Initiated");
DesiredCapabilities dc = new DesiredCapabilities();

// Mobile setup
dc.setCapability(MobileCapabilityType.DEVICE_NAME, deviceName);
dc.setCapability(MobileCapabilityType.UDID, udid);
dc.setCapability("platformName", "Android");
dc.setCapability(MobileCapabilityType.PLATFORM_VERSION, platformVersion);
dc.setCapability(AndroidMobileCapabilityType.AVD,deviceName);

dc.setCapability("appium:unlockType", "password");
dc.setCapability("appium:unlockKey", "0122882435abA");
dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiAutomator2");

// Application setup
dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "");
dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "");

dc.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,"true");
dc.setCapability(MobileCapabilityType.CLEAR_SYSTEM_FILES, true);


// Driver configuration
int port = Integer.parseInt(Sport); //need when use function .using
service = AppiumDriverLocalService
        .buildService(new AppiumServiceBuilder()
                .usingDriverExecutable(new File("/usr/bin/node"))
                .withAppiumJS(new File("/home/linuxbrew/.linuxbrew/lib/node_modules/appium/build/lib/main.js"))
                .withArgument(Arg.ADDRESS,URL_)
                .withArgument(Arg.PORT,Sport)
                .withArgument(Arg.CALLBACKPORT,Sport)
                .withArgument(Arg.WDALOCALPORT,wdaPort)
                .withArgument(Arg.BootstrapPort,bootStrap)
     .withArgument(Arg.SESSIONOVERRIDE));
service.start();

driver = new AndroidDriver (new URL("http://"+URL_+":"+Sport+"/wd/hub"), dc);  

@AfterSuite
public void cleanUp() throws InterruptedException {
if (driver != null)
driver.quit();
service.stop();
System.out.println(“Driver quit”);

}
}

public static AndroidDriver driver = null;

means ALL tests use same ONE drive. this is not correct.

Can you please clarify more what then it should be since im not sure.

Also issue has been solved by changing bootstrap to 100 and 200 it seems that ones i was using are out of the actual range

@Amrkamel1 it should be thread safe variable to work with parallel tests:

private ThreadLocal<AppiumDriver> driver = new ThreadLocal<>();
1 Like