我在Mac上运行appium,尝试将其设置为在真正的iPhone设备上进行测试。
我从Apple Developer网站下载并安装了证书。第一次,机票要求我输入我的登录密钥,但是当我输入用于登录Mac的密码时,它无效。我把它放了几次,但没有。
所以,我重置了我的登录密钥,从我的mac中删除了证书,redownloaded并安装了证书。现在,当我运行它时,它甚至都没有检测到证书,尽管证书在我登录密钥链中的密钥下可见。至少,这是我从阅读日志中理解的。自从我重置登录密钥链后,它也没有再要求我输入密码。
这是日志输出:
[Appium] Welcome to Appium v1.7.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 7 ms - 29
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"XCUITest","bundleId":"com.REDACTED","deviceName":"REDACTED's iPhone","launchTimeout":500000,"noReset":true,"platformName":"iOS","platformVersion":"iOS 11.2","showXcodeLog":true,"udid":"REDACTED","xcodeOrgId":"REDACTED","xcodeSigningId":"iPhone Developer","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"XCUITest","bundleId":"com.REDACTED","deviceName":"REDACTED's iPhone","launchTimeout":500000,"noReset":true,"platformName":"iOS","platformVersion":"iOS 11.2","showXcodeLog":true,"udid":"REDACTED","xcodeOrgId":"REDACTED","xcodeSigningId":"iPhone Developer","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1525888108159 (13:48:28 GMT-0400 (EDT))
[Appium] Creating new XCUITestDriver (v2.64.0) session
[Appium] Capabilities:
[Appium] automationName: XCUITest
[Appium] bundleId: com.REDACTED
[Appium] deviceName: REDACTED's iPhone
[Appium] launchTimeout: 500000
[Appium] noReset: true
[Appium] platformName: iOS
[Appium] platformVersion: iOS 11.2
[Appium] showXcodeLog: true
[Appium] udid: REDACTED
[Appium] xcodeOrgId: REDACTED
[Appium] xcodeSigningId: iPhone Developer
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Session created with session id: 780e4291-5d28-4758-a05a-c0abab1c0e08
[XCUITest] Current user: 'REDACTED'
[XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[XCUITest] Xcode version set to '9.3' (tools v9.3.0.0.1.1521514116)
[XCUITest] iOS SDK Version set to '11.3'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1525888109132 (13:48:29 GMT-0400 (EDT))
[XCUITest] Available devices: REDACTED, REDACTED
[XCUITest] Creating iDevice object with udid 'REDACTED'
[XCUITest] Determining device to run tests on: udid: 'REDACTED', real device: true
[BaseDriver] Event 'appConfigured' logged at 1525888109264 (13:48:29 GMT-0400 (EDT))
[BaseDriver] Event 'resetStarted' logged at 1525888109264 (13:48:29 GMT-0400 (EDT))
[XCUITest] Reset: fullReset not set. Leaving as is
[BaseDriver] Event 'resetComplete' logged at 1525888109265 (13:48:29 GMT-0400 (EDT))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[BaseDriver] Event 'logCaptureStarted' logged at 1525888109513 (13:48:29 GMT-0400 (EDT))
[XCUITest] Setting up real device
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] WDA is not listening at 'http://localhost:8100/'
[BaseDriver] Event 'wdaStartAttempted' logged at 1525888109808 (13:48:29 GMT-0400 (EDT))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.*REDACTED, iproxy 8100' for the device REDACTED...
[XCUITest] 'pgrep -nif xcodebuild.*REDACTED' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[XCUITest] Using Xcode 9.3, so fixing WDA codebase
[XCUITest] Generating xcode config file for orgId 'REDACTED' and signingId 'iPhone Developer'
[XCUITest] Writing xcode config file to /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/201849-11117-1sg0jyb.rond/appium-temp.xcconfig
[XCUITest] Cannot parse major and minor version numbers from platformVersion "iOS 11.2". Will build for the default platform instead
[XCUITest] Using Xcode configuration file: '/var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/201849-11117-1sg0jyb.rond/appium-temp.xcconfig'
[XCUITest] 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=REDACTED -xcconfig /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/201849-11117-1sg0jyb.rond/appium-temp.xcconfig' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will be logged. To see xcode logging, use 'showXcodeLog' desired capability
[Xcode] Build settings from configuration file '/var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/201849-11117-1sg0jyb.rond/appium-temp.xcconfig':
[Xcode] CODE_SIGN_IDENTITY = iPhone Developer
[Xcode] DEVELOPMENT_TEAM = REDACTED
[Xcode]
[Xcode]
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] 2018-05-09 13:48:35.763 xcodebuild[11306:315331] DTDeviceKit: deviceType from REDACTED was NULL
[Xcode]
[Xcode] 2018-05-09 13:48:35.800 xcodebuild[11306:315351] DTDeviceKit: deviceType from REDACTED was NULL
[Xcode]
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[Xcode] === BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
[Xcode]
[Xcode]
[Xcode] Check dependencies
[Xcode]
[Xcode] Code Signing Error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "REDACTED" with a private key was found.
[Xcode]
[Xcode]
[Xcode]
[Xcode] 2018-05-09 13:48:36.311 xcodebuild[11306:315331] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.3-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/REDACTED/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/WebDriverAgentRunner_iphoneos11.3-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7f838aa23cd0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2018-05-09 13:48:36.312 xcodebuild[11306:315331] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos11.3-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/REDACTED/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/WebDriverAgentRunner_iphoneos11.3-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7f838a9a8f10 {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] (1 failure)
[Xcode]
[XCUITest] Log file for xcodebuild test: /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/com.apple.dt.XCTest/IDETestRunSession-21B1687C-0753-494A-8BAF-F2B5FEFC0ED4/WebDriverAgentRunner-52A21D91-177E-44F2-98C8-ABED2E18AF62/Session-WebDriverAgentRunner-2018-05-09_134836-mCiI7g.log
[Xcode] 2018-05-09 13:48:36.335 xcodebuild[11306:315331] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/com.apple.dt.XCTest/IDETestRunSession-21B1687C-0753-494A-8BAF-F2B5FEFC0ED4/WebDriverAgentRunner-52A21D91-177E-44F2-98C8-ABED2E18AF62/Session-WebDriverAgentRunner-2018-05-09_134836-mCiI7g.log
[Xcode]
[Xcode] 2018-05-09 13:48:36.336 xcodebuild[11306:315330] [MT] IDETestOperationsObserverDebug: (2BDA7059-B72B-4BC1-BE39-5885047BD65F) Beginning test session WebDriverAgentRunner-2BDA7059-B72B-4BC1-BE39-5885047BD65F at 2018-05-09 13:48:36.336 with Xcode 9E145 on target {
[Xcode] deviceSerialNumber: F17RH1X0H2XQ
[Xcode] identifier: REDACTED
[Xcode] deviceClass: iPhone
[Xcode] deviceName: REDACTED’s iPhone
[Xcode] deviceIdentifier: REDACTED
[Xcode] productVersion: 11.3
[Xcode] buildVersion: 15E216
[Xcode] deviceSoftwareVersion: 11.3 (15E216)
[Xcode] deviceArchitecture: arm64
[Xcode] deviceTotalCapacity: 12580106240
[Xcode] deviceAvailableCapacity: 6049345536
[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] (null)
[Xcode] bootArgs:
[Xcode] connected: yes
[Xcode] isWirelessEnabled: no
[Xcode] connectionType: direct
[Xcode] } (11.3 (15E216))
[Xcode]
[Xcode] 2018-05-09 13:48:36.360 xcodebuild[11306:315330] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/REDACTED/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f8385665a20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode]
[Xcode] 2018-05-09 13:48:36.360 xcodebuild[11306:315330] 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, NSUnderlyingError=0x7f8387141c00 {Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/REDACTED/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f8385665a20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
[Xcode]
[Xcode] Testing failed:
[Xcode] No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "REDACTED" with a private key was found.
[Xcode] Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[Xcode] Contents of xcodebuild log file '/var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/com.apple.dt.XCTest/IDETestRunSession-21B1687C-0753-494A-8BAF-F2B5FEFC0ED4/WebDriverAgentRunner-52A21D91-177E-44F2-98C8-ABED2E18AF62/Session-WebDriverAgentRunner-2018-05-09_134836-mCiI7g.log':
[Xcode] 13:48:36.337 xcodebuild[11306:315330] Beginning test session WebDriverAgentRunner-2BDA7059-B72B-4BC1-BE39-5885047BD65F at 2018-05-09 13:48:36.336 with Xcode 9E145 on target {
[Xcode] deviceSerialNumber: F17RH1X0H2XQ
[Xcode] identifier: REDACTED
[Xcode] deviceClass: iPhone
[Xcode] deviceName: REDACTED’s iPhone
[Xcode] deviceIdentifier: REDACTED
[Xcode] productVersion: 11.3
[Xcode] buildVersion: 15E216
[Xcode] deviceSoftwareVersion: 11.3 (15E216)
[Xcode] deviceArchitecture: arm64
[Xcode] deviceTotalCapacity: 12580106240
[Xcode] deviceAvailableCapacity: 6049345536
[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] (null)
[Xcode] bootArgs:
[Xcode] connected: yes
[Xcode] isWirelessEnabled: no
[Xcode] connectionType: direct
[Xcode] } (11.3 (15E216))
[Xcode] 13:48:36.337 xcodebuild[11306:315330] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
[Xcode] build-for-testing
[Xcode] test-without-building
[Xcode] -project
[Xcode] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[Xcode] -scheme
[Xcode] WebDriverAgentRunner
[Xcode] -destination
[Xcode] id=REDACTED
[Xcode] -xcconfig
[Xcode] /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/201849-11117-1sg0jyb.rond/appium-temp.xcconfig
[Xcode] 13:48:36.337 xcodebuild[11306:315330] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
[Xcode] 13:48:36.342 xcodebuild[11306:315330] Test standard output and standard error is at /var/folders/_r/0dsmcvp57ld6qh2cw41rfpb5b01q6j/T/com.apple.dt.XCTest/IDETestRunSession-21B1687C-0753-494A-8BAF-F2B5FEFC0ED4/WebDriverAgentRunner-52A21D91-177E-44F2-98C8-ABED2E18AF62/StandardOutputAndStandardError.txt
[Xcode] 13:48:36.347 xcodebuild[11306:315330] Setting up test runner session
[Xcode] 13:48:36.349 xcodebuild[11306:315330] Launch session started.
[Xcode] 13:48:36.353 xcodebuild[11306:315330] Test operation failure: Launch session expired before checking in.
[Xcode] 13:48:36.353 xcodebuild[11306:315330] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Launch session expired before checking in." UserInfo={NSLocalizedDescription=Launch session expired before checking in.}
[Xcode]
[BaseDriver] Event 'wdaStartFailed' logged at 1525888116386 (13:48:36 GMT-0400 (EDT))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". 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, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 11305)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". 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. at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". 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. at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[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". 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. at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at
[HTTP] <-- POST /wd/hub/session 500 8457 ms - 470
答案 0 :(得分:0)
当我重置计算机时,这个问题实际上已经消失了。所以,我猜测它与密码和我当前的登录会话有关。