setup-node: Error: getCacheEntry failed: Cache service responded with 503

2022-06-13T06:46:29.7622187Z ##[group]Run actions/setup-node@v2
2022-06-13T06:46:29.7622425Z with:
2022-06-13T06:46:29.7622601Z   node-version: 16.13
2022-06-13T06:46:29.7622858Z   cache: npm
2022-06-13T06:46:29.7623136Z   cache-dependency-path: ./slack-adapter/package-lock.json
2022-06-13T06:46:29.7623405Z   always-auth: false
2022-06-13T06:46:29.7623606Z   check-latest: false
2022-06-13T06:46:29.7623978Z   token: ***
2022-06-13T06:46:29.7624149Z ##[endgroup]
2022-06-13T06:46:29.9263615Z Attempting to download 16.13...
2022-06-13T06:46:30.1968736Z Acquiring 16.13.2 - x64 from https://github.com/actions/node-versions/releases/download/16.13.2-1681281899/node-16.13.2-linux-x64.tar.gz
2022-06-13T06:46:30.5470929Z Extracting ...
2022-06-13T06:46:30.5583930Z [command]/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C /home/runner/work/_temp/1c9fdfcb-b4e4-45cc-b8c0-879d4d188913 -f /home/runner/work/_temp/288baaa0-6ffa-45e6-b176-3504aa37feb4
2022-06-13T06:46:31.3994436Z Adding to the cache ...
2022-06-13T06:46:32.2973296Z Done
2022-06-13T06:46:32.2987622Z [command]/opt/hostedtoolcache/node/16.13.2/x64/bin/npm config get cache
2022-06-13T06:46:32.5559356Z /home/runner/.npm
2022-06-13T06:46:42.7419366Z ##[error]getCacheEntry failed: Cache service responded with 503

Description: setup-node fails with cacheing error

Action version: @actions/setup-nodev2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

node: 16.13.2

Repro steps:
Workflow file:

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 16.13
          cache: "npm"
          cache-dependency-path: ./slack-adapter/package-lock.json

Expected behavior: Success

Actual behavior: Failing on cache service

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 116
  • Comments: 21 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, all ๐Ÿ‘‹ ! We are working on that issue. Sorry for the inconvenience.

actions/cache issue aside, maybe the this action should allow restoreCache() to fail and continue regardless as if there was no cache.

The issue has been mitigated. Please confirm the same. Thanks for your patience ๐Ÿ™‡

This is issue with the cache action.

A previous issue has been revived here: https://github.com/actions/cache/issues/698

And a new issue has been opened here: https://github.com/actions/cache/issues/820

Iโ€™m sure the github team is looking into it asap!

The issue has been mitigated. Please confirm the same. Thanks for your patience ๐Ÿ™‡

Jobs using actions/setup-node ran without issue for me at 13:29 UTC and 13:38 UTC.

Temporary fix: removing cache: "npm" worked for me

I have the same issue

For quick workaround, please look at @vinayakkulkarniโ€™s answer.

๐Ÿ‘‹ we are seeing degraded performance with Github Actions cache service. Ideally it is recommended to not throw error only warning if cache is not working like we have in actions/cachehttps://github.com/actions/cache/blob/main/src/restore.ts#L55-L63 but look like setup-node is throwing error. SO till the issue get resolved can someone check without usng cache and cache-dependency-path param

I have the same problem with the following conditions.

- uses: actions/setup-node@v2
  with:
    node-version: "16"
    cache: "pnpm"

Found this (temporary) fix from a previous issue: https://github.com/actions/setup-node/issues/378#issuecomment-992237646

A similar error with:

jobs:
  Build:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository code
        uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: 'yarn'