azure-cli-extensions: az artifacts universal download fails

I have installed az-cli on my macOS 10.14.3 system with: $ brew update && brew install azure-cli $ az extension add --name azure-devops Then successfully logged in with $ az login When I want to download a universal artifact from my Azure Devops account with: $ az artifacts universal download --feed “XXX” --name “YYY” --path . --version “###” --org “https://dev.azure.com/zzzzzz/

The binary is being downloaded, but then I get the following errors (reproducible on two different machines): [GetBuildDropManagerAsync] Try 1/5, retryable exception caught. Retrying in 00:00:01. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [GetBuildDropManagerAsync] Try 2/5, retryable exception caught. Retrying in 00:00:02.0460000. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [GetBuildDropManagerAsync] Try 3/5, retryable exception caught. Retrying in 00:00:04.4350000. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [GetBuildDropManagerAsync] Try 4/5, retryable exception caught. Retrying in 00:00:07.7130000. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [GetBuildDropManagerAsync] Try 5/5, retryable exception caught. Retrying in 00:00:13.2850000. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [GetBuildDropManagerAsync] Try 6/5, retryable exception caught, but retries have been exhausted. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? Encountered an unexpected error. Microsoft.VisualStudio.Services.Common.VssServiceException: TF400813: The user 'GUID\my-email-address' is not authorized to access this resource. at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.GetConnectionDataAsync(ConnectOptions connectOptions, Int64 lastChangeId, CancellationToken cancellationToken, Object userState) at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.ConnectAsync(ConnectOptions connectOptions, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.Location.LocationService.CreateDataProviderAsync(String location, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.Location.LocationService.ResolveLocationDataAsync(Guid locationAreaIdentifier, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.Location.LocationService.GetLocationDataAsync(Guid locationAreaIdentifier, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.VssConnection.GetClientInstanceAsync(Type managedType, Guid serviceIdentifier, CancellationToken cancellationToken, VssHttpRequestSettings settings, DelegatingHandler[] handlers) at Microsoft.VisualStudio.Services.WebApi.VssConnection.GetClientServiceImplAsync(Type requestedType, Guid serviceIdentifier, Func4 getInstanceAsync, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.WebApi.VssConnection.GetClientAsync[T](CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.Content.Common.AsyncHttpRetryHelper1.InvokeAsync(CancellationToken cancellationToken) at ArtifactTool.BuildDropManagerProvider.GetBuildDropManagerAsync(String serviceUrl, String patVar, ILogger commandBaseLogger, IAppTraceSource tracer, CancellationToken cancellationToken) at ArtifactTool.Commands.UPackDownloadCommand.ExecuteAsync() at ArtifactTool.Commands.CommandBase.OnExecuteAsync() at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass126_0.<OnExecute>b__0() at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context) at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](IConsole console, String[] args)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 28 (8 by maintainers)

Most upvoted comments

Great, it worked also for me:

az logout
az devops login

I’m having this problem as well. I’m on Windows 10 running the latest version of the azure-cli (2.0.62) and azure-devops (0.4.0).

az artifacts universal download --feed "my-feed" --name "myartifact" --path "C:\Users\X\Desktop\" --version "1.0.0" --org "https://dev.azure.com/myname"

I get the exact same error as Pegolon:

Universal Packages is currently in preview. [VerifyConnectionAsync] Try 1/2, retryable exception caught. Retrying in 00:00:01. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [VerifyConnectionAsync] Try 2/2, retryable exception caught. Retrying in 00:00:02.1070000. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? [VerifyConnectionAsync] Try 3/2, retryable exception caught, but retries have been exhausted. Details: Exception.Data didn't contain key LastRequestResponse or its value was null or not a string. Was HttpRequestExceptionExtensions.SetHttpMessagesForTracing called? Encountered an unexpected error. Microsoft.VisualStudio.Services.Common.VssServiceException: TF400813: The user 'my-guid\my-name@company.com' is not authorized to access this resource. ..... .....

I have tried creating an entirely new organization with an entirely new Artifacts feed, I’ve tried using both az login and az devops login with the same results. If I intentionally login to a different azure account which does not have access to the resource, I get a one-line sensible error that my user is not authorized to access this resource, but without the large exception dump.

Furthermore, using the VSTS CLI equivalent of this, which has almost the exact same parameters works great. I was able to upload and download universal files using the VSTS CLI, and have tried downloading those with az artifacts universal and uploading new files, but all with the same results.

UPDATE: I was able to eventually get around this by using removing az devops login and instead having it retrieve my PAT from an environment variable.

I want to use both: while developing I want to use the CLI to download the framework, when building on a pipeline during CI/CD I want to use the download task. That way I can reduce the complexity that CocoaPods brings to the table and I have a prebuilt binary framework available and don’t need to check it into a separate repository.