Search code examples
iosvisual-studioxamarin.iosprovisioning-profile

Automatic Provisioning Failed, please check the logs when trying to select auto provisioning from VS 2022


I am getting the following error and cannot get past it, Provisioning Error

I also see this issue which I think has something to do with it, Blank section

It is not showing any certs or profiles when I try to look at them through VS. I have tried to add one of my certs, but that does not work, it asks for the password and then does nothing.

I have read a lot of different stuff online and I have tried clearing the provisioning profile folder on my MAC as well as deleting all unneeded profiles on the apple developer site. I also created a new cert and a new profile, but none of this has helped.

I am working on a windows machine using VS 2022. I only use the MAC to build on. I have little or no experience with xcode and I do not have VS for Mac.

Edit Here are the logs I am seeing

DateTime=2022-06-14T03:13:40.4009719Z: 06/14/2022 03:13:40Z Xamarin.Messaging.Client.MessagingClient Error: 0 : Client vs21788Steve - There was an error while posting a message to topic xvs/idb/get-provisioning-profiles. There were no receiver listening to that topic.:

06/14/2022 03:13:40Z DateTime=2022-06-14T03:13:40.4753246Z: 06/14/2022 03:13:40Z Xamarin.VisualStudio.IOS.IAppleProvisioningManager Error: 0 : Failed to retrieve remote information Xamarin.Messaging.Exceptions.ReceiverNotFoundException: No receiver was found for topic xvs/idb/get-provisioning-profiles

DateTime=2022-06-14T03:13:40.5698091Z: 06/14/2022 03:13:40Z Xamarin.VisualStudio.IOS.IAppleProvisioningManager Error: 0 : Xamarin.Messaging.Exceptions.ReceiverNotFoundException: No receiver was found for topic xvs/idb/get-developer-accounts at Xamarin.VisualStudio.IOS.AppleProvisioningManager.d__34`2.MoveNext() in D:\a_work\1\s\src\Core\VisualStudio.IOS\Provisioning\AppleProvisioningManager.cs:line 817

Xamarin.Messaging.Client.MessagingClient Error: 0 : An error occurred on the receiver while executing a post for topic xvs/idb/auto-provision and client vs21788Steve Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occurred on client IDBLocal while executing a reply for topic xvs/idb/auto-provision ---> System.NotSupportedException: The Apple Developer Portal web API for creating certificates is no longer supported. Please create your certificate manually.

Xamarin.Messaging.Client.MessagingClient Error: 0 : An error occurred on the receiver while executing a post for topic xvs/idb/check-provisioning-status and client vs21788Steve Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occurred on client IDBLocal while executing a reply for topic xvs/idb/check-provisioning-status ---> System.Exception: Original Type: AppleServerException - This request is forbidden for security reasons: Authentication Error. Xcode 7.3 or later is required to continue developing with your Apple ID.

But I am using the latest version of xcode so not sure why I would get this message.


Solution

  • Update

    This has been resolved in version 17.3.1 of Visual Studio.

    Visual Studio now uses an API key to access apple and create certificates, you'll have to delete the old account, create and use the new API key.

    Creating API Keys for App Store Connect API

    This was the original Answer

    It seems that Visual Studio is using a depricated API from Apple for creating certificates. This would mean that you can no longer use the auto provisioning at least until Microsoft resolve this.

    I'm basing this on the below snippet from the error log.

    The Apple Developer Portal web API for creating certificates is no longer supported. Please create your certificate manually.

    There are also several other questions without clear answers on this.

    Apple provisioning no longer works with Visual Studio 2022 17.2

    Stuck: Request a certificate from a certificate authority in Keychain Access on Mac

    iOS Signing Fails due to Error in Generating Automatic Provisioning Profile or Certificate Retrieval

    For the near future it looks like we'll have to manually create certificates.