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

Request timeout when attempting to download directly from Node

Open rwader-swi opened this issue 2 years ago • 5 comments

Description: image

  • When it doesn't find the node in cache, it gives request timeout.
  • After removing setup-node action, we've observed the github-scripts@v7 still run, but upload-artifacts action sometimes give issue.
  • And sometimes there aren't any logs of setup-node, whether it is caching node or caching the action itself, or attempting to download directly. Hence, we aren't sure how to debug it. Seems like a cache issue to me because it happened after we re-deployed our self-hosted github runners.
  • I tried to reproduce the issue by deleting the node cache in /opt/hostedtoolcache from our self-hosted runner, but in that case it passed 🙂
  • Its very random. Please if anyone has any idea, or whether it's related to our network issue, then help us ASAP.

Action version:

setup-node@v4

node version: 20

Platform:

  • [X] Ubuntu
  • [ ] macOS
  • [ ] Windows

Runner type:

  • [ ] Hosted
  • [X] Self-hosted

Tools version: node-version: 20

Repro steps:

Expected behavior: A description of what you expected to happen.

Actual behavior: A description of what is actually happening.

rwader-swi avatar Apr 12 '24 10:04 rwader-swi

image After tracing your code, the issue seems to have occurred at this step itself. Should I try giving a specific version like 20.x.x instead of just 20?

rwader-swi avatar Apr 12 '24 10:04 rwader-swi

Hello @rwader-swi, Thank you for creating this issue and we will look into it :)

aparnajyothi-y avatar Apr 12 '24 13:04 aparnajyothi-y

I get timeouts no matter what, can't download anything.

Attempting to download 14...
Request timeout: /repos/actions/node-versions/git/trees/main
Falling back to download directly from Node
::error::Request timeout: /dist/index.json

I can ping nodejs.org from the runner's server and curl https://nodejs.org/dist/index.json returns correct results so I don't think it is a network issue.

workflow.yaml

name: Build and Deploy Test Version

on:
  push:
    branches:
      - dev-branch

jobs:
  build_deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          ref: "dev-branch"
      - uses: actions/setup-node@v4
        with:
          node-version: 14
      - name: Install dependencies
        run: npm install
      - name: Build app
        run: npm run build
      - name: Deploy to server
        uses: appleboy/scp-action@master
        with:
          host: ${{ secrets.SERVER_HOST }}
          username: ${{ secrets.SERVER_USERNAME }}
          key: ${{ secrets.SSH_PRIVATE_KEY }}
          source: dist/
          target: /yacht/AppData/Config/Nginx/www/jtimar-lite/dist

alirezaalavi87 avatar Apr 14 '24 14:04 alirezaalavi87

I can ping nodejs.org from the runner's server and curl https://nodejs.org/dist/index.json returns correct results so I don't think it is a network issue.

Yeah same in my case

rwader-swi avatar Apr 15 '24 04:04 rwader-swi

Hello @rwader-swi, @alirezaalavi87 We have tried to reproduce the issue from our local and setup-action is successfully downloading the node-version: 20 or 14 from the node official website without any timeout issue. Please find the screenshots for reference and share the repro link to further investigate the issue as we are unable to reproduce the error from our end.

image image

aparnajyothi-y avatar May 14 '24 09:05 aparnajyothi-y

Hello @rwader-swi, Please share the repro link to investigate the issue further as we are unable to reproduce the issue.

aparnajyothi-y avatar May 27 '24 07:05 aparnajyothi-y

Hello, if this can help someone, we had the same issue on azure devops pipeline running the agent self-hosted behind a company proxy. We've solved configuring the environment variable HTTPS_PROXY on the pipeline and solved for us. Maybe is not exactly your case but in case this can help others i post it here.

oftravesset avatar May 27 '24 11:05 oftravesset

It is working fine now, I can't reproduce it. but like @oftravesset it might have something to do with proxies and internet sanctions.

alirezaalavi87 avatar May 28 '24 15:05 alirezaalavi87

Hello @rwader-swi, we are closing this issue for now due to inactivity. Please feel free to reach out if the issue persists, and we can reopen it.

Hello @alirezaalavi87, thank you for confirming that you are unable to reproduce the issue.

aparnajyothi-y avatar Jul 24 '24 14:07 aparnajyothi-y