Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure CLI - Hard linking failed

I am trying to download a Universal Package that is stored on Azure DevOps via:

az artifacts universal download --feed my-feed --name my-cool-package --version 1.0.0 --path Downloads

Inside this package is a single file my-file.dll. The error I receive is:

Encountered an unexpected error.
System.IO.IOException: Hard linking failed!
 Status: Failed
 Path: Downloads\my-file.dll
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupStoreClient.DownloadToFileAsync(DedupNode node, String fullPath, Uri proxyUri, EdgeCache edgeCache, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupStoreClientWithDataport.DownloadToFileAsync(IDedupDataPort dataport, DedupNode node, String fullPath, Uri proxyUri, EdgeCache edgeCache, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupStoreClientWithDataport.DownloadToFileAsync(IDedupDataPort dataport, DedupIdentifier dedupId, String fullPath, UInt64 fileSize, GetDedupAsyncFunc dedupFetcher, Uri proxyUri, EdgeCache edgeCache, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupManifestArtifactClient.<>c__DisplayClass24_0.<<DownloadAsyncWithManifestPath>b__5>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Services.Content.Common.NonSwallowingActionBlock.<>c__DisplayClass5_0`1.<<CreateNonSwallowingFunc>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Services.Content.Common.TargetBlockExtensions.SendAllAndCompleteAsync[T1,T2](ITargetBlock`1 targetBlock, IEnumerable`1 inputs, ITargetBlock`1 finalBlock, CancellationToken token)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupManifestArtifactClient.DownloadAsyncWithManifestPath(DownloadDedupManifestArtifactOptions downloadOptions, IEnumerable`1 minimatcherFuncs, Boolean downloadManifestReferences, ISet`1 excludedPaths, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupManifestArtifactClient.DownloadSingleManifestAsync(DownloadDedupManifestArtifactOptions downloadOptions, Boolean downloadManifestReferences, ISet`1 excludedPaths, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupManifestArtifactClient.DownloadAsync(DownloadDedupManifestArtifactOptions downloadOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Packaging.UPackClientShared.UPackSharedClient.DownloadAsync(String projectNameOrId, String feedNameOrId, String packageName, String packageVersion, String targetDirectory, IEnumerable`1 minimatchPatterns, CancellationToken cancellationToken)
   at ArtifactTool.Commands.UPackDownloadCommand.<>c__DisplayClass25_0.<<ExecuteAsync>b__0>d.MoveNext() in d:\a\1\s\src\ArtifactTool\Commands\UPack\UPackDownloadCommand.cs:line 60
--- End of stack trace from previous location where exception was thrown ---
   at ArtifactTool.Commands.UPack.UPackExceptionMapper.WithExceptionHandlingAsync(Func`1 act) in d:\a\1\s\src\ArtifactTool\Commands\UPack\UPackExceptionMapper.cs:line 39
   at ArtifactTool.Commands.UPackDownloadCommand.ExecuteAsync() in d:\a\1\s\src\ArtifactTool\Commands\UPack\UPackDownloadCommand.cs:line 64
   at ArtifactTool.Commands.CommandBase.OnExecuteAsync() in d:\a\1\s\src\ArtifactTool\Commands\CommandBase.cs:line 100
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 77
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context) in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 62
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext() in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 25
--- End of stack trace from previous location where exception was thrown ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass126_0.<OnExecute>b__0() in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.cs:line 505
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.cs:line 611
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 57
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 145
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](IConsole console, String[] args) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 130
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](String[] args) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 112

The only other instance I can find of this issue is this Github issue, but it did not help in resolving this issue for me.

One interesting note is that this command succeeds if I execute it by specifying --path to a location on the C:\ drive. It is failing when I execute with a path located on an external drive (e.g. E:\).

I have tried executing this in a Administrator PowerShell, to rule out a permissions issue, but encountered the same error. I have also added the --verbose --debug arguments, but I didn't see any information that would help me dig further into this issue.

Has anyone else encountered this issue? What other suggestions do you have for me to try to get this to succeed on a drive other than C:\?

like image 271
E-rich Avatar asked Aug 14 '26 14:08

E-rich


1 Answers

When I test downing artifact to external drive with the following az cli, I get the same error as you: System.IO.IOException: Hard linking failed!. Now this issue(Downloading artifact to external drive fails) has been reported to the product group for further investigation on Developer Community forum. If there is any progress, I will stay in sync here too.

cd F:\
az login in  
az artifacts universal download --organization https://dev.azure.com/xxx --feed xx --name xxx --version 1.0.0 --path . 

enter image description here

like image 152
Hugh Lin Avatar answered Aug 16 '26 20:08

Hugh Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!