setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

Hang on Windows after "Adding to the cache ..."

Open kevinoid opened this issue 2 years ago • 7 comments

Description: In one of my repositories, actions/setup-node hangs after "Adding to the cache ..." until the job times out.

Action version: v3

Platform:

  • [ ] Ubuntu
  • [ ] macOS
  • [x] Windows

Runner type:

  • [x] Hosted
  • [ ] Self-hosted

Tools version: I've observed the error with node-version: '14.18' and node-version: '>=17.1'.

Repro steps:

I'm observing the issue in my eslint-config-kevinoid repository. I've created a minimal workflow which reproduces the issue which produced this failing workflow run.

Minimal Workflow Issue Reproduction YAML

name: Failing Workflow
on:
  push: {}
  workflow_dispatch: {}
jobs:
  test:
    name: Node ${{ matrix.node }} ${{ matrix.arch }} on ${{ matrix.os }}
    timeout-minutes: 5
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        arch:
        - x64
        os:
        - windows-latest
        node:
        - '14.18'
    steps:
    - uses: actions/checkout@v3
    - name: Set up Node.js ${{ matrix.node }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node }}
        architecture: ${{ matrix.arch }}
        check-latest: ${{ matrix.node == '*' }}

Note that the 5 minute timeout in the reproduction was added arbitrarily to make the issue easier to test and demonstrate. The original workflow actions/setup-node@v3 failed after 6 hours.

Also note that the issue does not occur if the actions/checkout@v3 step is removed.

Expected behavior: The actions/setup-node@v3 step would complete in a reasonable amount of time.

Actual behavior: The actions/setup-node@v3 step does not complete after 5 minutes (or 6 hours).

kevinoid avatar Mar 17 '23 15:03 kevinoid