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

bug: Chocolatey 504s from VMs #4

Open
HarryET opened this issue Feb 7, 2023 · 3 comments
Open

bug: Chocolatey 504s from VMs #4

HarryET opened this issue Feb 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@HarryET
Copy link
Contributor

HarryET commented Feb 7, 2023

See: https://github.com/HarryET/gleam-chocolatey/actions/runs/4112491248/jobs/7097469762

Found that Chocolatey 504s from VMs will need to investigate

@HarryET HarryET added the bug Something isn't working label Feb 7, 2023
@arothuis
Copy link

arothuis commented Feb 15, 2023

Perhaps this happens because the verification fails?

See: https://community.chocolatey.org/packages/gleam/0.26.2
Details here: https://gist.github.com/5e206615a7fb6e5d326affae56268c8c

In that gist, we can see the verification fails on the URL:

2023-02-07 12:51:33,601 4788 [INFO ] - Downloading Gleam 64 bit
  from 'https://github.com/gleam-lang/gleam/releases/download/0.26.2/gleam-0.26.2-x86_64-pc-windows-msvc.zip'
2023-02-07 12:51:33,601 4788 [DEBUG] - Running Get-WebFile -url 'https://github.com/gleam-lang/gleam/releases/download/0.26.2/gleam-0.26.2-x86_64-pc-windows-msvc.zip' -fileName 'C:\Users\vagrant\AppData\Local\Temp\chocolatey\gleam\0.26.2\GleamInstall.zip' -options 'System.Collections.Hashtable' 
2023-02-07 12:51:33,616 4788 [DEBUG] - Setting request timeout to  30000
2023-02-07 12:51:33,632 4788 [DEBUG] - Setting read/write timeout to  2700000
2023-02-07 12:51:33,632 4788 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2023-02-07 12:51:36,024 4788 [ERROR] - ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://github.com/gleam-lang/gleam/releases/download/0.26.2/gleam-0.26.2-x86_64-pc-windows-msvc.zip'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
 at Get-WebFile, C:\ProgramData\chocolatey\helpers\functions\Get-WebFile.ps1: line 351
at Get-ChocolateyWebFile, C:\ProgramData\chocolatey\helpers\functions\Get-ChocolateyWebFile.ps1: line 374
at Install-ChocolateyZipPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyZipPackage.ps1: line 228
at <ScriptBlock>, C:\ProgramData\chocolatey\lib\gleam\tools\chocolateyinstall.ps1: line 9
at <ScriptBlock>, C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 63
at <ScriptBlock>, <No file>: line 1

The reason a 404 is returned is because the correct URL should include the v for the version numbers, the link should be:

https://github.com/gleam-lang/gleam/releases/download/v0.26.2/gleam-v0.26.2-x86_64-pc-windows-msvc.zip

We could choose not the strip the v in the GitHub Action workflow or add the v in the template file (.handlebars):
https://github.com/HarryET/gleam-chocolatey/blob/041651a7e59ec1ec95052180957b82366c003ce0/tools/chocolateyinstall.ps1.handlebars#L2

EDIT: I see that it has already been added to the GitHub Action workflow. Perhaps repackage / re-release it?

@arothuis
Copy link

Also note that the .handlebars file is shipped. Perhaps this is not needed?

@HarryET
Copy link
Contributor Author

HarryET commented Feb 15, 2023

I have fixed that I just need to redeploy it. But yes the fact that handlebars is still there is bad - please can you make a second issue for that?

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