microsoft / app-store-vsts-extension

Visual Studio Team Services (VSTS) extension for performing continuous delivery to the App Store store from your automated CI builds
Other
93 stars 53 forks source link

ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS #270

Open EmilAlipiev opened 2 years ago

EmilAlipiev commented 2 years ago

On Azure Pipelines my Xamain.Ios build returning this error

ERROR [2022-02-25 16:41:44.86]: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Production' for key 'aps-environment' in 'Payload/myAppiOS.app/myAppiOS' is not supported."
Return status of iTunes Transporter was 1: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Production' for key 'aps-environment' in 'Payload/myAppiOS.app/myAppiOS' is not supported."
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
/usr/local/lib/ruby/gems/2.7.0/gems/fastlane-2.204.3/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': [!] Error uploading ipa file:  (FastlaneCore::Interface::FastlaneError)
 [Transporter Error Output]: ERROR ITMS-90046: Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Production' for key 'aps-environment' in 'Payload/myAppiOS.app/myAppiOS' is not supported.\r
[Transporter Error Output]: Return status of iTunes Transporter was 1: ERROR ITMS-90046: Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'Production' for key 'aps-environment' in 'Payload/myAppiOS.app/myAppiOS' is not supported.\r
[Transporter Error Output]: The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

I found the similar issue on fastlane github but when I followed the suggestion on the issue below, error persists

https://github.com/fastlane/fastlane/issues/768

Not sure if this suggestion is valid for VS4Mac as well. I have simply set the signing as Manuell and selected correct publish profile. I have tested with resigning and without but same error always.

Normal build, package and deploy using Visual Studio and Xcode on Mac works just fine but only in Azure Devops with this extension. Do you know what might be the root cause and if there is any workaround?

anatolybolshakov commented 2 years ago

Hi @EmilAlipiev seems like there are some not supported code signing entitlements specified for your app (like 'Production') - see more in apple docs. Since this issue is not related to the pipeline task itself, but rather with Apple code signing process - I would suggest to reach out to Apple support for other advises.

anatolybolshakov commented 2 years ago

@EmilAlipiev please ping if you have any other questions

EmilAlipiev commented 2 years ago

@anatolybolshakov thanks for your reply. I am not sure where do you see that aps-environment with value Production as entitlement cant be set. I have already googled and cant find anything related. On the other hand, app signing is working just fine through XCode with this entitlement. That confuses me.

anatolybolshakov commented 2 years ago

@EmilAlipiev did you manage to upload the same app package manually to app store?

EmilAlipiev commented 2 years ago

@anatolybolshakov yes, i do using xcode directly to appstore without any problem.

anatolybolshakov commented 2 years ago

@EmilAlipiev could you please share your pipeline yaml file to take a look? Do you have some minimal sample project - so we would be able to reproduce it on our side?

EmilAlipiev commented 2 years ago

@anatolybolshakov I am not doing anything specific with the Yaml. I think that it can simply reproduced by adding an entitlement with aps-environment with value Production

anatolybolshakov commented 2 years ago

@EmilAlipiev we are unable to reproduce this issue. This could be probably related to some difference between configuration and build process of your project in pipelines and local environment. We also don't see any signs of issue on task side here - there is an 'Invalid Code Signing Entitlements' error coming from iTunes Transporter which says that there are code signing entitlements in application bundle's signature which are not supported by iOS platform. I would suggest to compare certificates used to sign bundle locally and in the pipeline, and reach out to the Apple support for further troubleshooting.