6

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.

Steve H
  • 87
  • 8

2 Answers2

0

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.

Guy
  • 86
  • 9
  • 1
    something very strange happened. I created a new cert on the apple developer site and a new provisioning profile. However, I could not get it to build with these new pieces in place at all, it kept telling me, No iOS signing identities match the specified provisioning profile, no matter what I did to resolve. It told me to do the automatic to resolve it which does not work. However, my CI\CD build worked on it so not sure what is going on. I have the latest VS 17.2.5 and the latest xcode on my mac, and still the automatic does not work. So, in other words, I can no longer build locally, stinks – Steve H Jun 26 '22 at 12:29
  • @SteveH There are some tips on Provisioning profiles at 10:40 in this video https://www.youtube.com/watch?v=EBK_ADr-t4I I'm still having issues and working on this. – Guy Jun 27 '22 at 07:59
  • 1
    I am experiencing the same issue as @SteveH – Gradyn Wursten Jun 29 '22 at 21:38
  • 1
    Still having this issue, has anyone figured anything out about this? Does anyone have any suggestions? – Steve H Jul 12 '22 at 11:46
  • I haven't yet but still trying to figure it out. – Guy Jul 12 '22 at 20:09
  • @SteveH hopefully this is working for you now. – Guy Aug 19 '22 at 12:14
  • Guy, you say, you'll have to delete the old account, create and use the new API key, what account are you talking about deleting? I Have created a new API key and downloaded it but what do I do with it? Sorry I am a little confused – Steve H Sep 20 '22 at 11:58
  • @Guy, you say, you'll have to delete the old account, create and use the new API key, what account are you talking about deleting? I Have created a new API key and downloaded it but what do I do with it? Sorry I am a little confused – Steve H Sep 25 '22 at 19:50
  • 1
    Forget it, I figured it out right after sending the prior message. Thanks so much for your help – Steve H Sep 25 '22 at 20:07
0

This is not the solution but a workaround

I was working on Visual studio 2022 17.2.4 and same for me, the certificate and provisioning window were empty. I have monitored the network with Fiddler without seeing any request to any server ...

On my macbook, no problem everything was there, a colleague with VS 2022 17.0.4 could see them...

I have updgraded to 17.2.6 without success ... I have decided to downgrade to 17.0.12 and it magically appeared ...

Logs from Fiddler show request to apple services now enter image description here

For those who wants to downgrade ... (Downgrade means uninstall/Reinstall VS)

draco951
  • 226
  • 3
  • 13