Skip to content

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

Description

@hungnv-sr

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

Activity

  1. v-priya-kinthali commented on Aug 22, 2024

    @v-priya-kinthali
    Contributor

    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.

  2. frederic-rg commented on Sep 4, 2024

    @frederic-rg

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

  3. v-priyagupta108 commented on Sep 9, 2024

    @v-priyagupta108
    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.

  4. hungnv-sr commented on Sep 10, 2024

    @hungnv-sr
    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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions