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.

Unable to restore cache

See original GitHub issue

I’m trying to cache/restore vcpkg artifacts with vcpkg installed to a path under the C:\ drive.

The reason I’m not using the default workspace directory (under D:\) is because there is not enough free space available for the installation of all packages, even if installing one package at a time and clearing buildtrees between installations, instead of installing everything at once by using the response file directly.

While there is enough free space on the C:\ drive to install all packages successfully and complete the jobs, I can’t get the cache to restore correctly in subsequent jobs that attempt to use it. The problem is reproducible.

The cache restoration fails with the following errors:

C:/qbt_tools/vcpkg/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg'
C:/qbt_tools/vcpkg/.artifactignore: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.artifactignore'
C:/qbt_tools/vcpkg/.git/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.git'
C:/qbt_tools/vcpkg/.gitattributes: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.gitattributes'
C:/qbt_tools/vcpkg/.github/: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.github'
C:/qbt_tools/vcpkg/.gitignore: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.gitignore'
C:/qbt_tools/vcpkg/.vcpkg-root: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\.vcpkg-root'
C:/qbt_tools/vcpkg/bootstrap-vcpkg.bat: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\bootstrap-vcpkg.bat'
C:/qbt_tools/vcpkg/bootstrap-vcpkg.sh: Can't create '\\\\?\\C:\\qbt_tools\\vcpkg\\bootstrap-vcpkg.sh'
...
... (same for all other vcpkg files)
...
tar.exe: Error exit delayed from previous errors.
restoreCache() failed: 'Error: Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1'.
Cache miss.

Example of run that cached the artifacts successfully: https://github.com/FranciscoPombal/qBittorrent/actions/runs/146840965 Example of run that failed to restore them: https://github.com/FranciscoPombal/qBittorrent/runs/806709981

Is this happening because it’s not possible to restore cache to the C:\ drive? Is this a limitation of the underlying cache action? Any help appreciated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lukkacommented, Jun 26, 2020

@FranciscoPombal cool, thanks for reporting. Looks sensible to me that run-vcpkg action ensures the cached paths are existing at least, this issue could be just tracking this work to be done on run-vcpkg.

0reactions
FranciscoPombalcommented, Jun 26, 2020

@lukka

This should probably be another issue (possibly even for the upstream cache action), but it seems I’m sporadically getting this error when attempting to restore the cache:

Running restore-cache
##[warning]restoreCache() failed: 'Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close'.
Cache miss.

Most recently happened in this run (third matrix leg/variant): https://github.com/FranciscoPombal/qBittorrent/runs/809641734

Read more comments on GitHub >

github_iconTop Results From Across the Web

actions/cache@v2 error: Cache Service Url not found, unable ...
I am using a github action developed by someone else in my own action via uses . Their action includes actions/cache , causing...
Read more >
getCacheEntry failed: Cache service responded with 503
The Cache service doesn't seem to work. So you need to disable caching to bypass this issue. Remove the line cache: 'pip' and...
Read more >
CIrcleCi failed to restore cache
Circleci shows that the save cache step completes successfully, but not the restore.
Read more >
Restore missing Windows Installer cache files - Microsoft Learn
Windows support engineers cannot help you recover missing application files from the Windows Installer cache.
Read more >
58/5000 Problem with cache manager and cache restore
... a cache.put is returning the error “RestartStore is not ready for mutations” So how can I solve this problem and how to...
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