29

When I try to upload a new build using the Fabric Plugin I get the following error:

Archive Packaging Error: -6 Error re-signing the application for distribution.

/usr/bin/codesign --sign 937558639C8878BB6E161112505FA2965804A6AE --all-architectures --force --entitlements
/var/folders/xf/l7r1f0m54mjbwd9c3myd88zw0000gn/T/com.crashlytics.ipas/A6C80578-CC0E-443D-B81C-C10E972E88F8/Payload/entitlements.xml 
/var/folders/xf/l7r1f0m54mjbwd9c3myd88zw0000gn/T/com.crashlytics.ipas/A6C80578-CC0E-443D-B81C-C10E972E88F8/Payload/ShowGo.app

937558639C8878BB6E161112505FA2965804A6AE: no identity found

It used to work until the last version of the app. And then for some reason it just stopped working. Here's what I've tried:

  • Clean / Rebuild / Archive (many times)
  • Uninstall / reinstall Fabric plugin
  • Re-download provisioning profiles
  • Change from automatic to manual signing
  • Searching for missing code signing identity (> security find-identity -p codesigning)

What's killing me is I can't figure out for the life of me where Fabric is pulling that codesign identity value (937558639C8878BB6E161112505FA2965804A6AE) from. It's not in the project as I've grepped for it. Could it be cached somewhere else?

Funktional
  • 4,083
  • 1
  • 30
  • 27

13 Answers13

11

I just had this issue due to removing all my certificates in my Keychain due to signing issues with Xcode.

To solve this, I went into Xcode -> Preferences -> and looked through the accounts added (I have to for this Mac) and made sure that I had the right certificates (checked which ones were needed by them being greyed out).

Using the last line (in this case for the question, it will look different):

937558639C8878BB6E161112505FA2965804A6AE: no identity found

