aaronparker / evergreen

Create evergreen Windows image build pipelines with the latest version numbers and download URLs for common applications
http://stealthpuppy.com/evergreen/
MIT License
347 stars 61 forks source link

SourceForge changes affecting downloads with Save-EvergreenApp #677

Open aaronparker opened 1 month ago

aaronparker commented 1 month ago

What happened?

Changes at SourceForge are affecting downloads with Save-EvergreenApp - requests to SourceForce are being redirected to an HTML page instead of the binary.

A temporary workaround is to use a custom user agent as in the examples below:

Get-EvergreenApp -Name 7zip | Save-EvergreenApp -Path D:\Temp\7zip -UserAgent "winget-cli WindowsPackageManager/1.7.10861 DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.22.10861.0"

Get-EvergreenApp -Name 7zip | Save-EvergreenApp -Path D:\Temp\7zip -UserAgent "Evergreen/2405.994"

Version

2405.994

What PowerShell edition/s are you running Evergreen on?

PowerShell Core, Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows 10+, macOS

Have you reviewed the documentation?

Verbose output

n/a
delipastrami commented 1 month ago

Apologies if I'm posting in the wrong section, but it seems that the sourceforge/7zip issue is still present? I can't seem to resolve it, where Resolve-SystemNetWebRequest returns an error "You cannot call a method on a null-valued expression" This was even with the workaround you posted. Would you have another suggestion or would this simply be addressed in a future update? Thank you!

Screenshot 2024-05-21 at 3 45 28 PM
aaronparker commented 1 month ago

@delipastrami working here, so likely a temporary issue. Try again later

delipastrami commented 1 month ago

No dice at the moment still, thanks it looks like the endpoint cmdlet returns several URIs other than sourceforce, is it possible to have evergreen prefer one vs the others? ie: to grab it directly from 7zip org instead?

Application Endpoints Ports


7zip {nchc.dl.sourceforge.net, sourceforge.net, www.7-zip.org, cytranet-dal.dl.sourceforge.net} {443}

zimbo86 commented 1 week ago

Can confirm that adding -UserAgent "Evergreen/2405.994" works. Can i use this useragent for all packages, not only sourceforge? (I use save-evergreenapp within a custom module)

aaronparker commented 1 week ago

A custom user should work with all packages, but I've not tested it.

Cyanic-Cloud commented 3 days ago

Had the same issue, I had to edit the download uri slightly to Invoke-WebRequest -Uri $($DownloadURI + "?viasf=1") I had to add an if statement. If $DownloadURI -like "sourceforge.net do the above url edit.

Having visited the sourceforge.net using the new uri https://deac-riga.dl.sourceforge.net/project/sevenzip/7-Zip/24.06/7z2406-x64.msi it does a redirect to https://deac-riga.dl.sourceforge.net/project/sevenzip/7-Zip/24.06/7z2406-x64.msi?viasf=1 which then downloads the full file as normal.

This overall issue will affect all applications sourced from sourceforge.net as I had the same issue with WINSCP

Has anyone found a better a solution, if so please let me know