Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-version: 'latest' taking 20+ minuites #873

Closed
2 of 5 tasks
andyslack opened this issue Oct 18, 2023 · 25 comments
Closed
2 of 5 tasks

node-version: 'latest' taking 20+ minuites #873

andyslack opened this issue Oct 18, 2023 · 25 comments
Assignees
Labels
bug Something isn't working

Comments

@andyslack
Copy link

Description:

Node setup taking forever (20m+) when using latest

Exmaple:

screenshot

Code:

            -   name: Install Node.js
                uses: actions/setup-node@v3
                with:
                    node-version: 'latest'

Is the latest version not caches somewhere?

Action version:
actions/setup-node@v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted
@andyslack andyslack added bug Something isn't working needs triage labels Oct 18, 2023
@andyslack
Copy link
Author

Example of this failing.

Screenshot 2023-10-18 at 11 03 09

@daonb
Copy link

daonb commented Oct 18, 2023

I'm getting it too. I'm use latest as the node version and the Log is:

❯ gh run view 6558471842 --log-failed
test    Node setup      2023-10-18T08:48:29.8829257Z ##[group]Run actions/setup-node@v3
test    Node setup      2023-10-18T08:48:29.8829747Z with:
test    Node setup      2023-10-18T08:48:29.8830054Z   node-version: latest
test    Node setup      2023-10-18T08:48:29.8830412Z   always-auth: false
test    Node setup      2023-10-18T08:48:29.8830776Z   check-latest: false
test    Node setup      2023-10-18T08:48:29.8831318Z   token: ***
test    Node setup      2023-10-18T08:48:29.8831613Z ##[endgroup]
test    Node setup      2023-10-18T08:48:30.3387908Z getting latest node version...
test    Node setup      2023-10-18T08:48:30.3411536Z getting latest node version...
test    Node setup      2023-10-18T08:48:30.3413660Z Attempting to download v21.0.0...
test    Node setup      2023-10-18T08:48:30.6240758Z Not found in manifest. Falling back to download directly from Node
test    Node setup      2023-10-18T08:48:30.6557915Z Acquiring 21.0.0 - x64 from https://nodejs.org/dist/v21.0.0/node-v21.0.0-linux-x64.tar.gz
test    Node setup      2023-10-18T08:53:10.8209480Z aborted
test    Node setup      2023-10-18T08:53:10.8209977Z Waiting 14 seconds before trying again
test    Node setup      2023-10-18T09:02:35.6053574Z aborted
test    Node setup      2023-10-18T09:02:35.6054014Z Waiting 16 seconds before trying again
test    Node setup      2023-10-18T09:05:51.9376210Z ##[error]aborted

@tksx1227
Copy link

The same problem occurs when version 19.8.1 is specified.
At least as of two days ago I had the same problem.

    runs-on: ubuntu-latest
    steps:
      - name: Set up Node
        uses: actions/setup-node@v3
        with:
          node-version: 19.8.1

スクリーンショット 2023-10-18 午後6 12 48

I can get the tar.gz file correctly with curl, so I wonder if there is a problem with the cache handling in the @actions/tool-cache library?

スクリーンショット 2023-10-18 午後7 33 51

@jordanerf
Copy link

jordanerf commented Oct 18, 2023

Same issue here using

- name: Set up Node.js
  uses: actions/setup-node@v2
  with:
    node-version: '17.6.0'

The download speeds from nodejs.org do seem incredibly slow when manually downloading.

@andyslack
Copy link
Author

Same with node-version: '19'

Screenshot 2023-10-18 at 15 32 30

@mrollinsiv
Copy link

We are also seeing this issue. Anytime we try and install node v18, if Node's downloads are slow that day it always fails. We didn't have this issue on earlier node versions.

@marko-zivic-93
Copy link
Contributor

Hello @andyslack
Thank you for submitting this issue. We will investigate and come back to you as soon as possible 🚀

@andyslack
Copy link
Author

@marko-zivic-93 let me know if there is anything I can do to help!

@githubjonas
Copy link

