After bootstrapping the project, I selected the WebDriverAgentRunner then selected Project -> Test. The app is installed on an iPhone 6 running 9.3.2, but crashes on launch. iOS console logs show the following:
Jul 2 19:51:49 iPhone6 SpringBoard[58]
Added: {(
)}
Removed: {(
)}
Modified: {(
"com.apple.test.WebDriverAgentRunner-Runner"
)}
Jul 2 19:51:50 iPhone6 kernel[0]
Jul 2 19:51:50 iPhone6 UserEventAgent[26]
Jul 2 19:51:50 iPhone6 UserEventAgent[26]
Jul 2 19:51:50 iPhone6 MobileMail[388]
Jul 2 19:51:50 iPhone6 mobile_house_arrest[975]
Jul 2 19:51:50 iPhone6 com.apple.xpc.launchd1
Jul 2 19:51:51 iPhone6 syncdefaultsd[968]
Jul 2 19:51:51 iPhone6 kernel[0]
Jul 2 19:51:51 iPhone6 UserEventAgent[26]
Jul 2 19:51:51 iPhone6 UserEventAgent[26]
Jul 2 19:51:51 iPhone6 MobileMail[388]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
for arm64.
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 SpringBoard[58]
Jul 2 19:51:52 iPhone6 com.apple.xpc.launchd1
Jul 2 19:51:52 iPhone6 securityd[93]
Jul 2 19:51:52 iPhone6 amfid[225]
Jul 2 19:51:52 iPhone6 kernel[0]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:52 iPhone6 SpringBoard[58]
Jul 2 19:51:53 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:53 iPhone6 com.apple.xpc.launchd[1]
Jul 2 19:51:53 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:54 iPhone6 XCTRunner[979]
Jul 2 19:51:54 iPhone6 securityd[93]
Jul 2 19:51:54 iPhone6 amfid[225]
Jul 2 19:51:54 iPhone6 kernel[0]
Jul 2 19:51:54 iPhone6 kernel[0]
Jul 2 19:51:54 iPhone6 kernel[0]
Jul 2 19:51:54 iPhone6 XCTRunner[979]
Jul 2 19:51:54 iPhone6 XCTRunner[979]
Referenced from: /private/var/containers/Bundle/Application/6A4098C5-4538-4F67-A7C2-9688D369A880/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/WebDriverAgentLib
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/6A4098C5-4538-4F67-A7C2-9688D369A880/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/KissXML.framework/KissXML: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/6A4098C5-4538-4F67-A7C2-9688D369A880/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/KissXML.framework/KissXML')
Jul 2 19:51:54 iPhone6 SpringBoard[58]
Jul 2 19:51:54 iPhone6 SpringBoard[58]
Jul 2 19:51:54 iPhone6 com.apple.xpc.launchd1
Jul 2 19:51:54 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:54 iPhone6 com.apple.debugserver-@(#)PROGRAM:debugserver PROJECT:debugserver-340.3.124
[978]
Jul 2 19:51:54 iPhone6 testmanagerd[974]
Jul 2 19:51:54 iPhone6 SpringBoard[58]
Running the exact same project targeting a simulator works fine. Are there additional steps to getting this working on a real device that I'm missing?
deny-mmap is showing that failing to mmap Frameworks due to a Code Signing issue. @marekcirkos what are your thoughts on statically linking WebDriverAgentLib and it's dependencies into the xctest target.
Can you try removing WebDriverAgentRunner-Runner.app application from device your device and cleaning the project?
No dice @marekcirkos. I tried a few things:
It is code signing issue. Make sure you have valid team / provisioning profile that can sign any bundle id. I had same issue when I was working on different machine and explicitly selecting team solved it for me. For you it might be picking wrong prov profile. Checking which one is used on code sign step might be a go idea.
Shoot, yeah found the issue. My new Apple Developer account didn't have a Wildcard App ID and Provisioning Profile created. Once I created one and explicity set Code Signing to use this account, installs on real devices started working.
Thanks for the help @marekcirkos!
@marekcirkos i have the same issue with the code signing. It seems that I can only sign apps with bundle id that start with "com.myCompanyName". Can I alternatively change all WebDriver bundle ids from "com.facebook" to this one? (for example: com.myCompanyName.WebDriverAgentRunner)
Do whatever you need to do :). WDA does not depend on bundle id having any particular value.
Hi, I've same issue.
These methods not helped me:
From another host WDA working good with these certificates.
I fixed issue by re-downloading the WWDR (Apple Worldwide Developer Relations Certification Authority) and set its trust: 'use system default'.
Download from here: http://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Most helpful comment
Do whatever you need to do :). WDA does not depend on bundle id having any particular value.