I was able to figure out which certificate was needed via hovering the mouse over the greyed out certificates (I wish it wasn't so hidden!), anyways that solved it for me, hopefully it can help others who have this issue.

So just to iterate, I went onto the apple developer account website -> "Certificates, Identifiers & Profiles" and proceeded to download the certificate that way, despite having auto signing enabled I still had to do this.

Mark Manson
  • 125
  • 1
  • 12
  • Thank you for your answer. When I tried to hover all grayed certs, I did not find fabric mentioned identity, and also to make sure that I could prevent this error, I uploaded all needed certificates (no more grayed certs) without point. Any suggestions? – Ahmad F Jul 13 '17 at 14:09
  • 1
    Sorry I don't have access to a Mac anymore, I think the id is more apple related than Mac though. I guess the other way is go to your apple developer website and download all active certificates. – Mark Manson Jul 14 '17 at 02:01
  • This worked for me using the instructions here: https://stackoverflow.com/a/46686725/6543020 – bradkratky Nov 05 '17 at 20:14
8

I've had the same issue.

enter image description here

It's because your developer account is prolongated and Provision Profiles are invalid.

enter image description here

You need to go to the developer.apple.com and update your Provision Profiles. Then download them, delete old Provision Profiles from Xcode, and tap to the new Profiles for add it to the Xcode! It helped me!

K. Sergey
  • 157
  • 1
  • 8
3

I had the same issue working with Xcode 9.3 with a developer account included in an educational organization.

I solved it by deselecting the Automatic manage signing option in the Signing panel and by manually downloading the provisioning profile.

Choose manual signing in Xcode

To dowload the profile, you have to select the option Download Profile... in the Provisioning Profile menu. Xcode obtains the provisioning profiles from the Member Center, let you select the one and informs you of possible problems.

In my case, my certificate was not present in the provisioning profile and had to recreate it with Xcode and rebuild the provisioning profile in the Member Center.

2

I did not find a way to fix fabric plugin. But I found a way to not use it. There is cool tool, called fastlane. Integration tutorial you will found inside fabric plugin (check attached image). And it really works!

enter image description here

Kirill Pyulzyu
  • 381
  • 2
  • 11
1

Archive Packaging Error: -6 Error re-signing the application for distribution

I finally manage to upload a debug archive into Fabric (plugin) via XCode (not fastlane) by manually set an 'iPhone Distribution' certificate in 'xcode/build settings/code signing identity/debug' as well as an adhoc provisioning profile in 'xcode/build settings/Provisioning profile/debug' instead of the 'iPhone developper certificate' and 'Debug provisionning profile' ones (both on app, widget and rich push extensions)

htan
  • 333
  • 1
  • 9
1

Here's how I solved this issue.

First, I quit XCode and opened up my provisioning profiles by going to Library/MobileDevice/Provisioning Profiles. By selecting each profile and hitting space to preview it, you can see all the certificates associated with the provisioning profile and each of their SHA-1 values. That's what this codesign identity value is — the SHA-1 of the certificate.

Then I opened up Keychain Access and found that I had two copies of that same certificate in my login keys, so I deleted both and reinstalled the cert. You can do this by going to the Apple Developer portal, redownloading the certificate, and just double clicking it. You can check to make sure it really is there by once again opening up Keychain Access.

Upon reopening XCode, I hard cleaned and deleted the Fabric cache just for good measure. Then, finally, it worked.

doctorBroctor
  • 2,018
  • 1
  • 14
  • 17
  • 1
    This should be mark as the correct solution. It worked for me. As mentioned, make sure to delete the Fabric cache. – Franlon Nov 04 '19 at 15:54
0

I have same issue.

My environment:

  • I have Organization(with name f.e Team) with 1 developer(with name f.e. Dev);
  • Team has 1 dev cert and 1 prod cert;
  • Dev has 1 dev cert;
  • Organization has 1 dev(Team's dev cert + Dev's dev cert) and 1 prod provisionings(Team's prod cert);

In Xcode, I selected Dev provisioning.(all my builds(dev, test,release schemes) signings by dev provisioning(for testing purpose))

Next, there are 2 ways how we can archive the build(and signing it)

In Build Settings -> Signing -> Code Signing Identity:

  1. select Team's dev cert - all work fine and fabric upload build success
  2. select Dev's dev cert - get error when uploading:

Archive Packaging Error: -6 Error re-signing the application for distribution.

May be Fabric uses Team's cert by default...

afrokick
  • 21
  • 3
  • Just curious- how do I download / install the Team dev cert? Under Build Settings -> Signing -> Development Team I definitely see the team listed. However I don't see a Team dev cert under Code Signing Identity. Just my Dev's dev cert. Thx – Funktional May 25 '17 at 20:11
  • @Funktional Team dev cert can only be downloaded by team(organization) owner. Thus, you should add team owner's Apple ID in preferences in xcode. – afrokick Jun 09 '17 at 06:55
0

This issue happened to me as well.

In "Manage Certificates", I found that my developer certificate had expired (one year had passed since I created it). I had a new certificate there, but the old one was still listed there with the name: "untitled" and it matched the key that could not be found by Fabric.

I rebuilt all my distribution profiles to include my new certificate (and not the old one) and downloaded them. Then I had to manually remove the expired certificate from my computer via keychain access.

Once that was done, I restarted Xcode and everything worked.

This problem may have happened because I manually manage signing in my app. Xcode might have cleaned it up if I set it to "Automatically manage signing" instead, but I don't know.

0

I have a workaround:

  • On Xcode:

    • Build
    • Go to Menu Products/ Archive
      • Distribuite App:
        • Ad hoc
          • Export
            • No Bitcode or Symbols
            • Automatic signing
            • Save the kscanner.ipa location
  • On the command line:

    /path/to/Crashlytics.framework/submit \ -ipaPath /path/to/my.ipa -emails TestEmail@fabric.io,AmazingTester@google.com \ -notesPath ~/Notes/ReleaseNotes.txt \ -groupAliases GroupAlias,GroupAlias2 \ -notifications YES

0

Use DISTRIBUTION Ad Hoc provisioning profile. Development provisioning profile will generate this error.

The error says: Archive Packaging Error: -6 Error re-signing the application for distribution.

If you use a distribution instead of development, the Fabric app will not need to re-sign your app.

Also make sure to download the active provisioning profile at: https://developer.apple.com/account/ios/profile/production

  • 1
    Please include more detail in your answer. What are the differences between the two, and why does one produce an error that the other does not? – mypetlion Jan 08 '19 at 20:10
0

I might be late in answering however below solution worked for me on Xcode 9 later Go To Finder and redirect to this path ~/Library/MobileDevice/Provisioning Profiles. Then delete all the profiles and Click on Xcode, it will re download required certificates and provisioning profiles.

Enjoy

Syed Ali Salman
  • 2,894
  • 4
  • 33
  • 48
0

Even if you have the certificates and profiles on your keychain, you may need to refresh them. In my case I have Xcode 10.1, follow the instructions here:

https://stackoverflow.com/a/46686725/6543020

After applying the instruction, it's better to close and start XCode and Fabric both.

Possible duplicate of: Fabric Plugin: Archive Packaging Error: -6 Error re-signing the application for distribution

Reference: https://stackoverflow.com/a/47126160/2800626

FARAZ
  • 645
  • 7
  • 6
0

I had this issue after my old "iPhone Developer: Developer Name" certificate expired. I already had "Apple Development: Developer Name" certificate in the keychain which should have been used instead. Deleting the expired certificate in Keychain Access fixed the issue.

Marián Černý
  • 15,096
  • 4
  • 70
  • 83