question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AzureFileCopyV2 Started Failing with Version 2.171.2

See original GitHub issue

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: Azure File Copy

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines
  • Agent - Private (Windows)

Issue Description

Azure File Copy v2 started failing yesterday (2020-07-09) after the upgrade to 2.171.2. Previous version 2.171.1 ran fine without error.

Task logs

2020-07-10T17:01:39.8418947Z ##[debug]Installed Azure PowerShell version: 3.5.0
2020-07-10T17:01:39.8438816Z ##[debug]Compare azure versions: 3.5.0, 0.9.0
2020-07-10T17:01:39.8455795Z ##[debug]Validated the required azure powershell version is greater than or equal to 0.9.0
2020-07-10T17:01:39.8548720Z ##[debug][Azure Call]Getting resource details for azure storage account resource: REDACTED with resource type: Microsoft.Storage/storageAccounts
2020-07-10T17:01:43.6467540Z ##[debug]Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses.ErrorResponseMessageException: ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '<null>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
2020-07-10T17:01:43.6477689Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__9.MoveNext()
2020-07-10T17:01:43.6488536Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.6499540Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.6511061Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.6521989Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__8.MoveNext()
2020-07-10T17:01:43.6533142Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.6544562Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.6556562Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.6569466Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__7`1.MoveNext()
2020-07-10T17:01:43.6580360Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.6591132Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.6602231Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.6613176Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResource>d__66.MoveNext()
2020-07-10T17:01:43.6623970Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.6635130Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.6646438Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.6657547Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResources>d__65.MoveNext()
2020-07-10T17:01:43.6794659Z ##[debug]Processed: ##vso[task.logissue type=error;code={"Task_Internal_Error":"TemporaryCopyingToBlobContainerFailed"};]
2020-07-10T17:01:43.6795398Z ##[debug]Trying to disconnect from Azure and clear context at process scope
2020-07-10T17:01:43.8771336Z ##[debug]Caught exception from task script.
2020-07-10T17:01:43.8802577Z ##[debug]Error record:
2020-07-10T17:01:43.9353701Z ##[debug]Get-AzureRmResource : ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '<null>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
2020-07-10T17:01:43.9364896Z ##[debug]At F:\agent2\_work\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.171.2\AzureUtilityGTE1.0.ps1:27 char:47
2020-07-10T17:01:43.9376298Z ##[debug]+ ... ceDetails = Get-AzureRmResource -ResourceType $ARMStorageAccountResou ...
2020-07-10T17:01:43.9389460Z ##[debug]+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-07-10T17:01:43.9402241Z ##[debug]    + CategoryInfo          : CloseError: (:) [Get-AzureRmResource], ErrorResp    onseMessageException
2020-07-10T17:01:43.9413465Z ##[debug]    + FullyQualifiedErrorId : ResourceNotFound,Microsoft.Azure.Commands.Resour    ceManager.Cmdlets.Implementation.GetAzureResourceCmdlet
2020-07-10T17:01:43.9424726Z ##[debug] 
2020-07-10T17:01:43.9442422Z ##[debug]Script stack trace:
2020-07-10T17:01:43.9479813Z ##[debug]at Get-AzureStorageAccountResourceGroupName, F:\agent2\_work\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.171.2\AzureUtilityGTE1.0.ps1: line 27
2020-07-10T17:01:43.9491454Z ##[debug]at Get-AzureStorageKeyFromARM, F:\agent2\_work\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.171.2\AzureUtilityRest.ps1: line 28
2020-07-10T17:01:43.9503626Z ##[debug]at Get-StorageKey, F:\agent2\_work\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.171.2\Utility.ps1: line 149
2020-07-10T17:01:43.9514645Z ##[debug]at <ScriptBlock>, F:\agent2\_work\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\2.171.2\AzureFileCopy.ps1: line 103
2020-07-10T17:01:43.9525785Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-07-10T17:01:43.9540198Z ##[debug]at <ScriptBlock>, <No file>: line 22
2020-07-10T17:01:43.9552376Z ##[debug]at <ScriptBlock>, <No file>: line 18
2020-07-10T17:01:43.9564494Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-07-10T17:01:43.9586263Z ##[debug]Exception:
2020-07-10T17:01:43.9607525Z ##[debug]Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses.ErrorResponseMessageException: ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '<null>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
2020-07-10T17:01:43.9618275Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__9.MoveNext()
2020-07-10T17:01:43.9629039Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.9640807Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.9651370Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.9662940Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__8.MoveNext()
2020-07-10T17:01:43.9673767Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.9685037Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.9697747Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.9708463Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__7`1.MoveNext()
2020-07-10T17:01:43.9719859Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.9730688Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.9741686Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.9752220Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResource>d__66.MoveNext()
2020-07-10T17:01:43.9762829Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2020-07-10T17:01:43.9773711Z ##[debug]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2020-07-10T17:01:43.9784589Z ##[debug]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-10T17:01:43.9796438Z ##[debug]   at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResources>d__65.MoveNext()
2020-07-10T17:01:43.9973778Z ##[error]ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '<null>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
2020-07-10T17:01:43.9976293Z ##[debug]Processed: ##vso[task.logissue type=error]ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '<null>' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
2020-07-10T17:01:43.9980351Z ##[debug]Processed: ##vso[task.complete result=Failed]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

ResourceNotFound : The Resource ‘Microsoft.Storage/storageAccounts/REDACTED’ under resource group ‘<null>’ was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
JesseDeBruijnecommented, Jul 14, 2020

@asranja you mean the AzureRM version? I can confirm I was running it on 5.7.0 and upgrading to 6.13.1 resolved the issue.

To update, run the following command

Install-Module -Name AzureRM -Force
1reaction
asranjacommented, Jul 21, 2020

This should be fixed with version 2.171.3 and 3.171.3 of the task by now. Please requeue the pipeline and check if the issue has resolved for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure file copy fails to copy to Azure Blob #12154 - GitHub
I'm getting the same issue, this was running fine before, but recently has started to fail. I've tried with vs2017-win2016 image and windows- ......
Read more >
[Azure file copy task v2]: Resource not found
Azure File copy version in failing task: 2.171.2 ... Same issue here - All of our pipelines started failing yesterday on Azure File...
Read more >
AzureFileCopy@2 - Azure file copy v2 task - Microsoft Learn
Copy files to Azure Blob Storage or virtual machines (task version 2).
Read more >
Azure File Copy failing on second run in build pipeline
Not so much as solution, as a workaround but I set this to version 1 of the task and it worked for me!...
Read more >
Resolving an AuthorizationPermissionMismatch from the ...
The Azure File Copy task was reporting the following. INFO: Authentication failed, it is either not correct, or expired, or does not have ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found