Azure Web App - Retrieving publishing credentials failed

Since upgrading from 2018.5.7 to 2018.7.3 we are unable to deploy to our Web Apps on Azure:

Deploying to Azure WebApp ‘test-XXXXXX’, deployment slot ‘Staging’, using subscription-id ‘YYYYYYYY-fcbc-4ccd-b47b-XXXXXXXXXXX’
July 25th 2018 10:00:14
Error
Retrieving publishing credentials failed. Publish-settings URI: https://management.azure.com/subscriptions/YYYYYYY-fcbc-4ccd-b47b-XXXXXXXXXXX/resourceGroups//providers/Microsoft.Web/sites/test-XXXXXX/slots/Staging/config/publishingCredentials/list?api-version=2016-08-01
July 25th 2018 10:00:14
Error
System.AggregateException: One or more errors occurred. —> System.Exception: Retrieving publishing credentials failed with HTTP status 400 - Bad Request
July 25th 2018 10:00:14
Error
at Calamari.Azure.Integration.Websites.Publishing.ResourceManagerPublishProfileProvider.<>c__DisplayClass0_2.b__2(Task`1 publishSettingsResponse)

One point to note is that we’re not using the newly introduced Azure Web App Deployment targets.

This is obviously a critical issue for us, we may need help rolling back to 2018.5.7 if there isn’t an easy workaround.

Cheers,

Paul

We have rolled back to 2018.5.7 and deployments are fine again. Obviously it’s going to be hard for us to provide any more information but we had deployments that needed to go out.

Cheers,
Paul

Hi Paul,

Thanks for getting in touch. Sorry to hear you had issues with the last version.

It appears that the Resource Group for the selected web app is not being supplied when the deployment is executing. it should be in the publishing profile URL after resourceGroups.

This issue never occurred during the testing for these latest changes, would it be possible for you to provide me with the deployment process for the project that you experienced the issue with. The best way to get the full deployment process is using the Overflow menu on the Process page and selecting Download as JSON.

Regards
Ben

Hi Ben,

I’ve sent you the process JSON in a private message.

Cheers,
Paul

Hi Paul,

Thanks for information. I can see the scenario that we missed.

We recently made a change that improved the performance of querying Azure for the Web Sites. The old method looped through all Resource Groups to find the web site with a matching name, if no Resource Group name is supplied. When we changed the query method, we didn’t cater for the scenario where the Resource Group wasn’t supplied. The downside to the matching by site name only, was that the deployment would occur against the first site found, which may not be the one intended.

There will be a change coming shortly to better support this scenario, however, it will fail the deployment if you don’t provide a Resource Group name and the Web App name matches more than one site.

In your process step you supplied, I would suggest setting the Resource Group name for your website.

I have raised an issue for you to track for when it is fixed.

Regards
Ben

1 Like