现象:用 AppiumDesktop 启动 iOS APP(今日头条),APP 可以启动但打开后立即关闭并重启,无限循环。。。
Appium 版本:v1.12.1
Xcode 版本:10.2
传参如下:
"platformName": "iOS",
"deviceName": "iPhone",
"app": "com.ss.iphone.article.News",
"udid": "xxxxxxxxxxxxx",
"automationName": "XCUITest",
"platformVersion": "12.1.2"

【Appium 日志】
[info] [35m[Appium][39m Welcome to Appium v1.12.1
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[GENERIC][39m Calling AppiumDriver.getSessions() with args: []
[debug] [35m[GENERIC][39m Responding to client with driver.getSessions() result: []
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/sessions [39m[32m200[39m [90m1 ms - 40[39m
[info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1555580726853 (17:45:26 GMT+0800 (CST))
[info] [35m[Appium][39m Appium v1.12.1 creating new XCUITestDriver (v2.110.1) session
[info] [35m[Appium][39m Capabilities:
[info] [35m[Appium][39m app: com.ss.iphone.article.News
[info] [35m[Appium][39m automationName: XCUITest
[info] [35m[Appium][39m deviceName: iPhone
[info] [35m[Appium][39m platformName: iOS
[info] [35m[Appium][39m udid: xxxxxxx
[info] [35m[Appium][39m newCommandTimeout: 0
[info] [35m[Appium][39m connectHardwareKeyboard: true
[debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"app":"com.ss.iphone.artic...
[info] [35m[BaseDriver][39m Session created with session id: 94c9fe84-1275-4b38-8b5f-b262da01a702
[debug] [35m[XCUITest][39m Current user: 'boyue'
[error] [35m[XCUITest][39m Error: 'undefined' cannot be coerced to a valid version number
[error] [35m[XCUITest][39m at coerceVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/util.js:241:11)
[error] [35m[XCUITest][39m at Object.coerceVersion as compareVersions
[error] [35m[XCUITest][39m at XCUITestDriver.compareVersions as start
[debug] [35m[XCUITest][39m Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1555580726869 (17:45:26 GMT+0800 (CST))
[debug] [35m[MJSONWP][39m Encountered internal error running command: Error: 'undefined' cannot be coerced to a valid version number
[debug] [35m[MJSONWP][39m at coerceVersion (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/util.js:241:11)
[debug] [35m[MJSONWP][39m at Object.coerceVersion as compareVersions
[debug] [35m[MJSONWP][39m at XCUITestDriver.compareVersions as start
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[31m500[39m [90m18 ms - 192[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mDELETE[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[HTTP][39m No route found. Setting content type to 'text/plain'
[info] [35m[HTTP][39m [37m<-- DELETE /wd/hub/session [39m[33m404[39m [90m3 ms - 57[39m
[info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","platformVersion":"12.1.2","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"app":"com.ss.iphone.article.News","automationName":"XCUITest","deviceName":"iPhone","platformName":"iOS","platformVersion":"12.1.2","udid":"xxxxxxx","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1555580794500 (17:46:34 GMT+0800 (CST))
[info] [35m[Appium][39m Appium v1.12.1 creating new XCUITestDriver (v2.110.1) session
[info] [35m[Appium][39m Capabilities:
[info] [35m[Appium][39m app: com.ss.iphone.article.News
[info] [35m[Appium][39m automationName: XCUITest
[info] [35m[Appium][39m deviceName: iPhone
[info] [35m[Appium][39m platformName: iOS
[info] [35m[Appium][39m platformVersion: 12.1.2
[info] [35m[Appium][39m udid: xxxxxxx
[info] [35m[Appium][39m newCommandTimeout: 0
[info] [35m[Appium][39m connectHardwareKeyboard: true
[debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"app":"com.ss.iphone.artic...
[info] [35m[BaseDriver][39m Session created with session id: bdd73922-7fc4-440e-84e9-788031a497f7
[debug] [35m[XCUITest][39m Current user: 'boyue'
[debug] [35m[XCUITest][39m Available devices: xxxxxxx
[debug] [35m[XCUITest][39m Creating iDevice object with udid 'xxxxxxx'
[info] [35m[XCUITest][39m Determining device to run tests on: udid: 'xxxxxxx', real device: true[info] [35m[XCUITest][39m Xcode version set to '10.2' (tools v10.2.0.0.1.1552586384)
[info] [35m[XCUITest][39m iOS SDK Version set to '12.2'
[debug] [35m[BaseDriver][39m Event 'xcodeDetailsRetrieved' logged at 1555580794720 (17:46:34 GMT+0800 (CST))
[debug] [35m[XCUITest][39m App is an iOS bundle, will attempt to run as pre-existing
[debug] [35m[BaseDriver][39m Event 'appConfigured' logged at 1555580794721 (17:46:34 GMT+0800 (CST))
[debug] [35m[BaseDriver][39m Event 'resetStarted' logged at 1555580794721 (17:46:34 GMT+0800 (CST))
[debug] [35m[XCUITest][39m Reset: running ios real device reset flow
[debug] [35m[BaseDriver][39m Event 'resetComplete' logged at 1555580794722 (17:46:34 GMT+0800 (CST))
[debug] [35m[iOSLog][39m Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [35m[iOSLog][39m Starting iOS device log capture with: 'idevicesyslog'[debug] [35m[XCUITest][39m Crash reports root '/Users/boyue/Library/Logs/CrashReporter/MobileDevice/胡雷廷的 iPhone' does not exist. Got nothing to gather.
[debug] [35m[BaseDriver][39m Event 'logCaptureStarted' logged at 1555580794902 (17:46:34 GMT+0800 (CST))
[info] [35m[XCUITest][39m Setting up real device[info] [35m[XCUITest][39m Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[info] [35m[XCUITest][39m Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'[debug] [35m[XCUITest][39m No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[warn] [35m[WD Proxy][39m Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [35m[XCUITest][39m WDA is not listening at 'http://localhost:8100/'
[debug] [35m[XCUITest][39m WDA is currently not running. There is nothing to cache
[debug] [35m[XCUITest][39m Trying to start WebDriverAgent 1 times with 10000ms interval
[debug] [35m[XCUITest][39m These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [35m[BaseDriver][39m Event 'wdaStartAttempted' logged at 1555580795415 (17:46:35 GMT+0800 (CST))
[info] [35m[XCUITest][39m Launching WebDriverAgent on the device
[debug] [35m[XCUITest][39m Carthage found: '/usr/local/bin/carthage'
[debug] [35m[XCUITest][39m Killing running processes 'xcodebuild.xxxxxxx, iproxy 8100' for the device xxxxxxx...
[debug] [35m[XCUITest][39m 'pgrep -nif xcodebuild.*xxxxxxx' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB for the device xxxxxxx[debug] [35m[XCUITest][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=xxxxxxx IPHONEOS_DEPLOYMENT_TARGET=12.1 GCC_TREAT_WARNINGS_AS_ERRORS=0' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [35m[XCUITest][39m Output from xcodebuild will not be logged. To change this, use 'showXcodeLog' desired capability[debug] [35m[XCUITest][39m Waiting up to 60000ms for WebDriverAgent to start
[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"12.1.2\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"12.1.2\",\n \"ip\" : \"192.168.202.11\"\n },\n \"build\" : {\n \"time\" : \"Apr 18 2019 17:20:50\"\n }\n },\n \"sessionId\" : \"3637A001-7E19-4899-B0C6-C9874ED9C1B8\",\n \"status\" : 0\n}"
[debug] [35m[XCUITest][39m WebDriverAgent information:
[debug] [35m[XCUITest][39m {
[debug] [35m[XCUITest][39m "state": "success",
[debug] [35m[XCUITest][39m "os": {
[debug] [35m[XCUITest][39m "name": "iOS",
[debug] [35m[XCUITest][39m "version": "12.1.2"
[debug] [35m[XCUITest][39m },
[debug] [35m[XCUITest][39m "ios": {
[debug] [35m[XCUITest][39m "simulatorVersion": "12.1.2",
[debug] [35m[XCUITest][39m "ip": "192.168.202.11"
[debug] [35m[XCUITest][39m },
[debug] [35m[XCUITest][39m "build": {
[debug] [35m[XCUITest][39m "time": "Apr 18 2019 17:20:50"
[debug] [35m[XCUITest][39m }
[debug] [35m[XCUITest][39m }
[debug] [35m[XCUITest][39m WebDriverAgent successfully started after 603ms
[debug] [35m[BaseDriver][39m Event 'wdaSessionAttempted' logged at 1555580801068 (17:46:41 GMT+0800 (CST))
[debug] [35m[XCUITest][39m Sending createSession command to WDA
[debug] [35m[WD Proxy][39m Matched '/session' to command name 'createSession'
[debug] [35m[WD Proxy][39m Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.ss.iphone.article.News","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}[error] [35m[Xcode][39m 2019-04-18 17:46:42.181 xcodebuild[2455:28313] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7f893cc32c10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m 2019-04-18 17:46:42.181 xcodebuild[2455:28313] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7f893cd25b30 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[error] [35m[Xcode][39m *
TEST BUILD FAILED **
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m
[debug] [35m[XCUITest][39m Log file for xcodebuild test: /Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Test-WebDriverAgentRunner-2019.04.18_17-46-42-+0800.xcresult/2_Test/Diagnostics/WebDriverAgentRunner-6B91BFF7-A967-4FF8-8B22-74E2C7CBB389/WebDriverAgentRunner-EBDBD8A0-CA6C-4EDA-8AF7-E7FFA4DDA013/Session-WebDriverAgentRunner-2019-04-18_174642-0of3eH.log
[error] [35m[Xcode][39m 2019-04-18 17:46:42.193 xcodebuild[2455:28309] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[error] [35m[Xcode][39m /Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Test-WebDriverAgentRunner-2019.04.18_17-46-42-+0800.xcresult/2_Test/Diagnostics/WebDriverAgentRunner-6B91BFF7-A967-4FF8-8B22-74E2C7CBB389/WebDriverAgentRunner-EBDBD8A0-CA6C-4EDA-8AF7-E7FFA4DDA013/Session-WebDriverAgentRunner-2019-04-18_174642-0of3eH.log
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m 2019-04-18 17:46:42.193 xcodebuild[2455:28306] [MT] IDETestOperationsObserverDebug: (92DA747C-F803-4A85-80BE-B4F84B14CB98) Beginning test session WebDriverAgentRunner-92DA747C-F803-4A85-80BE-B4F84B14CB98 at 2019-04-18 17:46:42.193 with Xcode 10E125 on target 📱 {
[error] [35m[Xcode][39m deviceSerialNumber: C5FP2NJSG5MN
[error] [35m[Xcode][39m identifier: xxxxxxx
[error] [35m[Xcode][39m deviceClass: iPhone
[error] [35m[Xcode][39m deviceName: 胡雷廷的 iPhone
[error] [35m[Xcode][39m deviceIdentifier: xxxxxxx
[error] [35m[Xcode][39m productVersion: 12.1.2
[error] [35m[Xcode][39m buildVersion: 16C101
[error] [35m[Xcode][39m deviceSoftwareVersion: 12.1.2 (16C101)
[error] [35m[Xcode][39m deviceArchitecture: arm64
[error] [35m[Xcode][39m deviceTotalCapacity: 9770864640
[error] [35m[Xcode][39m deviceAvailableCapacity: 982421504
[error] [35m[Xcode][39m deviceIsTransient: NO
[error] [35m[Xcode][39m ignored: NO
[error] [35m[Xcode][39m deviceIsBusy: NO
[error] [35m[Xcode][39m deviceIsPaired: YES
[error] [35m[Xcode][39m deviceIsActivated: YES
[error] [35m[Xcode][39m deviceActivationState: Activated
[error] [35m[Xcode][39m isPasscodeLocked: NO
[error] [35m[Xcode][39m deviceType:
[error] [35m[Xcode][39m supportedDeviceFamilies: (
[error] [35m[Xcode][39m 1
[error] [35m[Xcode][39m )
[error] [35m[Xcode][39m applications: (null)
[error] [35m[Xcode][39m provisioningProfiles: (null)
[error] [35m[Xcode][39m hasInternalSupport: NO
[error] [35m[Xcode][39m isSupportedOS: YES
[error] [35m[Xcode][39m developerDiskMountError: (null)
[error] [35m[Xcode][39m (null)
[error] [35m[Xcode][39m bootArgs: (null)
[error] [35m[Xcode][39m nextBootArgs: (null)
[error] [35m[Xcode][39m connected: yes
[error] [35m[Xcode][39m isWirelessEnabled: no
[error] [35m[Xcode][39m connectionType: direct
[error] [35m[Xcode][39m hostname: (null)
[error] [35m[Xcode][39m bonjourServiceName: d0:a6:37:bc:7d:30@fe80::d2a6:37ff:febc:7d30._apple-mobdev2._tcp.local.
[error] [35m[Xcode][39m } (12.1.2 (16C101))
[error] [35m[Xcode][39m [error] [35m[Xcode][39m 2019-04-18 17:46:42.668 xcodebuild[2455:28306] [MT] IDETestOperationsObserverDebug: (92DA747C-F803-4A85-80BE-B4F84B14CB98) Finished requesting crash reports. Continuing with testing.
[error] [35m[Xcode][39m [error] [35m[Xcode][39m
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m *** If you believe this error represents a bug, please attach the result bundle at /Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Test-WebDriverAgentRunner-2019.04.18_17-46-42-+0800.xcresult
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m 2019-04-18 17:46:42.683 xcodebuild[2455:28306] [MT] IDETestOperationsObserverDebug: 0.494 elapsed -- Testing started completed.
[error] [35m[Xcode][39m 2019-04-18 17:46:42.683 xcodebuild[2455:28306] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m 2019-04-18 17:46:42.683 xcodebuild[2455:28306] [MT] IDETestOperationsObserverDebug: 0.494 sec, +0.494 sec -- end
[error] [35m[Xcode][39m 2019-04-18 17:46:42.684 xcodebuild[2455:28306] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f893cb135a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m Testing failed:
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor. (in target 'WebDriverAgentRunner')
[error] [35m[Xcode][39m WebDriverAgentRunner:
[error] [35m[Xcode][39m WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m Test session results and logs:
[error] [35m[Xcode][39m /Users/boyue/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/Test-WebDriverAgentRunner-2019.04.18_17-46-42-+0800.xcresult
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m ** TEST EXECUTE FAILED **
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m
[error] [35m[Xcode][39m Testing started on '胡雷廷的 iPhone'
[error] [35m[Xcode][39m
[error] [35m[XCUITest][39m xcodebuild exited with code '65' and signal 'null'[debug] [35m[WD Proxy][39m Got response with status 200: {"value":"+[XCAXClient_iOS sharedClient]: unrecognized selector sent to class 0x101270130\n\n(\n\t0 CoreFoundation 0x00000001f3e18edc + 252\n\t1 libobjc.A.dylib 0x00000001f2fe9a40 objc_exception_throw + 56\n\t2 CoreFoundation 0x00000001f3d36ccc + 0\n\t3 CoreFoundation 0x00000001f3e1e7dc + 1412\n\t4 CoreFoundation 0x00000001f3e2048c _CF_forwarding_prep_0 + 92\n\t5 WebDriverAgentLib 0x00000001030ac634 __37+[FBApplication fb_activeApplication]_block_invoke + 52\n\t6 WebDriverAgentLib 0x0000000103085764 -[FBRunLoopSpinner spinUntilTrue:error:] + 152\n\t7 WebDriverAgentLib 0x00000001030856a4 -[FBRunLoopSpinner spinUntilTrue:] + 84\n\t8 WebDriverAgentLib 0x00000001030ac394 +[FBApplication fb_activeApplication] + 128\n\t9 WebDriverAgentLib 0x0000000103097dd8 -[FBSession ...
[warn] [35m[WD Proxy][39m Got an unexpected response: {"value":"+[XCAXClient_iOS sharedClient]: unrecognized selector sent to class 0x101270130\n\n(\n\t0 CoreFoundation 0x00000001f3e18edc + 252\n\t1 libobjc.A.dylib 0x00000001f2fe9a40 objc_exception_throw + 56\n\t2 CoreFoundation ...
[debug] [35m[MJSONWP][39m Matched JSONWP error code 13 to UnknownError
[debug] [35m[XCUITest][39m Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: +[XCAXClient_iOS sharedClient]: unrecognized selector sent to class 0x101270130
[debug] [35m[XCUITest][39m
[debug] [35m[XCUITest][39m (
[debug] [35m[XCUITest][39m 0 CoreFoundation 0x00000001f3e18edc + 252
[debug] [35m[XCUITest][39m 1 libobjc.A.dylib 0x00000001f2fe9a40 objc_exception_throw + 56
[debug] [35m[XCUITest][39m 2 CoreFoundation 0x00000001f3d36ccc + 0
[debug] [35m[XCUITest][39m 3 CoreFoundation 0x00000001f3e1e7dc + 1412
[debug] [35m[XCUITest][39m 4 CoreFoundation 0x00000001f3e2048c _CF_forwarding_prep_0 + 92
[debug] [35m[XCUITest][39m 5 WebDriverAgentLib 0x00000001030ac634 __37+[FBApplication fb_activeApplication]_block_invoke + 52
[debug] [35m[XCUITest][39m 6 WebDriverAgentLib 0x0000000103085764 -[FBRunLoopSpinner spinUntilTrue:error:] + 152
[debug] [35m[XCUITest][39m 7 WebDriverAgentLib 0x00000001030856a4 -[FBRunLoopSpinner spinUntilTrue:] + 84
[debug] [35m[XCUITest][39m 8 WebDriverAgentLib 0x00000001030ac394 +[FBApplication fb_activeApplication] + 128
[debug] [35m[XCUITest][39m 9 WebDriverAgentLib 0x0000000103097dd8 -[FBSession application] + 332
[debug] [35m[XCUITest][39m 10 WebDriverAgentLib 0x000000010309eba8 +[FBSessionCommands currentCapabilities] + 124
[debug] [35m[XCUITest][39m 11 WebDriverAgentLib 0x000000010309ea64 +[FBSessionCommands sessionInformation] + 288
[debug] [35m[XCUITest][39m 12 WebDriverAgentLib 0x000000010309e09c +[FBSessionCommands handleCreateSession:] + 1404
[debug] [35m[XCUITest][39m 13 WebDriverAgentLib 0x0000000103084184 -[FBRoute_TargetAction mountRequest:intoResponse:] + 220
[debug] [35m[XCUITest][39m 14 WebDriverAgentLib 0x000000010307a624 __37-[FBWebServer registerRouteHandlers:]_block_invoke + 504
[debug] [35m[XCUITest][39m 15 RoutingHTTPServer 0x000000010313a3cc -[RoutingHTTPServer handleRoute:withRequest:response:] + 144
[debug] [35m[XCUITest][39m 16 RoutingHTTPServer 0x000000010313ab80 __72-[RoutingHTTPServer routeMethod:withPath:parameters:request:connection:]_block_invoke + 44
[debug] [35m[XCUITest][39m 17 libdispatch.dylib 0x00000001f3852484 + 16
[debug] [35m[XCUITest][39m 18 libdispatch.dylib 0x00000001f37ff6a0 + 92
[debug] [35m[XCUITest][39m 19 libdispatch.dylib 0x00000001f3852484 + 16
[debug] [35m[XCUITest][39m 20 libdispatch.dylib 0x00000001f37fe9a4 + 1068
[debug] [35m[XCUITest][39m 21 CoreFoundation 0x00000001f3da8df4 + 12
[debug] [35m[XCUITest][39m 22 CoreFoundation 0x00000001f3da3cbc + 1964
[debug] [35m[XCUITest][39m 23 CoreFoundation 0x00000001f3da31f0 CFRunLoopRunSpecific + 436
[debug] [35m[XCUITest][39m 24 Foundation 0x00000001f4799494 + 300
[debug] [35m[XCUITest][39m 25 WebDriverAgentLib 0x0000000103079630 -[FBWebServer startServing] + 416
[debug] [35m[XCUITest][39m 26 WebDriverAgentRunner 0x0000000103063be8 -[UITestingUITests testRunner] + 124
[debug] [35m[XCUITest][39m 27 CoreFoundation 0x00000001f3e20630 + 144
[debug] [35m[XCUITest][39m 28 CoreFoundation 0x00000001f3cfe450 + 292
[debug] [35m[XCUITest][39m 29 XCTest 0x000000010116600c __24-[XCTestCase invokeTest]_block_invoke_2.200 + 68
[debug] [35m[XCUITest][39m 30 XCTest 0x00000001011cdef8 -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 68
[debug] [35m[XCUITest][39m 31 XCTest 0x000000010116e604 -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] + 112
[debug] [35m[XCUITest][39m 32 XCTest 0x0000000101165f98 __24-[XCTestCase invokeTest]_block_invoke.194 + 196
[debug] [35m[XCUITest][39m 33 XCTest 0x00000001011baed4 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 64
[debug] [35m[XCUITest][39m 34 XCTest 0x00000001011badec -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 108
[debug] [35m[XCUITest][39m 35 XCTest 0x0000000101165bc8 __24-[XCTestCase invokeTest]_block_invoke + 808
[debug] [35m[XCUITest][39m 36 XCTest 0x00000001011c0e8c -[XCUITestContext performInScope:] + 144
[debug] [35m[XCUITest][39m 37 XCTest 0x00000001011657cc -[XCTestCase testContextPerformInScope:] + 120
[debug] [35m[XCUITest][39m 38 XCTest 0x000000010116588c -[XCTestCase invokeTest] + 140
[debug] [35m[XCUITest][39m 39 XCTest 0x000000010116735c __26-[XCTestCase performTest:]_block_invoke_2 + 44
[debug] [35m[XCUITest][39m 40 XCTest 0x00000001011baed4 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 64
[debug] [35m[XCUITest][39m 41 XCTest 0x00000001011badec -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 108
[debug] [35m[XCUITest][39m 42 XCTest 0x0000000101167274 __26-[XCTestCase performTest:]_block_invoke.324 + 96
[debug] [35m[XCUITest][39m 43 XCTest 0x00000001011cb440 +[XCTContext runInContextForTestCase:block:] + 216
[debug] [35m[XCUITest][39m 44 XCTest 0x0000000101166a2c -[XCTestCase performTest:] + 644
[debug] [35m[XCUITest][39m 45 XCTest 0x00000001011a80e8 -[XCTest runTest] + 60
[debug] [35m[XCUITest][39m 46 XCTest 0x000000010116181c __27-[XCTestSuite performTest:]_block_invoke + 280
[debug] [35m[XCUITest][39m 47 XCTest 0x000000010116113c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 68
[debug] [35m[XCUITest][39m 48 XCTest 0x00000001011613d8 -[XCTestSuite performTest:] + 276
[debug] [35m[XCUITest][39m 49 XCTest 0x00000001011a80e8 -[XCTest runTest] + 60
[debug] [35m[XCUITest][39m 50 XCTest 0x000000010116181c __27-[XCTestSuite performTest:]_block_invoke + 280
[debug] [35m[XCUITest][39m 51 XCTest 0x000000010116113c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 68
[debug] [35m[XCUITest][39m 52 XCTest 0x00000001011613d8 -[XCTestSuite performTest:] + 276
[debug] [35m[XCUITest][39m 53 XCTest 0x00000001011a80e8 -[XCTest runTest] + 60
[debug] [35m[XCUITest][39m 54 XCTest 0x000000010116181c __27-[XCTestSuite performTest:]_block_invoke + 280
[debug] [35m[XCUITest][39m 55 XCTest 0x000000010116113c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 68
[debug] [35m[XCUITest][39m 56 XCTest 0x00000001011613d8 -[XCTestSuite performTest:] + 276
[debug] [35m[XCUITest][39m 57 XCTest 0x00000001011a80e8 -[XCTest runTest] + 60
[debug] [35m[XCUITest][39m 58 XCTest 0x00000001011d86a8 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 176
[debug] [35m[XCUITest][39m 59 XCTest 0x00000001011d8778 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.80 + 60
[debug] [35m[XCUITest][39m 60 XCTest 0x00000001011786d0 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 516
[debug] [35m[XCUITest][39m 61 XCTest 0x00000001011d8464 -[XCTTestRunSession runTestsAndReturnError:] + 596
[debug] [35m[XCUITest][39m 62 XCTest 0x0000000101146704 -[XCTestDriver runTestsAndReturnError:] + 436
[debug] [35m[XCUITest][39m 63 XCTest 0x00000001011c78c0 _XCTestMain + 2248
[debug] [35m[XCUITest][39m 64 WebDriverAgentRunner-Runner 0x0000000100d0fb60 -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0
[debug] [35m[XCUITest][39m 65 WebDriverAgentRunner-Runner 0x0000000100d0fa68 _XCTRunnerRunTests + 0
[debug] [35m[XCUITest][39m 66 CoreFoundation 0x00000001f3da9040 + 20
[debug] [35m[XCUITest][39m 67 CoreFoundation 0x00000001f3da8940 + 272
[debug] [35m[XCUITest][39m 68 CoreFoundation 0x00000001f3da3934 + 1060
[debug] [35m[XCUITest][39m 69 CoreFoundation 0x00000001f3da31f0 CFRunLoopRunSpecific + 436
[debug] [35m[XCUITest][39m 70 GraphicsServices 0x00000001f601c584 GSEventRunModal + 100
[debug] [35m[XCUITest][39m 71 UIKitCore 0x0000000220faed40 UIApplicationMain + 212
[debug] [35m[XCUITest][39m 72 WebDriverAgentRunner-Runner 0x0000000100d0fd3c main + 192
[debug] [35m[XCUITest][39m 73 libdyld.dylib 0x00000001f3862bb4 + 4
[debug] [35m[XCUITest][39m )). Retrying...[debug] [35m[BaseDriver][39m Event 'wdaSessionAttempted' logged at 1555580809243 (17:46:49 GMT+0800 (CST))
[debug] [35m[XCUITest][39m Sending createSession command to WDA
[debug] [35m[WD Proxy][39m Matched '/session' to command name 'createSession'
[debug] [35m[WD Proxy][39m Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.ss.iphone.article.News","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}


↙↙↙阅读原文可查看相关链接,并与作者交流