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

Run actions/setup-node@v4 at self-hosted windows host failed with 7zr exit code 2 #1147

Open
2 of 5 tasks
duguying opened this issue Oct 17, 2024 · 1 comment
Open
2 of 5 tasks
Labels
bug Something isn't working

Comments

@duguying
Copy link

Description:
i setup nodejs env with actions/setup-node@v4 (config file as follow), using gitea actions to run it, but there is an error occurred, it seems like there is an error with 7z unpack.

Action version:
Specify the action version
actions/setup-nodejs@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

C:\Windows\System32>node -v
v22.9.0

C:\Windows\System32>npm -v
10.8.3

C:\Windows\System32>

Repro steps:
config file as follow

name: release installation package
run-name: Check if release trigger works
on:
  release:
    types: [published]

jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: 
      - windows

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4

      - name: Setup Nodejs
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'npm'

      - name: "Cache node_modules"
        id: cache-node-modules-zjz-electron
        uses: "actions/cache@v4"
        with:
          path: |
            node_modules/            
          save-always: true
          key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
          restore-keys: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}

      # electron build
      - name: build electron project
        run: |
          npm install
          npm run make          

      - uses: actions/upload-artifact@v3
        with:
          name: artifact
          include-hidden-files: true
          path: |
            out/make/            

  release:
    needs: build
    runs-on: windows
    steps:
      - uses: actions/download-artifact@v3
        with:
          name: artifact
          path: .
      - name: Display structure of downloaded files
        run: ls ./
      - name: release installation package  
        id: installation-package
        uses: https://gitea.com/actions/release-action@main
        with:
          files: |-
            ./**            
          api_key: '${{secrets.TOKEN}}'

Expected behavior:
no error, setup nodejs correctly.

Actual behavior:
failed log as follow

Attempting to download 20...
(node:13[2](https://git.duguying.net/electron/zjz/actions/runs/39#jobstep-2-2)36) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Acquiring 20.18.0 - x64 from https://github.com/actions/node-versions/releases/download/20.18.0-11182621166/node-20.18.0-win[3](https://git.duguying.net/electron/zjz/actions/runs/39#jobstep-2-3)2-x64.7z
Extracting ...
The process 'C:\WINDOWS\system32\config\systemprofile\.cache\act\9e[4](https://git.duguying.net/electron/zjz/actions/runs/39#jobstep-2-4)4613ce8d1b200\act\actions\e5877e7fc2f7e5000a2f22526584a2565cc2ae38cd26a9b1938dbca653b056cc\externals\7zr.exe' failed with exit code 2
Falling back to download directly from Node
Acquiring 20.18.0 - x64 from https://nodejs.org/dist/v20.18.0/node-v20.18.0-win-x64.7z
Extracting ...
::error::The process 'C:\WINDOWS\system32\config\systemprofile\.cache\act\9e44613ce8d1b200\act\actions\e[5](https://git.duguying.net/electron/zjz/actions/runs/39#jobstep-2-5)877e7fc2f7e5000a2f2252[6](https://git.duguying.net/electron/zjz/actions/runs/39#jobstep-2-6)584a2565cc2ae38cd26a9b1938dbca653b056cc\externals\7zr.exe' failed with exit code 2
@duguying duguying added bug Something isn't working needs triage labels Oct 17, 2024
@HarithaVattikuti
Copy link
Contributor

Hello @duguying 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

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

2 participants