fastlane-old/pilot

Missing or invalid signature. The bundle X at bundle path X is not signed using an Apple submission certificate.

AvdLee opened this issue · 3 comments

I'm having troubles setting up our Mac mini together with Fastlane.
I want my app to be build by an integration on our Xcode server and uploaded to TestFlight.

My first try was to:

  • Create a bot which generates an IPA using the "Create user installable product" checkmark
  • Select this IPA and submit to TestFlight using Pilot

However, this failed with the following error:

Assertion: exportArchive: No 'teamID' specified and no team ID found in the archive

I checked my project, team ID is set, bundle identifier matches production provisioning profile.

Using Fastlane only: Gym and Pilot

My best approach so far is using Fastlane only using this prescript:

export LC_ALL="en_US.UTF-8"

# Export path to make sure XCPretty works
export PATH="/usr/local/bin:$PATH" 

#Change to the directory where .xcodeproj is located
cd MainProject

#Copy provisioning profiles, which are in the Git repo
cp -a "Certificates/." "/Library/Developer/XcodeServer/ProvisioningProfiles/"

#From example, all steps:
/usr/local/bin/fastlane ios beta_testflight

My lane looks as followed:

  desc "Responsible for building and signing the app"
  private_lane :build_app do |options|
    cocoapods

    gym(
      workspace: "MyProject.xcworkspace",
      scheme: "MyProject",
      clean: true,
      export_team_id: "XXXXXXX",
      provisioning_profile_path: "/Library/Developer/XcodeServer/ProvisioningProfiles/AppStore.mobileprovision",
      codesigning_identity: "iPhone Distribution: XXX"
    )
  end


  desc "Build and upload a new build to Apple TestFlight"
  desc "This action will also do a build version bump and push it to git."
  desc "This will **not** send an email to all testers, it will only be uploaded to the new TestFlight."
  lane :beta_testflight do
    build_app

    pilot(username:"myuser@x.com", skip_submission:true)
  end

I've cleared some personal data from it

This creates an ipa correctly:

[20:24:12]: �[32mSuccessfully exported and compressed dSYM file�[0m
[20:24:12]: �[32mSuccessfully exported and signed the ipa file:�[0m
[20:24:12]: /Library/Developer/XcodeServer/Integrations/Caches/cf28edc3cf17c74d94ed4fec4202b29e/Source/X/X.ipa

However Pilot still marks the following error:

�[31m[20:25:13]: �[0mERROR ITMS-90034: "Missing or invalid signature. The bundle 'X' at bundle path 'Payload/X.app' is not signed using an Apple submission certificate."
�[31mReturn status of iTunes Transporter was 1: ERROR ITMS-90034: "Missing or invalid signature. The bundle 'X' at bundle path 'Payload/X.app' is not signed using an Apple submission certificate."

I've also tried to resign with sigh, by using terminal on our Mac mini and navigate to the integration folder:

Repackaging as X.ipa
Process complete

[20:14:03]: Successfully signed X.ipa!

However, this still gives me the above error.

I'm really lost and out of my ideas how to fix this.

Hoping to find the correct answer here!

same issue here, did you find a way to solve this?

I tried this command on the generated IPA, which I unzipped:

codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' Payload/AppName.app

It gave me this response:

Payload/AppName.app: CSSMERR_TP_NOT_TRUSTED
In architecture: armv7

After fixing this issue by following the instructions of this page:
https://developer.apple.com/library/tvos/documentation/IDEs/Conceptual/AppDistributionGuide/Troubleshooting/Troubleshooting.html

I've managed to fix it!

This issue was migrated to fastlane/fastlane#1879. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