The app exited when searching XPATH

Hi, during my test I am searching for XPATH //XCUIElementTypeCell[contains(@name,‘txt’)][XCUIElementTypeStaticText/@name]/XCUIElementTypeButton

but at that point, the app quit. I’m not sure if that XPATH is present at the screen but it should not quit.

Tested on Simulator iPhone 5s / iOS 10.0 / Appium 1.6.2 / Xcode 8.0
Could you please help.

Here is the output:

[HTTP] <-- GET /wd/hub/session/78ed8890-f85d-4473-ae09-cf98eaf501fd/contexts 200 19 ms - 86
[HTTP] --> POST /wd/hub/session/78ed8890-f85d-4473-ae09-cf98eaf501fd/elements {“using”:“xpath”,“value”:"//XCUIElementTypeCell[contains(@name,‘txt’)][XCUIElementTypeStaticText/@name]/XCUIElementTypeButton"}
[debug] [MJSONWP] Calling AppiumDriver.findElements() with args: [“xpath”,"//XCUIElementTypeCell[contains(@name,‘txt’)][XCUIElementTypeStaticText/@name]/XCUIElementTypeButton",“78ed8890-f85d-4473-ae09-cf98eaf501fd”]
[debug] [XCUITest] Executing command ‘findElements’
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8100/session/D1472919-6443-430F-B4EA-BA0C130B5297/elements] with body: {“using”:“xpath”,“value”:"//XCUIElementTypeCell[contains(@name,‘txt’)][XCUIElementTypeStaticText/@name]/XCUIElementTypeButton"}
[debug] [MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/78ed8890-f85d-4473-ae09-cf98eaf501fd/elements 200 1151 ms - 74
[debug] [XCUITest] Log file for xcodebuild test: /Users/blabla/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/03381243-B9F6-4778-8688-AD1274B2816B/Session-WebDriverAgentRunner-2016-12-08_104024-KQUtA5.log
[debug] [WebDriverAgent] Sim: Dec 8 10:40:24 blabla CoreSimulatorBridge[5776]: Requesting installation of file:///Users/blabla/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app/ with options: {
[debug] [WebDriverAgent] Sim: CFBundleIdentifier = “com.apple.test.WebDriverAgentRunner-Runner”;
[debug] [WebDriverAgent] Sim: PackageType = Developer;
[debug] [WebDriverAgent] Sim: SimulatorRootPath = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk”;
[debug] [WebDriverAgent] Sim: SimulatorUserPath = “/Users/blabla/Library/Developer/CoreSimulator/Devices/CD192068-CC4D-4DD5-A636-A91C05BDF0A4/data”;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Dec 8 10:40:28 blabla CoreSimulatorBridge[5776]: Requesting launch of com.apple.test.WebDriverAgentRunner-Runner with options: {
[debug] [WebDriverAgent] Sim: arguments = (
[debug] [WebDriverAgent] Sim: “-NSTreatUnknownArgumentsAsOpen”,
[debug] [WebDriverAgent] Sim: NO,
[debug] [WebDriverAgent] Sim: “-ApplePersistenceIgnoreState”,
[debug] [WebDriverAgent] Sim: YES
[debug] [WebDriverAgent] Sim: );
[debug] [WebDriverAgent] Sim: environment = {
[debug] [WebDriverAgent] Sim: “DTX_CONNECTION_SERVICES_PATH” = “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework”;
[debug] [WebDriverAgent] Sim: “DYLD_FRAMEWORK_PATH” = “/Users/blabla/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/blabla/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: “DYLD_LIBRARY_PATH” = “/Users/gabo/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Users/gabo/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks”;
[debug] [WebDriverAgent] Sim: NSUnbufferedIO = YES;
[debug] [WebDriverAgent] Sim: “OS_ACTIVITY_DT_MODE” = YES;
[debug] [WebDriverAgent] Sim: “XCODE_DBG_XPC_EXCLUSIONS” = “com.apple.dt.xctestSymbolicator”;
[debug] [WebDriverAgent] Sim: XCTestConfigurationFilePath = “/var/folders/z5/ytd_j37n0hl5vl6pdc7nxwzm0000gn/T/com.apple.dt.XCTest/43CC99E2-5907-49B0-9408-DD3AF36C254C/remote-container/tmp/WebDriverAgentRunner-43CC99E2-5907-49B0-9408-DD3AF36C254C.xctestconfiguration”;
[debug] [WebDriverAgent] Sim: “__XCODE_BUILT_PRODUCTS_DIR_PATHS” = “/Users/gabo/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_FRAMEWORK_PATH” = “/Users/gabo/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: “__XPC_DYLD_LIBRARY_PATH” = “/Users/gabo/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphonesimulator”;
[debug] [WebDriverAgent] Sim: };
[debug] [WebDriverAgent] Sim: stderr = “/dev/ttys003”;
[debug] [WebDriverAgent] Sim: stdout = “/dev/ttys003”;
[debug] [WebDriverAgent] Sim: “wait_for_debugger” = 0;
[debug] [WebDriverAgent] Sim: }
[debug] [WebDriverAgent] Sim: Dec 8 10:40:28 gabo CoreSimulatorBridge[5776]: [Common] [FBSSystemService][0x63c0] Sending request to open “com.apple.test.WebDriverAgentRunner-Runner”
[debug] [WebDriverAgent] Sim: Dec 8 10:40:28 gabo CoreSimulatorBridge[5776]: [Common] [FBSSystemService][0x63c0] Request successful: <FBSProcessHandle: 0x7f982ce20210; XCTRunner:5897; valid: YES>
[debug] [WebDriverAgent] Sim: Dec 8 10:40:29 gabo XCTRunner[5897]: assertion failed: 16B2555 14A345: libxpc.dylib + 62597 [37A9DF49-35C1-3D93-B854-B35CACF0100F]: 0x7d
[debug] [WebDriverAgent] Sim: Dec 8 10:40:29 gabo XCTRunner[5897]: Running tests…
[debug] [WebDriverAgent] Sim: Dec 8 10:40:29 gabo XCTRunner[5897]: Continuing to run tests in the background with task ID 1
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
blabla:~ ** blabla**$ [BaseDriver] Shutting down because we waited 60 seconds for a command
[debug] [JSONWP Proxy] Proxying [DELETE /session/78ed8890-f85d-4473-ae09-cf98eaf501fd] to [DELETE http://localhost:8100/session/D1472919-6443-430F-B4EA-BA0C130B5297] with no body
[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’
[Appium] Removing session 78ed8890-f85d-4473-ae09-cf98eaf501fd from our master session list
Unhandled rejection ProxyRequestError: Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100
at JWProxy.proxy$ (…/…/…/lib/jsonwp-proxy/proxy.js:126:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:108:47)
at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:119:28
at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5)
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)

Your script is exited because of this error " xcodebuild exited with code ‘65’ and signal ‘null’"

To resolve this issue, you have launch WebDriverAgent.xcodeproj available at (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent) and update the Development profile and Provisioning Profile for targets “WebDriverAgentLib” and “WebDriverAgentRunner” targets

thanks for reply but I am running the test in the simulator and not in the real app so signing has no sense here.