While opening the WebDriverAgent on xcode a weird warning appears

While attempting to install the WebDriverAgent on our iPhone a new weird warning occurs (see attached image):

Any idea what went wrong & what is the workaround?

I suspect that due to this warning I can’t install properly the WebDriverAgent with the “xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=51d8c712258a5b0ac63516aa5be9d10014b0c270’ test” command

Thanks

@menypeled did you add developer signature to “WebDriverAgent” and build it successfully? link - https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

I have signed it & all seems fine however when I tried to install the WebDriverAgent on the iphone (in the past it always went smoothly) then it fails (See the log below).

Recently I have upgraded the iPhone to iOS 10.3.3 (maybe it is related?)


Last login: Tue Aug 29 14:54:34 on ttys001
Menys-MacBook-Pro:~ menypeled$ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
Menys-MacBook-Pro:WebDriverAgent menypeled$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=51d8c712258a5b0ac63516aa5be9d10014b0c270’ test
2017-08-29 15:44:07.647 xcodebuild[7329:832806] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/menypeled/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/66E68FEB-D636-4BDB-88AE-EA9CAF6D6E7F/Session-WebDriverAgentRunner-2017-08-29_154407-SYnrQP.log
2017-08-29 15:44:07.647 xcodebuild[7329:832803] [MT] IDETestOperationsObserverDebug: (8C6F9D08-6F81-4CCA-BE37-171189F1690B) Beginning test session WebDriverAgentRunner-8C6F9D08-6F81-4CCA-BE37-171189F1690B at 2017-08-29 15:44:07.647 with Xcode 8E3004b on target <DVTiOSDevice: 0x7fe0eb21f8f0> {
deviceSerialNumber: DNRMV9JZFFG8
identifier: 51d8c712258a5b0ac63516aa5be9d10014b0c270
deviceClass: iPhone
deviceName: SG iPhone 5s
deviceIdentifier: 51d8c712258a5b0ac63516aa5be9d10014b0c270
productVersion: 10.3.3
buildVersion: 14G60
deviceSoftwareVersion: 10.3.3 (14G60)
deviceArchitecture: arm64
deviceTotalCapacity: 12386914304
deviceAvailableCapacity: 7574310912
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
isPasscodeLocked: NO
deviceType: <DVTDeviceType:0x7fe0eae93470 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
bootArgs:
} (10.3.3 (14G60))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/bac936b78f540f1702001d6edfd4d8a8/51d8c712258a5b0ac63516aa5be9d10014b0c270/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/menypeled/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QMwpul/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QMwpul/WebDriverAgentRunner-Runner.app_sparse.ipa
MDMDirectoryDiff_block_invoke:1473 calling writeDictToFile with: /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QMwpul/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/mr/lbh2rfw568g5v74x7g7vgx440000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.QMwpul/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
2017-08-29 15:44:15.102360+0300 XCTRunner[532:67653] Running tests…
2017-08-29 15:44:15.175752+0300 XCTRunner[532:67653] The bundle “WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2017-08-29 15:44:15.175885+0300 XCTRunner[532:67653] (dlopen_preflight(/var/containers/Bundle/Application/78BFBDEA-0E35-45CD-A9DF-461F4E0FA348/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner): Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer
Referenced from: /private/var/containers/Bundle/Application/78BFBDEA-0E35-45CD-A9DF-461F4E0FA348/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/WebDriverAgentLib
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/78BFBDEA-0E35-45CD-A9DF-461F4E0FA348/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer: code signature invalid for ‘/private/var/containers/Bundle/Application/78BFBDEA-0E35-45CD-A9DF-461F4E0FA348/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer’
)
2017-08-29 15:44:15.164 xcodebuild[7329:832803] 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}

Testing failed:
Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

[Meny]: I have tried to trust the app via the iPhone settings in order to avoid it however the error remains.

@menypeled try remove webdriveragent from phone. rebuild it again. and retry…

Already did & issue remains.

Regard your link, there are 3 methods how to run XCUITest on real device:

  1. Basic (automatic) configuration
  2. Basic (manual) configuration
  3. Full manual configuration
    Till now we have used the third method, however now as mentioned it fails.

I tried the First method & when I run the code then the WebDriverAgent is installed with our app however then the WebDriverAgent is removed & the tests fail (see below log).

Creating new XCUITestDriver (v2.47.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/menypeled/Documents/workspace/iOS_Appium/SkyGiraffe_5.12.2.app’
[Appium] newCommandTimeout: 100000
[Appium] platformVersion: ‘10.3.3’
[Appium] xcodeOrgId: ‘7Y5J2RJXYV’
[Appium] automationName: ‘XCUITest’
[Appium] useNewWDA: ‘true’
[Appium] udid: ‘51d8c712258a5b0ac63516aa5be9d10014b0c270’
[Appium] platformName: ‘iOS’
[Appium] deviceName: ‘SG iPhone 5s’
[Appium] updatedWDABundleId: ‘beta.SkyGiraffe.SkyGiraffe’
[Appium] xcodeSigningId: ‘iPhone Developer’
[BaseDriver] Capability ‘useNewWDA’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Session created with session id: 6cfd96ae-d4da-480e-8f1f-05f288832264
[debug] [XCUITest] Xcode version set to ‘8.3.3’ (tools v8.3.2.0.1.1492020469)
[debug] [XCUITest] iOS SDK Version set to ‘10.3’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1504018508850 (17:55:08 GMT+0300 (IDT))
[debug] [XCUITest] Available devices:
[XCUITest] Error: Unknown device or simulator UDID: ‘51d8c712258a5b0ac63516aa5be9d10014b0c270’
at XCUITestDriver.determineDevice$ (…/…/lib/driver.js:622:17)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unknown device or simulator UDID: ‘51d8c712258a5b0ac63516aa5be9d10014b0c270’
at XCUITestDriver.determineDevice$ (…/…/lib/driver.js:622:17)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[MJSONWP] Encountered internal error running command: Error: Unknown device or simulator UDID: ‘51d8c712258a5b0ac63516aa5be9d10014b0c270’
at XCUITestDriver.determineDevice$ (…/…/lib/driver.js:622:17)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

check ID. try to install manually using same ID will it succeed?

If you mean to manually install our app then it is installed successfully.
Actually, it is installed successfully via the code as well the problem is that the WebDriverAgent is failing after it is installed

@menypeled if you do “instruments -s devices” in command line can you see your UDID ?

Hi,

After I remove the appium & reinstall it with the XCUITest Full manual configuration it worked again.

Thanks for the assistance