Azure-pipelines-tasks: AzureRM Web App Deployment fails with `Error: Set parameters file not found`

Created on 30 Sep 2016  路  27Comments  路  Source: microsoft/azure-pipelines-tasks

One of the most frustrating things with using these tasks is the code base changing underneath and something succeeding just fine months ago now starts failing.

A release management environment step using the AzureRM Web App Deployment was succeeding as of July 27 2016 is now failing two months later in a release to that environment Sep 29 2016. The release definition has not changed in that time period. /sigh

The SetParameters File option is blank and it's states this is optional.

Release

All 27 comments

@rglos
Can you share debug logs and screenshot of task to [email protected] . To enable debug logs add variable "system.debug" and set its value to true.

I was having the same issue yesterday. All my release definitions failed. The issue was that my agent had received task AzureRMWebAppDeployment 2.0.1 from VsTs. This versions breaks with version 1.x.x. I couldn't get version 2 to work with my self zipped unofficial webdeploy packages.
I solved it for now by copying the 1.1.18 version of the task in my agents directory to a new task in which I only changed the guid and name in the task.json and uploaded it again as a private custom task.
Doing major semantic version updates in existing tasks will break peoples builds/releases. Creating a new task or maybe introducing versions inside the tasks selector UI could prevent this.

I am getting this error with all of our releases since our build agent auto-updated to 2.0.1 version of this task this morning. My debug log indicates the following:

2016-09-30T14:28:09.8243126Z ##[debug]SetParametersFile=C:\Build\_work\bc3b965fe

This is odd because the field is completely blank in the release definition:

image

@Ajay-MS I've emailed as requested to [email protected]. I received an underliverable email stating:

Your message to [email protected] couldn't be delivered.

The group vsdpteng only accepts messages from people in its organization or on its allowed senders list, and your email address isn't on the list.

Our tasks look the same as @mimicx10, minus the Remove Additional Files at Destination

@Ajay-MS I'm having the same issues.

This started this morning/overnight. These tasks were succeeding yesterday afternoon.
I've tried using an empty variable in hopes that it would not simply default the file path to what seems to be the working directory, but that did not work either.

[edit: removed the ugly log text]

@rglos @JoeBrockhaus @mimicx10

Can you confirm if you are still facing this issue ? can you also confirm if your task being got updated to version 2.0.2 or not ?

@Ajay-MS testing now, will let you know.

  • [e1] Creating a new release did not yield the 2.0.2 update. I will add a new Task, copy the props, and try again.
  • [e2] Still using 2.0.1 after creating a new Task.
  • [e3] Can you clarify if, to kick the new version, we should re-add the Task, create a new Release/Build, or if there is nothing we can do?
  • [e4] We're not using hosted builds, and I don't have the keys to the build server to manually modify code atm. Can I force it to update, externally?
  • [e5] 09/30 6pm: Tried switching to Hosted build server.. Still using 2.0.1. I'm punting this til next week I guess.

@Ajay-MS

Running the deployment this morning I see it's using 2.0.2 and it was successful. Thanks for the quick turn-around.

2016-09-30T16:54:01.5562643Z Set workingFolder to default: C:\Data\Apps\agent02\tasks\AzureRmWebAppDeployment\2.0.2

@Ajay-MS I am still receiving this error. However, my build agent does not yet have the updated 2.0.2 task.

I just manually applied Ajay's fix to version 2.0.1 of the task on my build server. The commit can be found here https://github.com/Microsoft/vsts-tasks/commit/be5ad1c0dff84ae08f4e8e71dc5d24453e024a4a . You will need to update the TypeScript and Javascript files (or probably just the JS). This will hold us over until 2.0.2 gets to our machines.

@Ajay-MS Is there a way to force the agent to use (and download) a new version of a task?
How long should it take for these updates to push to all hosted &/or our own build servers?

2.0.2 has fixed this problem for us, thanks!

@JoeBrockh

It should be automatically update to new task ideally , I need to check why your not being updated to new version of task. Can you send me logs or your Release definition and also your server domain URL at [email protected] if you are still facing this issue.

@Ajay-MS, also could do with a force update to the new task, as this has not been updated automatically.

2016-10-03T09:11:31.0212787Z Set workingFolder to default: C:????DownloadsagenttasksAzureRmWebAppDeployment2.0.1

@MC-Keith
Could you please restart your agent and try if its for you.

@Ajay-MS I had just restarted the VM the build agent is running on to see if that resolved the issue before posting!

Can you mail me your visual studio account URL ?

We are also experiencing this issue in our release definitions.

we're also experiencing this issue

(running 2.0.1, it hasn't updated to 2.0.2)

We have figured out the issue that for few account task is not being updating to 2.02 . I will fix it by tomorrow.

As a work around, the old WebDeploy task seems to work.

we've just applied the patch from the PR manually and it works fine as a work around.

@carlwoodhouse
Thanks :)

As a workaround in your downloaded task , in azurermwebappdeployment.js file apply fix of following PR.
SetParamFile Fix - PR

I am trying to update fix on all accounts soon.

Can you please verify if still you are facing this issue or you task has not been updated to 2.0.2

Working for us now, thank you Ajay.

Hosted releases for us are now up to 2.0.2.
Private build server still using 2.0.1

If you're still having this problem, here's a little PS to make the necessary change using VSTS.

  • Use the PowerShell++ Task to run this as Inline - the 'PowerShell' Task has an arbitrarily tiny maxlength for what you can inline..
$path = "C:\apps\buildagent\tasks\AzureRMWebAppDeployment\2.0.1\"
if (Test-Path $path) {
    $jsFilePath = $path + "azurermwebappdeployment.js"
    $tsFilePath = $path + "azurermwebappdeployment.ts"

    $oldLine = "*(!tl.filePathSupplied('SetParametersFile'))*"
    $newLine = @"
        // https://github.com/Microsoft/vsts-tasks/issues/2719
        // if(!tl.filePathSupplied('SetParametersFile')) {
        if ((!tl.filePathSupplied('SetParametersFile')) || setParametersFile == tl.getVariable('System.DefaultWorkingDirectory')) {
"@

    $jsContent = Get-Content $jsFilePath
    $jsContent | % { If ($_.ReadCount -eq 211 -and $_ -like $oldLine) {$newLine} Else {$_} } | Set-Content -Path $jsFilePath

    $tsContent = Get-Content $tsFilePath
    $tsContent | % { If ($_.ReadCount -eq 226 -and $_ -like $oldLine) {$newLine} Else {$_} } | Set-Content -Path $tsFilePath
}
else { "C:\apps\buildagent\tasks\AzureRMWebAppDeployment\2.0.1\ does not exist" }

As I have got response from almost all of you that this issue has been fixed I am closing this issue. Feel free to reopen in case of you face it again.

Was this page helpful?
0 / 5 - 0 ratings