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

actions/setup-node@v4 can't install from default registry on Windows ARM #1121

Closed
hungnv-sr opened this issue Aug 22, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@hungnv-sr
Copy link

Description:
Exception when installing node from this registry (error logs below)
https://github.com/actions/node-versions/releases/download/22.6.0-10277432289/node-22.6.0-win32-arm64.7z
It still succeeded to fail back to other registry, but it increase build time.

Action version:
v4

Platform:

  • Windows ARM

Runner type:

  • Github Hosted Windows ARM

Tools version:
npm

Repro steps:
everytime

Expected behavior:
It should be installed successfully from the first registry.
Being able to choose default registry is also good.

Actual behavior:
Logs

Run actions/setup-node@v4
getting latest node version...
getting latest node version...
Attempting to download v22.6.0...
Acquiring 22.6.0 - arm64 from https://github.com/actions/node-versions/releases/download/22.6.0-10277432289/node-22.6.0-win32-arm64.7z
Extracting ...
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\a\_temp\1a003888-2ce2-43ea-99a9-559522cd4c[16](https://github.com/...).zip' -DestinationPath 'C:\a\_temp\1c68af65-a37c-4737-98ab-bd771e275182' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\a\_temp\1a003888-2ce2-43ea-99a9-559522cd4c16.zip', 'C:\a\_temp\1c68af65-a37c-4737-98ab-bd771e275182', $true) }"
New-Object : Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found."
At 
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:934 
char:23
+ ... ipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -Ar ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
 
The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
Falling back to download directly from Node
Acquiring [22](https://github.com/...).6.0 - arm64 from https://nodejs.org/dist/v22.6.0/node-v22.6.0-win-arm64.zip
Extracting ...
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\a\_temp\26ab3c44-3d9d-47f2-8d00-01fdd4f92758.zip' -DestinationPath 'C:\a\_temp\0f88f46d-6fa5-4797-96f7-38d5cbce00[24](https://github.com/...)' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\a\_temp\26ab3c44-3d9d-47f2-8d00-01fdd4f92758.zip', 'C:\a\_temp\0f88f46d-6fa5-4797-96f7-38d5cbce0024', $true) }"
Adding to the cache ...
Done
@hungnv-sr hungnv-sr added bug Something isn't working needs triage labels Aug 22, 2024
@priya-kinthali
Copy link

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

@priyagupta108 priyagupta108 self-assigned this Aug 28, 2024
@frederic-rg
Copy link

The issue has been fixed with the v22.8.0 release?

@priyagupta108
Copy link
Contributor

Hi 👋,
We've merged PR #1126 into the main branch with a potential fix. Could you please try to use actions/setup-node@main to confirm that it works as expected.

@hungnv-sr
Copy link
Author

@priyagupta108 Confirmed. Changing to actions/setup-node@main fixed it.
It reduced the step time by almost a minute!

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

4 participants