Same problem here too.

jobs:
  test_frontend:
    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v3

    - name: Use Node.js
      uses: actions/setup-node@v3
      with:
        node-version: 19.x

    - name: Build
      run: |
        yarn install

    - name: Test
      run: |
        npm test

@juanmanjarres
Copy link

I'm getting the same issue with 19.1 since yesterday
Screenshot 2023-10-19 at 9 53 42 AM

@ert78gb
Copy link

ert78gb commented Oct 24, 2023

Same with node 21. The install or post-install steps fail almost every run

@jonathanzopes
Copy link

Any update on this?

@ivan-barragan
Copy link

Builds are failing for us as well. Downloads taking upwards of 7 hours.

@crespire
Copy link

crespire commented Oct 27, 2023

This is happening for us as well, using latest.

[edit]
Using v4 of the action resolved this issue for us. v4 was released 4 days ago, and I was unaware of the update.

@aaronklinker-st
Copy link

Had the same problem with v3, but it only happens intermittently. Tried v4 out, same problem.

@bonniegrubbs
Copy link

I found some information that might help others. If you can upgrade your version of node to an LTS version found in the manifest , I believe the builds will use the cached version from actions/node-versions and skip the download step. This link has more information, specifically this part:
"current/latest/node always resolve to the latest dist version. That version is then downloaded from actions/node-versions if possible, or directly from Node.js if not. Since it will not be cached always, there is possibility of hitting rate limit when downloading from dist"

@andyslack
Copy link
Author

@bonniegrubbs I think you are correct here.

Might be a good idea to add options to the manifest for latest-cached and also root versions e.g. 18 19 rather than having to specify 18.18.2

Just an idea to make it more user friendly.

noelwelsh added a commit to scalawithcats/scala-with-cats that referenced this issue Nov 22, 2023
This should use a Github cached version instead of hitting an outside
service that may be rated limited.

See actions/setup-node#873 (comment)
@mbrevda
Copy link

mbrevda commented Jan 23, 2024

Seeing this, too, with pinned versions of node. Sometimes the download fails and the ci failed. Is there some way to add more verbosity to try and see whats breaking down? Also, would it make sense to add a retry mechanism? Things generally work after re-running the workflow, so if we can just automate that it would allow ci to pass.

@stefcameron
Copy link

What I'm seeing with setup-node@v4 is whether I use 'latest' or '>=21.2', for example, the "best" I get is v18.19.1 while the actual latest is v21.7.0 right now.

    strategy:
      matrix:
        node-version: ['>=21.2']
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node ${{ matrix.node }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
          check-latest: true
          cache: npm

@vishlwalia345
Copy link

vishlwalia345 commented Aug 21, 2024

> Example of this failing.

Screenshot 2023-10-18 at 11 03 09

@vishlwalia345
Copy link

What I'm seeing with setup-node@v4 is whether I use 'latest' or '>=21.2', for example, the "best" I get is v18.19.1 while the actual latest is v21.7.0 right now.

    strategy:
      matrix:
        node-version: ['>=21.2']
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node ${{ matrix.node }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
          check-latest: true
          cache: npm

@vishlwalia345
Copy link

Builds are failing for us as well. Downloads taking upwards of 7 hours.

Hello @andyslack Thank you for submitting this issue. We will investigate and come back to you as soon as possible 🚀

@gowridurgad
Copy link

Hi @andyslack, Apologies for the delayed response. Could you please confirm if the issue is still relevant for you? I have tested from my end and was able to successfully complete the setup node step with in seconds . Please see the attached screenshot for reference.
Thank you!

Screenshot 2024-11-06 at 9 47 06 AM

@andyslack
Copy link
Author

Hi @gowridurgad, since switching to a specific node version, it works fine; I no longer use latest, so I cannot confirm if it's still an issue.

@gowridurgad
Copy link

Hi @andyslack, Thanks for the update, Since you’re no longer using the latest and there’s no active issue on your end, we are proceeding to close this issue. Please feel free to reopen this issue or create a new one if necessary. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests