Process crashed while executing startServer - Please Help!

Android Real Device Automation (8.0.0)
Appium 1.8.0 Beta 3
Macbook Pro - 10.13.2 (High Sierra)
Python 2.7.10
Node - v8.11.1

Code:
WebDriverWait(self.driver2,1000).until(
lambda driver: driver.find_elements(By.XPATH, “//android.widget.TextView[@text=‘some_text’]”) or driver.find_elements(By.XPATH, “//android.widget.TextView[@text=‘someother_text’]”))

Error Output:

debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“xpath”,"//android.widget.TextView[@text=‘Transfer Completed’]",“2b86a2e5-9c71-4a17-9773-5900758d22a2”]
[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] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8210/wd/hub/session/63fca503-d99e-4a55-b476-96240cf51b8e/elements] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Transfer Completed’]",“context”:"",“multiple”:true}
[debug] [JSONWP Proxy] Got response with status 200: {“sessionId”:“63fca503-d99e-4a55-b476-96240cf51b8e”,“status”:0,“value”:[]}
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/elements 200 186 ms - 74
[HTTP]
[HTTP] --> POST /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/elements
[HTTP] {“using”:“xpath”,“sessionId”:“2b86a2e5-9c71-4a17-9773-5900758d22a2”,“value”:"//android.widget.TextView[@text=‘Change messaging app’]"}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“xpath”,"//android.widget.TextView[@text=‘Change messaging app’]",“2b86a2e5-9c71-4a17-9773-5900758d22a2”]
[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] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8210/wd/hub/session/63fca503-d99e-4a55-b476-96240cf51b8e/elements] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Change messaging app’]",“context”:"",“multiple”:true}
[debug] [JSONWP Proxy] Got response with status 200: {“sessionId”:“63fca503-d99e-4a55-b476-96240cf51b8e”,“status”:0,“value”:[]}
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/elements 200 524 ms - 74
[HTTP]
[HTTP] --> POST /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/elements
[HTTP] {“using”:“xpath”,“sessionId”:“2b86a2e5-9c71-4a17-9773-5900758d22a2”,“value”:"//android.widget.TextView[@text=‘Transfer Completed’]"}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“xpath”,"//android.widget.TextView[@text=‘Transfer Completed’]",“2b86a2e5-9c71-4a17-9773-5900758d22a2”]
[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] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8210/wd/hub/session/63fca503-d99e-4a55-b476-96240cf51b8e/elements] with body: {“strategy”:“xpath”,“selector”:"//android.widget.TextView[@text=‘Transfer Completed’]",“context”:"",“multiple”:true}
[MJSONWP] Encountered internal error running command: {“w3cStatus”:400,“jsonwp”:{“sessionId”:“63fca503-d99e-4a55-b476-96240cf51b8e”,“status”:13,“value”:“io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: error while invoking method android.view.accessibility.AccessibilityNodeInfo android.support.test.uiautomator.QueryController.getRootNode() on object android.support.test.uiautomator.QueryController@cd6484d with parameters []\n\tat io.appium.uiautomator2.utils.ReflectionUtils.invoke(ReflectionUtils.java:93)\n\tat io.appium.uiautomator2.core.QueryController.getAccessibilityRootNode(QueryController.java:37)\n\tat io.appium.uiautomator2.model.XPathFinder.getRootAccessibilityNode(XPathFinder.java:241)\n\tat io.appium.uiautomator2.model.XPathFinder.refreshUiElementTree(XPathFinder.java:225)\n\tat io.appium.uiautomator2.model.XPathFinder.getNodesList(XPathFinder.java:117)\n\tat io.appium.uiautomator2.handler.FindElements.getXPathUiObjects(FindElements.java:61)\n\tat io.appium.uiautomator2.handler.FindElements.findElements(FindElements.java:140)\n\tat io.appium.uiautomator2.handler.FindElements.safeHandle(FindElements.java:85)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:56)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:219)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:210)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)\n\tat
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)\n\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)\n\tat
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)\n\tat java.lang.Thread.run(Thread.java:764)\nCaused by: java.lang.reflect.InvocationTargetException\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat io.appium.uiautomator2.utils.ReflectionUtils.invoke(ReflectionUtils.java:89)\n\t… 37 more\nCaused by: java.lang.IllegalStateException: Cannot perform this action on a sealed instance.\n\tat android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)\n\tat android.view.accessibility.AccessibilityNodeInfo.setConnectionId(AccessibilityNodeInfo.java:2875)\n\tat android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfo(AccessibilityInteractionClient.java:817)\n\tat android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfos(AccessibilityInteractionClient.java:835)\n\tat android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:308)\n\tat android.view.accessibility.AccessibilityInteractionClient.getRootInActiveWindow(AccessibilityInteractionClient.java:165)\n\tat android.app.UiAutomation.getRootInActiveWindow(UiAutomation.java:479)\n\tat android.support.test.uiautomator.UiAutomatorBridge.getRootInActiveWindow(UiAutomatorBridge.java:82)\n\tat android.support.test.uiautomator.QueryController.getRootNode(QueryController.java:170)\n\t… 39 more\n”}} ProxyRequestError: Could not proxy command to remote server. Original error: 500 - {“sessionId”:“63fca503-d99e-4a55-b476-96240cf51b8e”,“status”:13,“value”:“io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: error while invoking method android.view.accessibility.AccessibilityNodeInfo android.support.test.uiautomator.QueryController.getRootNode() on object android.support.test.uiautomator.QueryController@cd6484d with parameters []\n\tat io.appium.uiautomator2.utils.ReflectionUtils.invoke(ReflectionUtils.java:93)\n\tat io.appium.uiautomator2.core.QueryController.getAccessibilityRootNode(QueryController.java:37)\n\tat
io.appium.uiautomator2.model.XPathFinder.getRootAccessibilityNode(XPathFinder.java:241)\n\tat io.appium.uiautomator2.model.XPathFinder.refreshUiElementTree(XPathFinder.java:225)\n\tat io.appium.uiautomator2.model.XPathFinder.getNodesList(XPathFinder.java:117)\n\tat io.appium.uiautomator2.handler.FindElements.getXPathUiObjects(FindElements.java:61)\n\tat io.appium.uiautomator2.handler.FindElements.findElements(FindElements.java:140)\n\tat io.appium.uiautomator2.handler.FindElements.safeHandle(FindElements.java:85)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:56)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:219)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:210)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)\n\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)\n\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)\n\tat java.lang.Thread.run(Thread.java:764)\nCaused by: java.lang.reflect.InvocationTargetException\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat io.appium.uiautomator2.utils.ReflectionUtils.invoke(ReflectionUtils.java:89)\n\t… 37 more\nCaused by: java.lang.IllegalStateException: Cannot perform this action on a sealed instance.\n\tat android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)\n\tat android.view.accessibility.AccessibilityNodeInfo.setConnectionId(AccessibilityNodeInfo.java:2875)\n\tat android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfo(AccessibilityInteractionClient.java:817)\n\tat android.view.accessibility.AccessibilityInteractionClient.finalizeAndCacheAccessibilityNodeInfos(AccessibilityInteractionClient.java:835)\n\tat android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:308)\n\tat android.view.accessibility.AccessibilityInteractionClient.getRootInActiveWindow(AccessibilityInteractionClient.java:165)\n\tat android.app.UiAutomation.getRootInActiveWindow(UiAutomation.java:479)\n\tat android.support.test.uiautomator.UiAutomatorBridge.getRootInActiveWindow(UiAutomatorBridge.java:82)\n\tat android.support.test.uiautomator.QueryController.getRootNode(QueryController.java:170)\n\t… 39 more\n”}
[MJSONWP] at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:152:13)
[MJSONWP] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke]
(/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[HTTP] <-- POST /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/elements 500 50 ms - 5520
[HTTP]
[HTTP] --> GET /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/screenshot
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getScreenshot() with args: [“2b86a2e5-9c71-4a17-9773-5900758d22a2”]
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8210/wd/hub/session/63fca503-d99e-4a55-b476-96240cf51b8e/screenshot] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{“sessionId”:“63fca503-d99e-4a55-b476-96240cf51b8e”,“status”:0,“value”:"iVBORw0KGgoAAAANSUhEUgAABDgAAAisCAIAAAAiJcX5AAAAA3NCSVQICAjb4U\/gAAAgAElEQVR4\nnOzdd3wc5Z04\/mfK7mzvRdJKWnWrWbLcC65gA6YaQodAIARI7nK5AMn3uEvySy6XBELuUgnpoSWU\nEEOosSkuuOIqYbmo97LaXW2vM\/P7Y6zxapt2V23X\/rxf\/IFHW54djaT5PM\/n+Xww4RNvIwAAAAAA\nAADIJvh8DwAAAAAAAAAAokGgAgAAAAAAAMg6EKgAAAAAAAAAsg4EKgAAAAAAAICsA4EKAAAAAAAA\nIOtAoAIAAAAAAADIOhCoAAAAAAAAALIOBCoAAAAAAACArAOBCgAAAAAAACDrQKACAAAAAAAAyDoQ\nqAAAAAAAAACyDgQqAAAAAAAAgKxDzvcAwFzDMERgmIDAcQzhGIYhhGGIZRHDIhaxNMOGGTbMsPM9\nTAAAAAAAcEm7OAMVDEM4hiko0qQQGeWUSiQQCwgCx8IM4wnSdl9o2BUYcvo9IZq+ZO7IcQxTicg8\nucgop8wqcalGYpRREiEhF5IUiXtDtCsQ9gTpYZe\/0+btG\/eNuAPDroA7SDPspXKKAAAAAABA9sCE\nT7w932OYeXlyakulfkmhSicRigW4kMAJHMMQYhEK02yQZnxhetgV2Ndt+7jDOu4Pzfd4Z5GCIsu0\nkhq9fIFelq+gNGKBnCIxDEv+LIZlHf6wzRsccPpbR1xnLZ5uu9cboudmzAAAkDGZkCzTShryFKk8\n2B0Mf9A25g6GIw9uq8uTCi\/M4jUPOzut3qjHzD2jnBpxBWbvxY0yKupg85Bzlt5uxuEYBnNqscq1\nUqmQiD3uCdIdVs\/cjweADOR2oCIk8BBz4beTkMBLNZKN5drFBU…
[debug] [MJSONWP] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAisCAIAAAAiJcX5AAAAA3NCSVQICAjb4U/gAAAgAElEQVR4\nnOzdd3wc5Z04/mfK7mzvRdJKWnWrWbLcC65gA6YaQodAIARI7nK5AMn3uEvySy6XBELuUgnpoSWU\nEEOosSkuuOIqYbmo97LaXW2vM/P7Y6zxapt2V23X/rxf/IFHW54djaT5PM/n+Xww4RNvIwAAAAAA\nAADIJvh8DwAAAAAAAAAAokGgAgAAAAAAAMg6EKgAAAAAAAAAsg4EKgAAAAAAAICsA4EKAAAAAAAA\nIOtAoAIAAAAAAADIOhCoAAAAAAAAALIOBCoAAAAAAACArAOBCgAAAAAAACDrQKACAAAAAAAAyDoQ\nqAAAAAAAAACyDgQqAAAAAAAAgKxDzvcAwFzDMERgmIDAcQzhGIYhhGGIZRHDIhaxNMOGGTbMsPM9\nTAAAAAAAcEm7OAMVDEM4hiko0qQQGeWUSiQQCwgCx8IM4wnSdl9o2BUYcvo9IZq+ZO7IcQxTicg8\nucgop8wqcalGYpRREiEhF5IUiXtDtCsQ9gTpYZe/0+btG/eNuAPDroA7SDPspXKKAAAAAABA9sCE\nT7w932OYeXlyakulfkmhSicRigW4kMAJHMMQYhEK02yQZnxhetgV2Ndt+7jDOu4Pzfd4Z5GCIsu0\nkhq9fIFelq+gNGKBnCIxDEv+LIZlHf6wzRsccPpbR1xnLZ5uu9cboudmzAAAkDGZkCzTShryFKk8\n2B0Mf9A25g6GIw9uq8uTCi/M4jUPOzut3qjHzD2jnBpxBWbvxY0yKupg85Bzlt5uxuEYBnNqscq1\nUqmQiD3uCdIdVs/cjweADOR2oCIk8BBz4beTkMBLNZKN5drFBUqKJOy+YO+4r3fcN+YJuoM0zbAC\nApNTpEFKmdVik1KkEgkc/vDhPvueLlu/wzc3+U4YhtaXavPlordOj8zeXz4cwzRiwboy7eUVugK5\nSBLvV1…
[HTTP] <-- GET /wd/hub/session/2b86a2e5-9c71-4a17-9773-5900758d22a2/screenshot 200 434 ms - 219562

Any clue what is going on? 50% of the time Appium is waiting until one of the two elements is found. The other 50% it just stops randomly after one minute of searching and throws the above error…

Thanks,
Chris

Can anyone help with this…Updated to 1.8.0 release, still happening.

And now it is crashing:

[debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [UiAutomator2] [UIAutomator2] Process crashed while executing startServer(io.appium.uiautomator2.server.test.AppiumUiAutomator2Server):
[debug] [UiAutomator2] [UIAutomator2] java.lang.ArrayIndexOutOfBoundsException: src.length=7 srcPos=0 dst.length=7 dstPos=1 length=7
[debug] [UiAutomator2] [UIAutomator2] at java.lang.System.arraycopy(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at java.util.ArrayList.addAll(ArrayList.java:591)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityNodeInfo.init(AccessibilityNodeInfo.java:3248)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityNodeInfo.refresh(AccessibilityNodeInfo.java:903)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache$AccessibilityNodeRefresher.refreshNode(AccessibilityCache.java:564)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache.refreshCachedNodeLocked(AccessibilityCache.java:206)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache.onAccessibilityEvent(AccessibilityCache.java:170)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityInteractionClient.onAccessibilityEvent(AccessibilityInteractionClient.java:611)
[debug] [UiAutomator2] [UIAutomator2] at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:1732)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
[debug] [UiAutomator2] [UIAutomator2] at android.os.Handler.dispatchMessage(Handler.java:105)
[debug] [UiAutomator2] [UIAutomator2] at android.os.Looper.loop(Looper.java:164)
[debug] [UiAutomator2] [UIAutomator2] at android.app.ActivityThread.main(ActivityThread.java:6938)
[debug] [UiAutomator2] [UIAutomator2] at java.lang.reflect.Method.invoke(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
[debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_CODE: 0

Seems to be occurring more frequently now, up to about 75%. Has anyone experienced this?

[debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [UiAutomator2] [UIAutomator2] Process crashed while executing startServer(io.appium.uiautomator2.server.test.AppiumUiAutomator2Server):
[debug] [UiAutomator2] [UIAutomator2] java.lang.ArrayIndexOutOfBoundsException: src.length=7 srcPos=0 dst.length=7 dstPos=1 length=7
[debug] [UiAutomator2] [UIAutomator2] at java.lang.System.arraycopy(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at java.util.ArrayList.addAll(ArrayList.java:591)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityNodeInfo.init(AccessibilityNodeInfo.java:3248)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityNodeInfo.refresh(AccessibilityNodeInfo.java:903)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache$AccessibilityNodeRefresher.refreshNode(AccessibilityCache.java:564)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache.refreshCachedNodeLocked(AccessibilityCache.java:206)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityCache.onAccessibilityEvent(AccessibilityCache.java:170)
[debug] [UiAutomator2] [UIAutomator2] at android.view.accessibility.AccessibilityInteractionClient.onAccessibilityEvent(AccessibilityInteractionClient.java:611)
[debug] [UiAutomator2] [UIAutomator2] at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:1732)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
[debug] [UiAutomator2] [UIAutomator2] at android.os.Handler.dispatchMessage(Handler.java:105)
[debug] [UiAutomator2] [UIAutomator2] at android.os.Looper.loop(Looper.java:164)
[debug] [UiAutomator2] [UIAutomator2] at android.app.ActivityThread.main(ActivityThread.java:6938)
[debug] [UiAutomator2] [UIAutomator2] at java.lang.reflect.Method.invoke(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
[debug] [UiAutomator2] [UIAutomator2] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
[debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [UiAutomator2] [UIAutomator2] INSTRUMENTATION_CODE: 0

Can I please have some support here!!!

If you drop the “OR” and query the elements individually, does it continues to break?

P.S. - Try and drop the xpath and use other locators.

What I have been doing in Python Appium for the last two years is stick to find_element_by_android_uiautomator when I have to use Xpath ordinarily. This has been pretty stable to me. Good luck.

I also I see you are using 1000 in WebDriverWait. This is way too short.

Webdriverwait is based in seconds, not milliseconds, so 1000 is substantial actually. @Telmo_Cardoso, it breaks regardless of OR, unfortunately…even if I just look for a single element. I am beginning to think it is all the animations on screen that are causing it to crash.

I will give ‘android_uiautomator’ a try…assuming this will work with uiautomator2, correct?

@mayu Can you give me an actual example of a ‘find_element_by_android_uiautomator’ with a wait? thanks

You can turn off animation from settings (I always have it turned off. )

disableWindowAnimation = true is what I am using…but does not disable all of them, oddly enough…

As for example, I see: el = self.driver.find_element_by_android_uiautomator(‘new UiSelector().description(“Animation”)’)…but how can that be used in my case where I need Xpath as shown in my example in my original post??

Use https://developer.android.com/reference/android/support/test/uiautomator/UiSelector#text

Ok I got the following to work: element = self.driver2.find_element_by_android_uiautomator(‘new UiSelector().text(“From this device”)’)…but how can I add a wait until text is found condition? or wait until text is gone?

You can use a FluentWait

FluentWait fluentWait = new FluentWait<>(driver).withTimeout(Duration.ofSeconds(waitTime)).pollingEvery(Duration.ofSeconds(1)).ignoring(NoSuchElementException.class)
return (MobileElement) fluentWait.until(webDriver -> ((AndroidDriver) driver).findElementByAndroidUIAutomator(query));

Fluentwait is throwing syntax error…

Is fluentWait really available in Python biding? Unfortunately, in Python, I have been noticing that we do not have all the nice things that APPIUM Java binding offers. (I am sticking to Python because I like the language. )

Use EC right before your find_element_by_android_uiautomator call if you need to.

I just tried:

wait = WebDriverWait(self.driver2, 3000, poll_frequency=1, ignored_exceptions=[ElementNotVisibleException, ElementNotSelectableException])
element = wait.until(EC.invisibility_of_element_located((By.ID, “com.app.example:id/overAllProgressStop”)))

acting as a ‘fluent wait’, but we will see. Next I will try EC call before find by uiautomator.

Thanks guys