microsoft / windows-dev-center-vsts-extension

Visual Studio Team Services (VSTS) extension for performing continuous delivery to the Windows Dev Center store from your automated CI builds
Other
42 stars 18 forks source link

Error: Service Connection Authorization cannot be null #77

Open riverar opened 5 years ago

riverar commented 5 years ago

After completing the Add Windows Dev Center [sic] service connection in Azure Dev Ops, I'm presented with the unhelpful error: Error: Service Connection Authorization cannot be null

Fiddler shows:

{
  "$id": "1",
  "innerException": null,
  "message": "Service Connection Authorization cannot be null.",
  "typeName": "Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi.ServiceEndpointException, Microsoft.VisualStudio.Services.ServiceEndpoints.WebApi",
  "typeKey": "ServiceEndpointException",
  "errorCode": 0,
  "eventId": 3000
}

Related: #76

rickjansen-dev commented 5 years ago

I'm facing the same issue. My old configuration is not working anymore since the client secret expired. I created a new client secret, but now it's impossible to save since clicking Close in the window doesn't actually save and clicking OK throws this error.

Also, I find it quite a bit alarming to see that the windows dev center is not listed in the common service connections in the docs:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#common-service-connection-types

ggretz commented 5 years ago

Same problem here :( The client secret expired and we are not able to create / update the secret because of the same error message

riverar commented 5 years ago

~I contacted support on this issue and long story short: this extension is dead. There's a v2 in the works but it's not available for use.~ I had to switch to StoreBroker (https://github.com/microsoft/StoreBroker).

louis-wuitton commented 5 years ago

Hi folks, so the issue is related to the interface that creates the service endpoint. There is a change in interface on VSTS and as a result we could not create the endpoint successfully.

louis-wuitton commented 5 years ago

Hi folks, I discovered that the issue could be fixed by using a different type of endpoint for the extension. Previously the extension was using principal type endpoint. I switched it to basic and it helped me unblocked the issue. I uploaded the extension with the fix and it could authenticate for me successfully. You should be unblocked with the service endpoint issue now. When you create an endpoint the interface should look like this:

service_endpoint

riverar commented 5 years ago

@louis-wuitton Can confirm configuration works now. Ping @ggretz @vuurbeving.

ChristopheLav commented 5 years ago

@louis-wuitton

This breaks the extension for current users... I have delete and recreate the Service Connection, in one or two hours I can confirm if it's work again (update: working).

For this type of change, a warning in the changelog would be better + a version bump would be appreciate to allow existings users to use the previous version without breaking their pipelines.

😐

rickjansen-dev commented 5 years ago

It's working for me too, thanks 👍

I did create a new service connection though. I wasn't able to edit the old one (click on 'Update service connection' and nothing happens). So i guess @ChristopheLav has a valid point here regarding users with existing connections (and non-expired credentials). But it would break sooner or later anyway once the client secret expires...

chadsowald commented 4 years ago

Also ran into this exact issue with a service connection tied to an app registration that had expired credentials. I also ended up creating a new one and am unblocked. Glad I found this thread and didn't waste too much time trying to get the broken one to save/update.

damienpontifex commented 2 years ago

I came across this today and noticed this in the payload

image

I copied the request from the browser to curl and removed the null apiToken and renamed the property apitoken to apiToken and it worked. So maybe something with the Azure DevOps GUI / JS request