1
votes

As of Wednesday, sometime between 2:01 pm and 2:43 pm Eastern, Visual Studio Team Service Release Management began failing in the Azure Web App Deployment Task, during the Deploy Website to Azure step with the generic error:

You cannot call a method on a null-valued expression

  • We created a new Release Definition, but it exhibits the same issue.
  • I attempted a Release with the previously successful version of the build, and it too exhibits the same exception.
  • I have verified that there is no deploy.cmd in the repository.
  • I have verified the items in the change set for the build.
    They only touched one .cs file, three .js files, and changed the value of the <add key="Client.CacheVersion" value="X"> from 4 to 6.

Though the documentation states that the -ErrorVariable is valid for the script in question. The only difference in the log files (pre-failure information) is the addition of -ErrorVariable publishAzureWebSiteError to the end of the Publish-AzureWebsiteProject call.

Is there anyway to either populate the publishAzureWebSiteError, or remove this extraneous variable?

UPDATE: After adding system.debug. I see that I am unable to resolve {mysite}.scm.azurewebsites.net.

UPDATE II After 2 hours with Microsoft it appears that Release Management is having some difficulty working with App Service Environments. At first it was unable to map the scm URL appropriately and once we added the expected suffix to the Web App Name field we received the error:

Conflict: The host name MY_WEB_APP.APP_SERVICE_NAME.p.azurewebsites.net is already assigned to another Azure website: MY_WEB_APP.

FINAL UPDATE It appears that the releases are now running as expected with in at least on the previously failing releases no changes were made. Since MS clearly changed something on their end, this question will provide no benefit to future users. I am voting to close it.

2
Note: I am verifying one item based on system.debug logging.Joshua Drake
Are you using the hosted agent or an on-prem agent?Pascal Berger
@PascalBerger this is all via Visual Studio Team Services and deploying to Azure, so hosted.Joshua Drake

2 Answers

2
votes

As this question has yet to be closed.

For those that come after:

The fix came from Microsoft. Premier support emailed me with the following this morning:

I just spoke to the developer who pushed the fix. And the fix has to do with correctly forming a SCM name which in your case is part of ASE. So there were no exceptions being raised this time and it worked for you.

So there are/were no workarounds, nor changes even possible on the part of the end user.

1
votes

We are working on a hotfix for this issue. Workaround until then: The website should get deployed correctly despite this error. Can you set "Continue on error" to true, and check whether the site is deployed?