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.

System.IO.FileLoadException: Unable to load symbolic/hard linked file

See original GitHub issue

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: CacheBeta

Environment

Issue Description

Task defined as:

- task: CacheBeta@0
  inputs:
    key: bundle | $(Agent.OS) | Gemfile.lock
    path: $(BUNDLE_PATH)
  displayName: Cache bundle gems

Fails during “Post-job: Cache bundle gems” with System.IO.FileLoadException: Unable to load symbolic/hard linked file

Task logs

##[section]Starting: Cache bundle gems
==============================================================================
Task         : Cache (Beta)
Description  : Cache files between runs
Version      : 0.1.0
Author       : Microsoft Corporation
Help         : https://aka.ms/pipeline-caching-docs
==============================================================================
Resolving key `bundle | Linux | Gemfile.lock`...
File hashes summarized as `hTIqJ3fX2+6SXJd6UpzXFnYQqQATflNFows4Jkh5BZc=` from BASE64(SHA256(`
SHA256(s/Gemfile.lock)=[15008]0DBAA318817D73F39C93650B7E988CD82747B05B005D252DC1B3B5BD74200106`))
Resolved to `bundle|Linux|hTIqJ3fX2+6SXJd6UpzXFnYQqQATflNFows4Jkh5BZc=`.
Information, Getting a pipeline cache artifact with one of the following fingerprints:
Information, Fingerprint: `bundle|Linux|hTIqJ3fX2+6SXJd6UpzXFnYQqQATflNFows4Jkh5BZc=`
Information, There is a cache miss.
Information, DedupManifestArtifactClient will correlate http requests with X-TFS-Session 38e62829-bc8b-4752-83db-c700fa61638a
Information, Processing .artifactignore file surfaced 58 files. Total files under source directory: 18911
Information, 18853 files to be processed in 190 groups.
Error, Failed to calculate hash for the file's reparse point: /home/vsts/work/1/s/vendor/bundle/ruby/2.6.0/gems/public_activity-1.6.3/test/migrations/001_create_activities.rb
Error, Failed to hash a page of files. Exception listed below...
Error, System.IO.FileLoadException: Unable to load symbolic/hard linked file.  Check 'fsutil behavior query SymlinkEvaluation' to ensure proper behavior. ---> System.IO.FileNotFoundException: Could not find file '/home/vsts/work/1/s/vendor/bundle/ruby/2.6.0/gems/public_activity-1.6.3/test/migrations/001_create_activities.rb'.
File name: '/home/vsts/work/1/s/vendor/bundle/ruby/2.6.0/gems/public_activity-1.6.3/test/migrations/001_create_activities.rb'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Microsoft.VisualStudio.Services.Content.Common.FileStreamUtils.OpenFileStreamForAsync(String filePath, FileMode mode, FileAccess fileAccess, FileShare fileShare, FileOptions extraOptions)
   at Microsoft.VisualStudio.Services.BlobStore.Common.ChunkerHelper.CreateFromFileAsync(IFileSystem fileSystem, String path, CancellationToken cancellationToken, Boolean configureAwait)
   at Microsoft.VisualStudio.Services.BlobStore.Common.FileBlobDescriptor.CalculateAsync(IFileSystem fileSystem, String rootDirectory, Boolean chunkDedup, String relativePath, FileBlobType fileBlobType, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.ArtifactServices.App.Shared.PrecomputedHashesGenerator.GetFileBlobDescriptorAsync(String rootDirectory, Boolean chunkDedup, PageItem pageItem, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.ArtifactServices.App.Shared.PrecomputedHashesGenerator.GetFileBlobDescriptorAsync(String rootDirectory, Boolean chunkDedup, PageItem pageItem, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.ArtifactServices.App.Shared.PrecomputedHashesGenerator.<>c__DisplayClass25_0.<<PaginateAndProcessFilesHelperAsync>b__0>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.ArtifactServices.App.Shared.PrecomputedHashesGenerator.PaginateAndProcessFilesHelperAsync(String sourceDirectory, Boolean chunkDedup, IEnumerable`1 pathsInDir, Action`1 hashCompleteCallback, Int32 currentPage, Int32 totalPages, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.ArtifactServices.App.Shared.PrecomputedHashesGenerator.<>c__DisplayClass22_0.<<PaginateAndProcessFiles>b__1>d.MoveNext()
Information, 100 out of 18853 files processed (Group: 128/190)
Information, 200 out of 18853 files processed (Group: 126/190)
...

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
rmetzgercommented, Dec 18, 2019

Is the TAR support limited to the cache? it would be nice if PublishPipelineArtifact would support that as well.

2reactions
ivailopcommented, Nov 8, 2019

It appears to be working for my use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

php - ##[error]Unable to load symbolic/hard linked file
When PublishPipelineArtifact task publishes a folder which contains a symbolic link. It does not preserve the symlink file.
Read more >
getting error System.IO.FileLoadException: Could not load file or
I have VS 2017 ver 15.9.24 installed and trying to run migration in .NET core project. Target version is .NET core 2.1.
Read more >
How to fix: The symbolic link cannot be followed because its ...
Remote to remote symbolic links are disabled . In order to enable remote to remote symbolic links, enter the following command: C:\>fsutil ...
Read more >
Why do I get an "System.IO.FileLoadException: Could not load ...
FileLoadException: Could not load file or assembly " error. What could be causing this? This is probably because you have an strong-named assembly...
Read more >
System.IO.FileLoadException Could not load file or assembly ...
System.IO.FileLoadException Could not load file or assembly error after deploying .Net ABL application.
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