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

setup-node@4 fails to run on arm64 builds #994

Closed
lokesh-couchbase opened this issue Apr 2, 2024 · 7 comments
Closed

setup-node@4 fails to run on arm64 builds #994

lokesh-couchbase opened this issue Apr 2, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@lokesh-couchbase
Copy link

This is the github action I am trying to execute.

  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            platform: linux
            arch: arm64
          - os: macos-13
            platform: darwin
            arch: arm64
    runs-on: ${{ matrix.os }}
    steps:
      - shell: pwsh
        run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          architecture: ${{ matrix.arch }}
          cache: 'npm'

. There are other steps later but for arm64 builds, it fails at setup-node@v4 step with the following error

Mac Arm 64

Extracting ...
/usr/bin/tar xz --strip 1 -C /Users/runner/work/_temp/567[13](https://github.com/couchbaselabs/VSCode-Couchbase/actions/runs/8518675448/job/23331250387#step:4:14)870-ba5a-45a1-8a6f-62588161ee1d -f /Users/runner/work/_temp/ba58543f-6f25-4d75-a75b-49ee69b4d428
Adding to the cache ...
Environment details
  node:internal/errors:497
      ErrorCaptureStackTrace(err);
      ^
  
  Error: spawn Unknown system error -86
      at ChildProcess.spawn (node:internal/child_process:421:11)
      at Object.spawn (node:child_process:761:9)
      at ToolRunner.<anonymous> (/Users/runner/work/_actions/actions/setup-node/v4/dist/setup/index.js:6772:34)
      at Generator.next (<anonymous>)
      at /Users/runner/work/_actions/actions/setup-node/v4/dist/setup/index.js:6386:71
      at new Promise (<anonymous>)
      at __webpack_modules__.8[15](https://github.com/couchbaselabs/VSCode-Couchbase/actions/runs/8518675448/job/23331250387#step:4:16)9.__awaiter (/Users/runner/work/_actions/actions/setup-node/v4/dist/setup/index.js:6382:12)
      at /Users/runner/work/_actions/actions/setup-node/v4/dist/setup/index.js:6754:53
      at new Promise (<anonymous>)
      at ToolRunner.<anonymous> (/Users/runner/work/_actions/actions/setup-node/v4/dist/setup/index.js:6754:[20](https://github.com/couchbaselabs/VSCode-Couchbase/actions/runs/8518675448/job/23331250387#step:4:21)) {
    errno: -86,
    code: 'Unknown system error -86',
    syscall: 'spawn'
  }
  
  Node.js v20.8.1

ubuntu arm 64

Attempting to download 20...
Acquiring 20.[12](https://github.com/couchbaselabs/VSCode-Couchbase/actions/runs/8518675448/job/23331249968#step:4:13).0 - arm64 from https://github.com/actions/node-versions/releases/download/20.12.0-8446029429/node-20.12.0-linux-arm64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/cd584cde-cff9-411e-a19f-7c00db957efb -f /home/runner/work/_temp/a4345947-83ef-450f-9246-f740e04bf9f5
Adding to the cache ...
Environment details
/opt/hostedtoolcache/node/20.12.0/arm64/bin/npm config get cache
/opt/hostedtoolcache/node/20.12.0/arm64/bin/node: 1: �ELF�������TĻ@xn��@8: not found
/opt/hostedtoolcache/node/20.12.0/arm64/bin/node: 3: Syntax error: word unexpected (expecting ")")
Error: /opt/hostedtoolcache/node/20.12.0/arm64/bin/node: 1: �ELF�������TĻ@xn��@8: not found
/opt/hostedtoolcache/node/20.12.0/arm64/bin/node: 3: Syntax error: word unexpected (expecting ")")

Is there any specific step I am missing for running Arm based builds? It works fine for x64 builds though

@lokesh-couchbase lokesh-couchbase added bug Something isn't working needs triage labels Apr 2, 2024
@aparnajyothi-y
Copy link
Contributor

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

@aparnajyothi-y aparnajyothi-y self-assigned this Apr 3, 2024
@aparnajyothi-y
Copy link
Contributor

"Hello @lokesh-couchbase, Thank you once again for creating this issue. We have investigated about the issue and found that the error is due to the runner that you are using .i.e. macos-13 and it is giving the Unknown system error -86, which typically means that the system is having trouble starting a new process due to some unknown condition as macos-13 doesn't support arm64. For arm64 we need to use the github hosted runner tag macos-13-arm64 to support the arm64 builds. We tried the same with macos-13-arm64 runner and able to run arm64 builds successfully using setup-node@v4. Please find the screenshots for reference.
Please update the runner and let us know if you are still facing the issue.
image

image"

@lokesh-couchbase
Copy link
Author

Thanks for your reply @aparnajyothi-y , Based on your suggestion I changed to another runner (macos-13-xlarge) which is built for mac arm and it worked.

Just 1 question, why is macos-latest failing when it is getting built using M1 cores itself? Is Mac OS Sonoma not yet supported?

@aparnajyothi-y
Copy link
Contributor

Hello @lokesh-couchbase, We don't have arm64 image pushed to macos-latest runner. Please refer this document.
Please let us know in case of any other clarifications needed.

@aparnajyothi-y
Copy link
Contributor

Hello @lokesh-couchbase, We don't have arm64 image pushed to macos-latest runner. Please refer this document.
Please let us know in case of any other clarifications needed.

@aparnajyothi-y
Copy link
Contributor

Closing this issue as we don't get any response from a long time. Please feel free to reach us in case of any other clarifications needed.

@Mrquinn4
Copy link

Mrquinn4 commented Apr 30, 2024 via email

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

3 participants