Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

security: SecPolicySetValue: One or more parameters passed to a function were not valid. #63

Closed
peterbozso opened this issue Mar 23, 2017 · 0 comments

Comments

@peterbozso
Copy link
Contributor

Hi!

I'll try to summarize my problem the best as I can but since I am not familiar with macOS or Cordova at all, it might not be satisfactory.

So I am trying to build a Cordova app (to be specific, an Ionic app) with the Cordova Build Task. I am doing everything as it's described here, but my build fails.
The error message is:

=== BUILD TARGET todo OF PROJECT todo WITH CONFIGURATION Debug ===
Check dependencies
todo requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/cordova/build-debug.xcconfig,-workspace,todo.xcworkspace,-scheme,todo,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,todo.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/build/sharedpch
Removing Xcconfig update hook
task result: Failed
Task failed

I am running the Mac agent on my own Mac Mini, running Sierra. Since I followed the instructions referenced above, it's pretty obvious that the problem is not with me not selecting a provisioning profile for the Debug configuration.
After a couple of hours of poking around with the system.debug flag swtiched on while building in VSTS, I stumbled upon this line in the logs:

determineProfile result {"uuid":"security: SecPolicySetValue: One or more parameters passed to a function were not valid.","foundUuid":"security: SecPolicySetValue: One or more parameters passed to a function were not valid."}

(I replaced my UUID with in the above text.)
And that's where my limited knowledge ends. After some Googling I found out that it's must be something with the security command here, that's the one that barfs up this part: "security: SecPolicySetValue: One or more parameters passed to a function were not valid." which in my opinion makes my build fail, since the PROVISIONING_PROFILE parameter is there for xcodebuild, it just contains this "security: SecPolicySetValue..." nonsense.
As I saw, multiple other projects ran into this problem as well, it's something about the security command changed in Sierra:
DanTheMan827/ios-app-signer#19
fastlane/fastlane#6233
openbakery/gradle-xcodePlugin#297
maciekish/iReSign#89

I'll try to look into it tomorrow and do something in order to fix this, but based on my limited knowledge, any kind of help would be very much appreciated!

Many thanks in advance,
Péter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant