question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebDriverAgent failed to launch on IOS 13.3.1 with a personal team account

See original GitHub issue

The problem

got error ‘“WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.’ on IOS 13.3.1, working fine on IOS13.3

Environment

Iphone X(Real device) IOS 13.3.1 Appium 1.15.1

Details

when testing WebDriverAgentRunner from Xcode, got the following error:

2020-01-29 21:48:41.236991+0800 WebDriverAgentRunner-Runner[515:35954] Running tests… 2020-01-29 21:48:41.348870+0800 WebDriverAgentRunner-Runner[515:35954] “WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. 2020-01-29 21:48:41.348957+0800 WebDriverAgentRunner-Runner[515:35954] (dlopen_preflight(/var/containers/Bundle/Application/B88E6656-ACC9-467F-B4FF-DE2ED2171315/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner): no suitable image found. Did find: /var/containers/Bundle/Application/B88E6656-ACC9-467F-B4FF-DE2ED2171315/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner: code signature invalid for ‘/var/containers/Bundle/Application/B88E6656-ACC9-467F-B4FF-DE2ED2171315/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner’ )

when testing through command line , got the following error:

[debug] [W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“iOS”,“platformVersion”:“13.3.1”,“deviceName”:“iPhone X”,“bundleId”:“com.taobao.tmall”,“automationName”:“XCUITest”,“udid”:“c002e033ba0803e99c4e57fc584ad73a05dde427”,“newCommandTimeout”:“300”,“useNewWDA”:true},null,{“firstMatch”:[{“platformName”:“iOS”,“appium:platformVersion”:“13.3.1”,“appium:deviceName”:“iPhone X”,“appium:bundleId”:“com.taobao.tmall”,“appium:automationName”:“XCUITest”,“appium:udid”:“c002e033ba0803e99c4e57fc584ad73a05dde427”,“appium:newCommandTimeout”:“300”,“appium:useNewWDA”:true}]}] [debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1580308620738 (22:37:00 GMT+0800 (China Standard Time)) [BaseDriver] Number capability passed in as string. Functionality may be compromised. [Appium] Appium v1.15.1 creating new XCUITestDriver (v2.133.1) session [debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided [debug] [BaseDriver] Creating session with W3C capabilities: { [debug] [BaseDriver] “alwaysMatch”: { [debug] [BaseDriver] “platformName”: “iOS”, [debug] [BaseDriver] “appium:platformVersion”: “13.3.1”, [debug] [BaseDriver] “appium:deviceName”: “iPhone X”, [debug] [BaseDriver] “appium:bundleId”: “com.taobao.tmall”, [debug] [BaseDriver] “appium:automationName”: “XCUITest”, [debug] [BaseDriver] “appium:udid”: “c002e033ba0803e99c4e57fc584ad73a05dde427”, [debug] [BaseDriver] “appium:newCommandTimeout”: “300”, [debug] [BaseDriver] “appium:useNewWDA”: true [debug] [BaseDriver] }, [debug] [BaseDriver] “firstMatch”: [ [debug] [BaseDriver] {} [debug] [BaseDriver] ] [debug] [BaseDriver] } [BaseDriver] Number capability passed in as string. Functionality may be compromised. [BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘300’) to integer (300). This may cause unexpected behavior [BaseDriver] Session created with session id: 8a6e9e9b-1ae5-45d6-ad08-4fccaa05478b [debug] [XCUITest] Current user: ‘zacharywu’ [debug] [XCUITest] Available devices: c76184e562536f5991cbb174c322d9104a49ebd0, c5858f8dc51a94fb6def6d9de86902db04d59a2c, c002e033ba0803e99c4e57fc584ad73a05dde427 [debug] [XCUITest] Creating iDevice object with udid ‘c002e033ba0803e99c4e57fc584ad73a05dde427’ [XCUITest] Determining device to run tests on: udid: ‘c002e033ba0803e99c4e57fc584ad73a05dde427’, real device: true [XCUITest] Normalized platformVersion capability value ‘13.3.1’ to ‘13.3’ [debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1580308621141 (22:37:01 GMT+0800 (China Standard Time)) [debug] [BaseDriver] Event ‘appConfigured’ logged at 1580308621142 (22:37:01 GMT+0800 (China Standard Time)) [debug] [BaseDriver] Event ‘resetStarted’ logged at 1580308621142 (22:37:01 GMT+0800 (China Standard Time)) [debug] [XCUITest] Reset: running ios real device reset flow [debug] [BaseDriver] Event ‘resetComplete’ logged at 1580308621143 (22:37:01 GMT+0800 (China Standard Time)) [debug] [XCUITest] Crash reports root ‘/Users/zacharywu/Library/Logs/CrashReporter/MobileDevice/iPhone X’ does not exist. Got nothing to gather. [debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1580308621398 (22:37:01 GMT+0800 (China Standard Time)) [XCUITest] Setting up real device [XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent’ [XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj’ [debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found [DevCon Factory] Requesting connection for device c002e033ba0803e99c4e57fc584ad73a05dde427 on local port 8100, device port 8100 [debug] [DevCon Factory] Cached connections count: 0 [DevCon Factory] Port #8100 is busy [DevCon Factory] Successfully requested the connection for c002e033ba0803e99c4e57fc584ad73a05dde427:8100 [debug] [XCUITest] Parsed BUILD_DIR configuration value: ‘/Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Products’ [debug] [XCUITest] Got derived data root: ‘/Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu’ [debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key ‘/Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu’ [debug] [XCUITest] Capability ‘useNewWDA’ set to true, so uninstalling WDA before proceeding [XCUITest] Shutting down sub-processes [debug] [XCUITest] No WDAs on the device. [debug] [BaseDriver] Event ‘wdaUninstalled’ logged at 1580308625534 (22:37:05 GMT+0800 (China Standard Time)) [debug] [XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval [debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities [debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1580308625535 (22:37:05 GMT+0800 (China Standard Time)) [XCUITest] Launching WebDriverAgent on the device [WebDriverAgent] Fetching dependencies [WebDriverAgent] Dependencies up-to-date [debug] [XCUITest] Killing running processes ‘xcodebuild.*c002e033ba0803e99c4e57fc584ad73a05dde427’ for the device c002e033ba0803e99c4e57fc584ad73a05dde427… [debug] [XCUITest] ‘pgrep -ifn xcodebuild.*c002e033ba0803e99c4e57fc584ad73a05dde427’ didn’t detect any matching processes. Return code: 1 [debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu -destination id=c002e033ba0803e99c4e57fc584ad73a05dde427 IPHONEOS_DEPLOYMENT_TARGET=13.3 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent’ [debug] [XCUITest] Output from xcodebuild will only be logged if any errors are present there. To change this, use ‘showXcodeLog’ desired capability [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [XCUITest] Log file for xcodebuild test: /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-07-+0800.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-55FFEF8F-1EE9-43B4-A4F7-E4A9EB4F2973/WebDriverAgentRunner-0DDCFAEB-705A-49B5-992B-46657D07AD34/Session-WebDriverAgentRunner-2020-01-29_223709-v6XIN0.log [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [Xcode] 2020-01-29 22:37:15.719 xcodebuild[18650:344791] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner” UserInfo={NSLocalizedDescription=Unable to launch com.lab.WebDriverAgentRunner.xctrunner, NSUnderlyingError=0x7fd04b8934f0 {Error Domain=com.apple.dt.deviceprocesscontrolservice Code=2 “Request to launch com.lab.WebDriverAgentRunner.xctrunner failed.” UserInfo={NSLocalizedFailureReason=The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’., NSLocalizedDescription=Request to launch com.lab.WebDriverAgentRunner.xctrunner failed., NSUnderlyingError=0x7fd04b8dee20 {Error Domain=FBSOpenApplicationErrorDomain Code=3 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.” UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.}}}}} [Xcode] [Xcode] [Xcode] Test session results, code coverage, and logs: [Xcode] /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-07-+0800.xcresult [Xcode] [Xcode] [Xcode] Testing failed: [Xcode] WebDriverAgentRunner: [Xcode] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.lab.WebDriverAgentRunner.xctrunner. (Underlying error: Request to launch com.lab.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’. (Underlying error: The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.)))) [Xcode] [Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] [Xcode] Testing started on ‘iPhone X’ [Xcode] [XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’ [XCUITest] Launching WebDriverAgent on the device [WebDriverAgent] Fetching dependencies [WebDriverAgent] Dependencies up-to-date [debug] [XCUITest] Killing running processes ‘xcodebuild.*c002e033ba0803e99c4e57fc584ad73a05dde427’ for the device c002e033ba0803e99c4e57fc584ad73a05dde427… [debug] [XCUITest] ‘pgrep -ifn xcodebuild.*c002e033ba0803e99c4e57fc584ad73a05dde427’ didn’t detect any matching processes. Return code: 1 [debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu -destination id=c002e033ba0803e99c4e57fc584ad73a05dde427 IPHONEOS_DEPLOYMENT_TARGET=13.3 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent’ [debug] [XCUITest] Output from xcodebuild will only be logged if any errors are present there. To change this, use ‘showXcodeLog’ desired capability [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [XCUITest] Log file for xcodebuild test: /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-17-+0800.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-834E42FF-3C49-4251-B1B8-471CBEA672D6/WebDriverAgentRunner-678DADDB-6EC1-4598-B776-7B8131EA0C5A/Session-WebDriverAgentRunner-2020-01-29_223721-I6vHZJ.log [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’ [debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [iProxy@c002e…] Connection was refused to port 8100 [WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”} [Xcode] 2020-01-29 22:37:26.451 xcodebuild[18655:345080] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner” UserInfo={NSLocalizedDescription=Unable to launch com.lab.WebDriverAgentRunner.xctrunner, NSUnderlyingError=0x7fe63d3377b0 {Error Domain=com.apple.dt.deviceprocesscontrolservice Code=2 “Request to launch com.lab.WebDriverAgentRunner.xctrunner failed.” UserInfo={NSLocalizedFailureReason=The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’., NSLocalizedDescription=Request to launch com.lab.WebDriverAgentRunner.xctrunner failed., NSUnderlyingError=0x7fe63d3354f0 {Error Domain=FBSOpenApplicationErrorDomain Code=3 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.” UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.}}}}} [Xcode] [Xcode] [Xcode] Test session results, code coverage, and logs: [Xcode] /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-17-+0800.xcresult [Xcode] [Xcode] [Xcode] Testing failed: [Xcode] WebDriverAgentRunner: [Xcode] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.lab.WebDriverAgentRunner.xctrunner. (Underlying error: Request to launch com.lab.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’. (Underlying error: The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.)))) [Xcode] [Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] [Xcode] Testing started on ‘iPhone X’ [Xcode] [XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’ [debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1580308646496 (22:37:26 GMT+0800 (China Standard Time)) [debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 [debug] [XCUITest] xcodebuild error message: [debug] [XCUITest] [debug] [XCUITest] 2020-01-29 22:37:26.451 xcodebuild[18655:345080] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner” UserInfo={NSLocalizedDescription=Unable to launch com.lab.WebDriverAgentRunner.xctrunner, NSUnderlyingError=0x7fe63d3377b0 {Error Domain=com.apple.dt.deviceprocesscontrolservice Code=2 “Request to launch com.lab.WebDriverAgentRunner.xctrunner failed.” UserInfo={NSLocalizedFailureReason=The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’., NSLocalizedDescription=Request to launch com.lab.WebDriverAgentRunner.xctrunner failed., NSUnderlyingError=0x7fe63d3354f0 {Error Domain=FBSOpenApplicationErrorDomain Code=3 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.” UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.}}}}} [debug] [XCUITest] Test session results, code coverage, and logs: [debug] [XCUITest] /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-17-+0800.xcresult [debug] [XCUITest] Testing failed: [debug] [XCUITest] WebDriverAgentRunner: [debug] [XCUITest] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.lab.WebDriverAgentRunner.xctrunner. (Underlying error: Request to launch com.lab.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’. (Underlying error: The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.)))) [debug] [XCUITest] ** TEST EXECUTE FAILED ** [debug] [XCUITest] Testing started on ‘iPhone X’. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. [XCUITest] Quitting and uninstalling WebDriverAgent [XCUITest] Shutting down sub-processes [debug] [XCUITest] Uninstalling WDAs: ‘com.lab.WebDriverAgentRunner.xctrunner’ [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 [XCUITest] xcodebuild error message: [XCUITest] [XCUITest] 2020-01-29 22:37:26.451 xcodebuild[18655:345080] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner” UserInfo={NSLocalizedDescription=Unable to launch com.lab.WebDriverAgentRunner.xctrunner, NSUnderlyingError=0x7fe63d3377b0 {Error Domain=com.apple.dt.deviceprocesscontrolservice Code=2 “Request to launch com.lab.WebDriverAgentRunner.xctrunner failed.” UserInfo={NSLocalizedFailureReason=The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’., NSLocalizedDescription=Request to launch com.lab.WebDriverAgentRunner.xctrunner failed., NSUnderlyingError=0x7fe63d3354f0 {Error Domain=FBSOpenApplicationErrorDomain Code=3 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.” UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.}}}}} [XCUITest] Test session results, code coverage, and logs: [XCUITest] /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-17-+0800.xcresult [XCUITest] Testing failed: [XCUITest] WebDriverAgentRunner: [XCUITest] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.lab.WebDriverAgentRunner.xctrunner. (Underlying error: Request to launch com.lab.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’. (Underlying error: The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.)))) [XCUITest] ** TEST EXECUTE FAILED ** [XCUITest] Testing started on ‘iPhone X’. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. [XCUITest] at quitAndUninstall (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15) [XCUITest] at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11 [XCUITest] at wrapped (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13) [XCUITest] at retry (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13) [XCUITest] at retryInterval (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10) [XCUITest] at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7 [DevCon Factory] Releasing connections for c002e033ba0803e99c4e57fc584ad73a05dde427 device on any port number [DevCon Factory] Found cached connections to release: [“c002e033ba0803e99c4e57fc584ad73a05dde427:8100”] [DevCon Factory] Releasing the listener for ‘c002e033ba0803e99c4e57fc584ad73a05dde427:8100’ [debug] [DevCon Factory] Cached connections count: 0 [debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on. [debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1580308647458 (22:37:27 GMT+0800 (China Standard Time)) [debug] [W3C] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 [debug] [W3C] xcodebuild error message: [debug] [W3C] [debug] [W3C] 2020-01-29 22:37:26.451 xcodebuild[18655:345080] Error Domain=com.apple.platform.iphoneos Code=-12 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner” UserInfo={NSLocalizedDescription=Unable to launch com.lab.WebDriverAgentRunner.xctrunner, NSUnderlyingError=0x7fe63d3377b0 {Error Domain=com.apple.dt.deviceprocesscontrolservice Code=2 “Request to launch com.lab.WebDriverAgentRunner.xctrunner failed.” UserInfo={NSLocalizedFailureReason=The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’., NSLocalizedDescription=Request to launch com.lab.WebDriverAgentRunner.xctrunner failed., NSUnderlyingError=0x7fe63d3354f0 {Error Domain=FBSOpenApplicationErrorDomain Code=3 “Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.” UserInfo={BSErrorCodeDescription=Security, NSLocalizedFailureReason=Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.}}}}} [debug] [W3C] Test session results, code coverage, and logs: [debug] [W3C] /Users/zacharywu/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.01.29_22-37-17-+0800.xcresult [debug] [W3C] Testing failed: [debug] [W3C] WebDriverAgentRunner: [debug] [W3C] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: Unable to launch com.lab.WebDriverAgentRunner.xctrunner. (Underlying error: Request to launch com.lab.WebDriverAgentRunner.xctrunner failed. The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier ‘com.lab.WebDriverAgentRunner.xctrunner’. (Underlying error: The operation couldn’t be completed. Unable to launch com.lab.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.)))) [debug] [W3C] ** TEST EXECUTE FAILED ** [debug] [W3C] Testing started on ‘iPhone X’. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. [debug] [W3C] at quitAndUninstall (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15) [debug] [W3C] at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11 [debug] [W3C] at wrapped (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13) [debug] [W3C] at retry (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13) [debug] [W3C] at retryInterval (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10) [debug] [W3C] at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7 [HTTP] <-- POST /wd/hub/session 500 26731 ms - 6247 [HTTP]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexandrulucacommented, Apr 9, 2020

@annabutenko Thanks for the reply.

This is what worked for me.

  1. update ios device to version 13.4.1
  2. disable runtime validation (example here: https://github.com/opencv/opencv/issues/15645) build settings => enable hardened runtime = yes signing and capabilities => hardened runtime => disable runtime validation

following command works fine for me now, without any errors

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id='your-udid' test -allowProvisioningUpdates

Hope this helps anyone else

1reaction
annabutenkocommented, Apr 9, 2020

@annabutenko Does it work well for you with ios version 13.4?

I am still using iPhone with iOS 13.3, but I read comments of other people and iOS 13.4 beta 5 worked well with WDA for them

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode's WebDriverAgent not working with iOS 16
X I was able to build the webDriverAgent but the moment I upgraded to IOS 16 Xcode says "Unsupported OS Version" I am...
Read more >
xcode - I set up Appium for Real iOS device, Unable to launch ...
Follow the steps in documentation and make sure you have valid Apple developer account, you need to to sign WebDriverAgent with it.
Read more >
[Mobile] Install WebDriverAgent for real iOS devices
The WebDriverAgent is a WebDriver server used to control iOS devices remotely. ... Open Katalon Studio and go to Tools > iOS >...
Read more >
Change settings in Teams - Microsoft Support
Open Teams ' in-app settings. Open Microsoft Teams. Select Settings and more Teams more icon next to your profile picture. Select Settings ...
Read more >
Webdriveragent app setup in iPhone/Simulator - YouTube
Easy steps to install Webdriveragent in your iPhone /Simulator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found