Codesign returned errSecInternalComponent in High Sierra
Asked Answered
C

2

9

I tried to codesign using:

/usr/bin/codesign -f -s $IDENTITY --keychain $KEYCHAIN --entitlements $ENTITLEMENTS Payload/Test.app

But I get an errSecInternalComponent error.

Carbylamine answered 2/8, 2018 at 9:6 Comment(3)
See hereWerner
None of them solved my issueCarbylamine
I have solved the issue by making sure Apple ID where phone is registered to is same as the developer Apple IDDischarge
K
14

I too got the same error from code signing. It seems to be mostly bcoz of keychain access. It is not just enough that keychain has to be in unlocked state as suggested in most of the post.

I did the following steps to resolve this.

  1. Let the Login (or wherever your code signing identity is present) Keychain be in Locked state. To do it open Keychain Access, right click the login keychain and select 'Lock Keychain "login"'.

  2. Execute the command line.

  3. Code Sign will prompt for keychain password (snapshot attached below). Enter the password.
  4. After this, command will succeed.

It seems command line needs the password to be given when it is prompted. Otherwise, the error keeps on coming even when the keychain is in unlocked state.

Hope it helps.

Code Sign prompting for keychain password

Kielce answered 30/11, 2018 at 6:18 Comment(4)
Thanks you. fixed it for me. A very obscure problem, and a simple fixHolm
If the below answer solved your issue, please accept it.Kielce
I am on Catalina (10.15.7) and also after locking all keychains, then codesign will need the password to unlock the keychain, but it will fail with the same "errSecInternalComponent" errorOdd
didn't solve the problem for me!Subjunctive
M
0

I was having the same error, ended up being an "Invalid" provisioning profile but only showed invalid on the Apple Developer portal. And Invalid not Expired.

Just went in hit edit, then save, and new profile worked fine.

Apple Dev Portal Invalid Profile

Mistress answered 11/6, 2020 at 17:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.