1

mac pro m1 flutter 3.7.7 Xcode 14.3

error: Target release_unpack_ios failed: Exception: Failed to codesign

enter image description here

Previously, when using flutter 2.x, there was no problem at all with the archive. After upgrading flutter, a problem occurred, so I upgraded to the current Xcode version. I also created a new certificate and proceeded with reference to the reference. I keep getting the error below:

It's a web view app, so I wonder if this is a problem

I tried it with the basic count app that came out with flutter create. Still getting the same error.

In the peripheral vein Both the archive with my certificate and the archive of my code with his certificate succeeded. Even if I proceed with the authentication request in the same way, I am finished.

Hamed
  • 5,867
  • 4
  • 32
  • 56
HyunJun Cho
  • 23
  • 1
  • 5

2 Answers2

4

This has nothing to do with the WebView. I have been having the same problem on CI machines and it is usually related to keychain problems.

Steps that may help:

  1. Check if the identity is installed security find-identity -p codesigning login.keychain or whatever keychain you use.

  2. Manually lock/unlock keychain.

  3. Try to sign a random file with codesign --force --sign 94FF... foo.txt and press "Always allow" in the dialog that shows up.

kuhnroyal
  • 7,188
  • 1
  • 34
  • 47
  • I found two certificates. % security find-identity -p codesigning login.keychain Policy: Code Signing Matching identities 1) 484EB8350B095B1AF3C3151F164086xxxxxxx "Developer ID Application: HyunJun Cho (11111111)" 1 identities found Valid identities only 1) 484EB8350B095B1AF3C3151F1640860962xxxxxxx "Developer ID Application: HyunJun Cho (11111111)" 1 valid identities found But I didn't understand the next step. ( codesign --force --sign 94FF... foo.txt ) what is foo.txt ? – HyunJun Cho Mar 22 '23 at 02:50
  • So first it seems that the identity `94FFC8...`, that is present in you screenshot above, is not installed locally, you need to fix that. `foo.txt` is just some random file, you can sign anything just to force the MacOS dialogs to show up. – kuhnroyal Mar 22 '23 at 11:56
  • Thank you for your kind reply. The code in the capture is from the previous capture, now the same code appears. and I did try "codesign --force --sign 8AAD74CCA733DC2FFF8E1096E488F6883F9557F8 foo.txt" but I got error that Warning: unable to build chain to self-signed root for signer "Apple Development: HyunJun Cho (HQZ4948xxxxx)" foo.txt: errSecInternalComponent – HyunJun Cho Mar 22 '23 at 13:52
  • Try following up with answers from here: https://stackoverflow.com/questions/48911289/warning-unable-to-build-chain-to-self-signed-root-for-signer-warning-in-xcode - likely something is wrong with your Apple Root/Intermediate certificates. – kuhnroyal Mar 22 '23 at 15:00
  • 1
    Thank you so much for your interest in my difficulties. Yesterday I solved this problem by reading the article below. https://stackoverflow.com/a/62980176/15126552 It's the same as what @kuhnroyal introduced. thank you – HyunJun Cho Mar 23 '23 at 22:51
  • 1
    Manually lock/unlock keychain. works for me – Nandakishor Dhanaji Valakunde May 31 '23 at 09:59
  • Num. 3 worked for me, i manually signed README.md and it worked, don't know whats the issue but its good for me. – Sailesh Dahal Jul 20 '23 at 08:29
  • First step 1 I run security find-identity -p codesigning login.keychain this command IN TERMINAL 6HYUDKIYIRB095B1AF3C3151F164086xx I GOT THIS BUT I did not understand the Second and third step so anyone can explain to me in detail – Asim Uddin Aug 22 '23 at 02:30
2

if you using one drive in macOS, try to build an app outside One drive, for example, the desktop , works for me this screen shows that flutter app works on IOS simulator