-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible solution for error 65 (missing signature) for XCUITest @ real device #6955
Comments
Interesting. Thanks for this! I will look into it. |
First pass at this: appium/appium-xcuitest-driver#217 |
@mykola-mokhnach @imurchie I am trying to pass these capabilities (key chain path and keychainpassword) but got this error, any idea? [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'security -v unlock-keychain -p v /Users/Chanakya/Desktop/Certificates.p12' exited with code 49". 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. |
What happens if you manually run the command |
@imurchie I got the below error unlock-keychain "-p" "v" "/Users/Chanakya/Desktop/Certificates.p12" But i am able to build succeed in xcode with this key, and in 'keychain Access' it is displayed as valid and expires in may 2018, something fishy here. my coworker also use exact same configuration inlcuding team id and certificates etc, he was able to launch the native app but fails for me with code sign error |
@imurchie @mykola-mokhnach Finally i was able to find the solution, it was actually Apple certificates in 'key chain access' which now i set to 'system default' and previously it was in 'Always trust' mode, If anyone had valid code sign dev ids but get messed up with keychains then this is the core solution |
@mykola-mokhnach I tried this configuration, but still facing same code sign issue. Before i was able to proceed at-least on devices. |
when i do test though terminal with the below command everything is going though but still though jenkins not able to run more than 2 devices |
Currently many people complain they cannot automate tests for real iOS devices using XCUITest driver because of this annoying error 65. The error means, that driver source cannot be signed properly and thus cannot be installed on real device even if the same action works as expected from Xcode on the same machine.
I spent some time investigating the problem and it looks like the main source of it is Accessibility restrictions in Mac OS, because I see "No user interaction is allowed" error in Xcode logs. This happens because the private key, which the tool tries to use, is stored in the system keychain and the parent process has no access to it.
And here is possible solution:
For now all that Appium does is just execution of xcodebuild with necessary arguments using Subprocess helper class. My proposal is to change it the way that if we run not on a Simulator then a shell script will be executed instead of xcodebuild, which includes the following commands:
The custom keychain should be prepared manually using the following commands:
MyPrivateKey.p12 is my private development key exported from the system keychain.
I have tested it via SSH console (because it's not reproducible if one just executes xcodebuild via local Terminal) and it worked. Please think about including that into the next Appium build.
Information source: http://stackoverflow.com/questions/16550594/jenkins-xcode-build-works-codesign-fails
@imurchie FYI
The text was updated successfully, but these errors were encountered: