Appium appium 命令行方式启动失败,提示 xcode 编译 webdriver 失败,但是同一个 webdriver 在客户端方式启动没有问题,帮忙看一下,谢谢

ashen100200 · 2017年11月09日 · 最后由 jade685 回复于 2019年01月29日 · 1636 次阅读

ipv6-mac:WebDriverAgent root# appium
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"capabilities":{"alwaysMatch":{"unicodeKeyboard":true,"deviceName":"ashen","udid":"22049beae0f27f0388556595d9da3049a5fe2c33","newCommandTimeout":"200","platformVersion":"11.0.2","platformName":"iOS","bundleId":"com.tencent.xin"},"firstMatch":[]},"desiredCapabilities":{"unicodeKeyboard":true,"deviceName":"ashen","udid":"22049beae0f27f0388556595d9da3049a5fe2c33","newCommandTimeout":"200","platformVersion":"11.0.2","platformName":"iOS","bundleId":"com.tencent.xin"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"unicodeKeyboard":true,"deviceName":"ashen","udid":"22049beae0f27f0388556595d9da3049a5fe2c33","newCommandTimeout":"200","platformVersion":"11.0.2","platformName":"iOS","bundleId":"com.tencent.xin"},null,{"alwaysMatch":{"unicodeKeyboard":true,"deviceName":"ashen","udid":"22049beae0f27f0388556595d9da3049a5fe2c33","newCommandTimeout":"200","platformVersion":"11.0.2","platformName":"iOS","bundleId":"com.tencent.xin"},"firstMatch":[]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1510215221983 (16:13:41 GMT+0800 (CST))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] unicodeKeyboard: true
[Appium] deviceName: 'ashen'
[Appium] udid: '22049beae0f27f0388556595d9da3049a5fe2c33'
[Appium] newCommandTimeout: '200'
[Appium] platformVersion: '11.0.2'
[Appium] platformName: 'iOS'
[Appium] bundleId: 'com.tencent.xin'
[debug] [XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] Capability 'newCommandTimeout' changed from string ('200') to integer (200). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: unicodeKeyboard.
[BaseDriver] Session created with session id: f1d3f93d-8993-48db-bb89-978983e34c3b
[debug] [XCUITest] Xcode version set to '9.1' (tools v9.0.1.0.1.1506734476)
[debug] [XCUITest] iOS SDK Version set to '11.1'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1510215222105 (16:13:42 GMT+0800 (CST))
[debug] [XCUITest] Available devices: 22049beae0f27f0388556595d9da3049a5fe2c33
[debug] [XCUITest] Creating iDevice object with udid '22049beae0f27f0388556595d9da3049a5fe2c33'
[XCUITest] Determining device to run tests on: udid: '22049beae0f27f0388556595d9da3049a5fe2c33', real device: true
[debug] [BaseDriver] Event 'appConfigured' logged at 1510215222239 (16:13:42 GMT+0800 (CST))
[debug] [BaseDriver] Event 'resetStarted' logged at 1510215222583 (16:13:42 GMT+0800 (CST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event 'resetComplete' logged at 1510215222585 (16:13:42 GMT+0800 (CST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1510215222612 (16:13:42 GMT+0800 (CST))
[XCUITest] Setting up real device
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1510215222616 (16:13:42 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=22049beae0f27f0388556595d9da3049a5fe2c33 -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=11.0' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] 2017-11-09 16:13:49.571 xcodebuild[62708:1356251] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7ff3265b9fc0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2017-11-09 16:13:49.571 xcodebuild[62708:1356251] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7ff323ed56d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] ** TEST BUILD FAILED **
[Xcode]
[Xcode]
[Xcode] The following build commands failed:
[Xcode] Check dependencies
Xcode
[Xcode]
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.apple.dt.XCTest/IDETestRunSession-804A19F0-BD52-4639-AC84-2523E258FFCF/WebDriverAgentRunner-6013A94F-E275-47AE-8655-18B16569B131/Session-WebDriverAgentRunner-2017-11-09_161349-q3jQwU.log
[Xcode] 2017-11-09 16:13:49.598 xcodebuild[62708:1356214] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.apple.dt.XCTest/IDETestRunSession-804A19F0-BD52-4639-AC84-2523E258FFCF/WebDriverAgentRunner-6013A94F-E275-47AE-8655-18B16569B131/Session-WebDriverAgentRunner-2017-11-09_161349-q3jQwU.log
[Xcode]
[Xcode] 2017-11-09 16:13:49.599 xcodebuild[62708:1356212] [MT] IDETestOperationsObserverDebug: (5719A407-0F01-44B8-8D74-5BC294058D44) Beginning test session WebDriverAgentRunner-5719A407-0F01-44B8-8D74-5BC294058D44 at 2017-11-09 16:13:49.599 with Xcode 9B55 on target {
[Xcode] deviceSerialNumber: FK1S9CWLHG6X
[Xcode] identifier: 22049beae0f27f0388556595d9da3049a5fe2c33
[Xcode] deviceClass: iPhone
[Xcode] deviceName: ashen
[Xcode] deviceIdentifier: 22049beae0f27f0388556595d9da3049a5fe2c33
[Xcode] productVersion: 11.0.2
[Xcode] buildVersion: 15A421
[Xcode] deviceSoftwareVersion: 11.0.2 (15A421)
[Xcode] deviceArchitecture: arm64
[Xcode] deviceTotalCapacity: 28634349568
[Xcode] deviceAvailableCapacity: 1976983552
[Xcode] deviceIsTransient: NO
[Xcode] ignored: NO
[Xcode] deviceIsBusy: NO
[Xcode] deviceIsActivated: YES
[Xcode] deviceActivationState: Activated
[Xcode] isPasscodeLocked: NO
[Xcode] deviceType:
[Xcode] supportedDeviceFamilies: (
[Xcode] 1
[Xcode] )
[Xcode] applications: (null)
[Xcode] provisioningProfiles: (null)
[Xcode] hasInternalSupport: NO
[Xcode] isSupportedOS: YES
[Xcode] developerDiskMountError: (null)
Xcode
[Xcode] bootArgs:
[Xcode] connected: yes
[Xcode] isWirelessEnabled: no
[Xcode] connectionType: direct
[Xcode] } (11.0.2 (15A421))
[Xcode]
[Xcode] 2017-11-09 16:13:49.651 xcodebuild[62708:1356212] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7ff3269b5a60 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2017-11-09 16:13:49.651 xcodebuild[62708:1356212] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1510215229666 (16:13:49 GMT+0800 (CST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 62707)
[debug] [XCUITest] iproxy exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1510215240312 (16:14:00 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=22049beae0f27f0388556595d9da3049a5fe2c33 -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=11.0' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] 2017-11-09 16:14:06.952 xcodebuild[62741:1356392] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7faeaf0fa700 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2017-11-09 16:14:06.953 xcodebuild[62741:1356392] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/WebDriverAgentRunner_iphoneos11.1-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7faeaf0a9910 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] ** TEST BUILD FAILED **
[Xcode]
[Xcode]
[Xcode] The following build commands failed:
[Xcode] Check dependencies
Xcode
[Xcode]
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.apple.dt.XCTest/IDETestRunSession-AF043782-D9E0-4A1D-81D9-9451D205D6CE/WebDriverAgentRunner-E805392E-77E4-411D-AC02-146BC0971F96/Session-WebDriverAgentRunner-2017-11-09_161406-1NLSPh.log
[Xcode] 2017-11-09 16:14:06.984 xcodebuild[62741:1356466] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/com.apple.dt.XCTest/IDETestRunSession-AF043782-D9E0-4A1D-81D9-9451D205D6CE/WebDriverAgentRunner-E805392E-77E4-411D-AC02-146BC0971F96/Session-WebDriverAgentRunner-2017-11-09_161406-1NLSPh.log
[Xcode]
[Xcode] 2017-11-09 16:14:06.985 xcodebuild[62741:1356391] [MT] IDETestOperationsObserverDebug: (85E475EF-D378-4685-BA8A-7A5F90A6D1BF) Beginning test session WebDriverAgentRunner-85E475EF-D378-4685-BA8A-7A5F90A6D1BF at 2017-11-09 16:14:06.984 with Xcode 9B55 on target {
[Xcode] deviceSerialNumber: FK1S9CWLHG6X
[Xcode] identifier: 22049beae0f27f0388556595d9da3049a5fe2c33
[Xcode] deviceClass: iPhone
[Xcode] deviceName: ashen
[Xcode] deviceIdentifier: 22049beae0f27f0388556595d9da3049a5fe2c33
[Xcode] productVersion: 11.0.2
[Xcode] buildVersion: 15A421
[Xcode] deviceSoftwareVersion: 11.0.2 (15A421)
[Xcode] deviceArchitecture: arm64
[Xcode] deviceTotalCapacity: 28634349568
[Xcode] deviceAvailableCapacity: 1984086016
[Xcode] deviceIsTransient: NO
[Xcode] ignored: NO
[Xcode] deviceIsBusy: NO
[Xcode] deviceIsActivated: YES
[Xcode] deviceActivationState: Activated
[Xcode] isPasscodeLocked: NO
[Xcode] deviceType:
[Xcode] supportedDeviceFamilies: (
[Xcode] 1
[Xcode] )
[Xcode] applications: (null)
[Xcode] provisioningProfiles: (null)
[Xcode] hasInternalSupport: NO
[Xcode] isSupportedOS: YES
[Xcode] developerDiskMountError: (null)
Xcode
[Xcode] bootArgs:
[Xcode] connected: yes
[Xcode] isWirelessEnabled: no
[Xcode] connectionType: direct
[Xcode] } (11.0.2 (15A421))
[Xcode]
[Xcode] 2017-11-09 16:14:07.021 xcodebuild[62741:1356391] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7faeaf7544f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2017-11-09 16:14:07.021 xcodebuild[62741:1356391] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1510215247037 (16:14:07 GMT+0800 (CST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 62738)
[debug] [XCUITest] iproxy exited with code 'null'
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:386:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:109:7)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:386:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:109:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (../../lib/driver.js:386:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:109:7)
[HTTP] <-- POST /wd/hub/session 500 35262 ms - 230

共收到 3 条回复 时间 点赞

手动使用 xcode 编译 WebDriverAgent.xcodeproj 没有问题

这个问题解决了没?麻烦问下什么原因?

请问楼主这个问题解决了吗

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册