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 )
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
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.
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]
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
ResourceNotFound : The Resource 'Microsoft.Storage/storageAccounts/REDACTED' under resource group '
@asranja can you help with this? Looks like your commit is the only thing in 2.171.2:
https://github.com/microsoft/azure-pipelines-tasks/commit/b0c103ca030110dc2f0cba375d7c910e081f182b#diff-10c0386b7ba2862cd7e655dfcf5dbb96
We are having similar issue but with a different error message.
##[debug][Azure Call]Getting resource details for azure storage account resource: [REDACTED] with resource type: Microsoft.Storage/storageAccounts
##[debug]Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses.ErrorResponseMessageException: AuthorizationFailed : The client '[REDACTED1]' with object id '[REDACTED1]' does not have authorization to perform action 'Microsoft.Storage/storageAccounts/read' over scope '/subscriptions/[REDACTEDSUBID]' or the scope is invalid. If access was recently granted, please refresh your credentials.
The client and object id referenced do not actually exist within our AAD tenant and this is not the client id that is associated to the service connection.
Referencing this in case you haven't seen it already: https://developercommunity.visualstudio.com/content/problem/1106999/azure-file-copy-task-v2-resource-not-found.html
Hi all, we are noticing such issues with Azure PowerShell version < 6.13.1. Can any of you guys provide the Azure PowerShell version on your agent machine ?
Upgrading the Azure PowerShell version to 6.13.1 or using the latest Az modules should fix this.
@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
@JesseDeBruijne Thanks for confirming.
We will be hotfixing this with the appropriate solution.
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.
@asranja Thank you. I can confirm that 2.171.3 does fix the issue. Closing.
Most helpful comment
@asranja you mean the AzureRM version? I can confirm I was running it on
5.7.0and upgrading to6.13.1resolved the issue.To update, run the following command