Previously unseen problem with certificate signing

I first built WordPuzzleAids over 2 years ago. I built it on my MacBook Pro, using Xcode and Swift. The destination for the build was my iPhone. Two weeks ago, the app stopped working on the iPhone: I thought I might need to rebuild it on the on the MacBook and "re-deliver" it to the iPhone. The build failed with: CodeSign /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app (in target 'WordPuzzleAids' from project 'WordPuzzleAids') cd /Users/paddy/Projects/ThirdParty/WordPuzzleAids

Signing Identity:     "Apple Development: John Patterson (G9M8AH9CTD)"
Provisioning Profile: "iOS Team Provisioning Profile: *"
                      (650d11d4-ecd2-4458-a146-3cb55438e9dc)

/usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 --entitlements /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Intermediates.noindex/WordPuzzleAids.build/Debug-iphoneos/WordPuzzleAids.build/WordPuzzleAids.app.xcent --timestamp\=none --generate-entitlement-der /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app

/Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app: errSecInternalComp

I have attached the build documentation file

I have a general explanation of this error in Resolving errSecInternalComponent errors during code signing.

One trick you can use here is to copy the command out of your build transcript and run it directly from Terminal. That should reproduce the issue. If so, you can tweak the command to try to get more info, specifically by adding a bunch of -v options.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Dear Mr. Quinn, (Case-ID: 8907830)

You wrote: One trick you can use here is to copy the command out of your build transcript and run it directly from Terminal. That should reproduce the issue.

You did not specify which part of the build comments was the command you wished me to run. I decided to start with the last bits that seemed to go wrong:

paddy@Johns-MBP WordPuzzleAids % CodeSign /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app (in target 'WordPuzzleAids' from project 'WordPuzzleAids') cd /Users/paddy/Projects/ThirdParty/WordPuzzleAids zsh: unknown file attribute: I # No idea what this means; am I not supposed to use zsh? paddy@Johns-MBP WordPuzzleAids % Codesign Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign codesign -v [-v*] [-R=|-R ] path|[+]pid ... # verify codesign -d [options] path ... # display contents codesign -h pid ... # display hosting paths paddy@Johns-MBP WordPuzzleAids % cd /Users/paddy/Projects/ThirdParty/WordPuzzleAids paddy@Johns-MBP WordPuzzleAids % codesign -s "Apple Development: John Patterson (G9M8AH9CTD)" Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign codesign -v [-v*] [-R=|-R ] path|[+]pid ... # verify codesign -d [options] path ... # display contents codesign -h pid ... # display hosting paths paddy@Johns-MBP WordPuzzleAids % CodeSign /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app (in target 'WordPuzzleAids' from project 'WordPuzzleAids') cd /Users/paddy/Projects/ThirdParty/WordPuzzleAids

Signing Identity: "Apple Development: John Patterson (G9M8AH9CTD)" Provisioning Profile: "iOS Team Provisioning Profile: *" (650d11d4-ecd2-4458-a146-3cb55438e9dc)

/usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 --entitlements /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Intermediates.noindex/WordPuzzleAids.build/Debug-iphoneos/WordPuzzleAids.build/WordPuzzleAids.app.xcent --timestamp=none --generate-entitlement-der /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app zsh: unknown file attribute: i zsh: command not found: Signing zsh: command not found: Provisioning zsh: command not found: 650d11d4-ecd2-4458-a146-3cb55438e9dc /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app: errSecInternalComponent paddy@Johns-MBP WordPuzzleAids % /usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 --entitlements /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Intermediates.noindex/WordPuzzleAids.build/Debug-iphoneos/WordPuzzleAids.build/WordPuzzleAids.app.xcent --timestamp=none --generate-entitlement-der /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app /Users/paddy/Library/Developer/Xcode/DerivedData/WordPuzzleAids-dnwilitxxdvpzablseyseujsllag/Build/Products/Debug-iphoneos/WordPuzzleAids.app: errSecInternalComponent paddy@Johns-MBP WordPuzzleAids %

=============

It is unclear to me what useful information I can derive from this terminal run.

I have not so far had an explanation as to why Apple decided to prevent an application that worked before from working now: since certificates are mentioned, I imagine there is some legal constraint.

This we app is nowhere near ready for delivery to the Apple store: I simply wish to download it to my iPhone to test it.

Regards, Paddy.

Recreated the error with a simpler project --- TestCertificate" --- basically a "Hello, world!". Same problems; see link to attached build error log:

Recreated the error with a simpler project

OK. That’s always a great debugging step, because it allows you to draw the distinction between a problem with your project and a problem with your tools.

And the full build transcript you posted shows that this is indeed a problem with your tools.

I have not so far had an explanation as to why Apple decided to prevent an application that worked before from working now

It’s hard to say what broke this, but it’s unlikely to be anything sinister.

You did not specify which part of the build comments was the command you wished me to run.

The codesign command itself; after all, that’s the one that’s failing.

Right now that command looks like this:

/usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 …

I recommend that you increase the verbosity like so:

/usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 -vvvvv …

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Added the -vvvv string:

paddy@Johns-MBP ~ % cd /Users/paddy/Projects/ThirdParty/TestCertificate

paddy@Johns-MBP TestCertificate % /usr/bin/codesign --force --sign 1FC4588FA2EAD7DCF9AAC9CDC823B567D76BCBE8 -vvvv --entitlements /Users/paddy/Library/Developer/Xcode/DerivedData/TestCertificate-dxlxigtevepatdctuzsgtwfenhme/Build/Intermediates.noindex/TestCertificate.build/Debug-iphoneos/TestCertificate.build/TestCertificate.app.xcent --timestamp=none --generate-entitlement-der /Users/paddy/Library/Developer/Xcode/DerivedData/TestCertificate-dxlxigtevepatdctuzsgtwfenhme/Build/Products/Debug-iphoneos/TestCertificate.app /Users/paddy/Library/Developer/Xcode/DerivedData/TestCertificate-dxlxigtevepatdctuzsgtwfenhme/Build/Products/Debug-iphoneos/TestCertificate.app: errSecInternalComponent

There was no output at the terminal session.

Do you have another suggestion?

There was no output at the terminal session.

I think you’re mixing up inputs and outputs. The results you posted were on a second line:

paddy@Johns-MBP TestCertificate % /usr/bin/codesign … errSecInternalComponent

That first part is an input but that last part is an output.

I’m not entirely sure how you managed to do that, but I suspect that you mistakenly included the output from the Xcode build transcript in the command that you ran in Terminal.

In the build transcript you posted, line 246 is the command you want to run. It starts with:

/usr/bin/codesign --force …

and ends with the path to your app. Copy that line out, past it into a text editor, insert the -vvvvv I described earlier, and then paste that single line into Terminal.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Previously unseen problem with certificate signing
 
 
Q