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

纵饮孤独 提交于 2019-12-02 23:39:00

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.

I've had the same issue.

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

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!

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.

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.

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!

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)

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...

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.

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

Here's how I solved this issue—

First, I quit XCode and opened at 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.

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

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

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!