Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 14 upload error "Could not determine the package’s bundle ID..." #313

Open
CatalinPrata opened this issue Feb 23, 2023 · 7 comments
Assignees

Comments

@CatalinPrata
Copy link

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: Xcode 14 upload error "Could not determine the package’s bundle ID..."

Environment

  • Server - Azure Pipelines

  • Agent - Hosted or Private:

AzurePipelines hosted
Agent specs: macOS-12
Xcode: 14.2
Fastlane to build the ipa

Issue Description

Till we had to migrate to xcode 14 everything went well with the pipelines.
Recently we had the task to move to Xcode 14.2 and I started to adjust the existing and working pipeline to acomodate the Xcode requirements. First I switched from macOS-11 to 12 so we can have Xcode 14 installed and then set the pipeline to use Xcode 14.2.

When I ran the build everything compiles/passes well but the "Publish to app store" step fails with the following error:
"Error: Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application. (-21017)"

I checked the ipa on the pipeline and it is generated, in the ipa I can find the plist and has all the required information. I tried setting "ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD" to false or true from shell or in fastlane but I get the same error.

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

Starting: Publish to the App Store TestFlight track

Task : Apple App Store Release
Description : Release an app to TestFlight or the Apple App Store
Version : 1.218.0
Author : Microsoft Corporation
Help : More Information

/usr/local/lib/ruby/gems/3.0.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/xxxxxx.ipa -q 1638264 -a {bundle id} --skip_waiting_for_build_processing true
[15:48:31]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[15:48:33]: Creating authorization token for App Store Connect API
[15:48:34]: Ready to upload new build to TestFlight (App: xxxxxxxxx)...
[15:48:36]: Going to upload updated app to App Store Connect
[15:48:36]: This might take a few minutes. Please don't interrupt the script.
[15:48:39]: [altool] 2023-02-22 15:48:39.633 *** Error: Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application. (-21017)

[15:48:39]: [altool] {

[15:48:39]: [altool] NSLocalizedDescription = "Could not determine the package\U2019s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not \U2018APPL\U2019 or \U2018FMWK\U2019.";

[15:48:39]: [altool] NSLocalizedFailureReason = "Unable to validate your application.";

[15:48:39]: [altool] }

[15:48:39]: Application Loader output above ^

@DenisRumyantsev
Copy link
Contributor

Hi @CatalinPrata, our test pipeline works fine running on macOS-12 Azure Pipelines hosted agent and using Xcode 14.2.
When using macOS-12, it should work fine without the ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD variable defined.

Can you enable pipeline debug logs by setting the system.debug pipeline variable to true:

variables:
  system.debug: true

After that, rerun your pipeline and provide all the pipeline run logs (zip archive downloaded from the pipeline run page) so that we can investigate this issue in more detail.

You can send them to my email: v-denisr@microsoft.com

@mkelley64
Copy link

Hello - I have encountered this same problem after updating my pipelines to Xcode 14.2. I set the system.debug pipeline variable to true, and I will forward my zipped logs to the above email.

@DenisRumyantsev
Copy link
Contributor

Hi @mkelley64, I have got the logs, thanks, let me check them

@mkelley64
Copy link

Hello @DenisRumyantsev - any updates on this? Thanks.

@bisiAlessandroDocPlanner

Hey! We had the same issue after updating the macos version from macos11 to macos12 and using the AppStoreRelease@1 task.
We tried other options with the same ipa that failed with the task and we could upload the app without any problem, this were the commands that we tried:

  • xcrun altool --upload-app
  • fastlane run testflight

Please let us know if we can be of any help to solve the issue.

@bisiAlessandroDocPlanner

If it can help we managed to solve the issue adding this bash command:

    - bash: |   
                 echo "##vso[task.setvariable variable=ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD;]false"
                displayName: Add ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD env variable

We tried to add the ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD to the pipelines variables but it was not working, using the echo was the way to make it works! 😄
Hope it can help 🤞

@mkelley64
Copy link

Thank you - this is working for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants