evergreen
evergreen copied to clipboard
[Bug]: 7zip not working
What happened?
Error returned on Get-EvergreenApp -Name "7zip"
Version
2405.1054
What PowerShell edition/s are you running Evergreen on?
Windows PowerShell
Which operating system/s are you running Evergreen on?
Windows 10+, Windows Server 2016+
Have you reviewed the documentation?
- [X] Troubleshooting at: https://stealthpuppy.com/evergreen/troubleshoot/
- [X] Known issues at: https://stealthpuppy.com/evergreen/issues/
Verbose output
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.1054\Apps\Get-7zip.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.1054\Apps\Get-7zip.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.1054\Apps\Get-7zip.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program
Files\WindowsPowerShell\Modules\Evergreen\2405.1054\Manifests\7zip.json]
VERBOSE: Calling: Get-7zip.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UseBasicParsing: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: MaximumRedirection: 2.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: DisableKeepAlive: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.2478.67.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Method: Default.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Uri:
https://sourceforge.net/projects/sevenzip/best_release.json.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: ContentType: application/json; charset=utf-8.
VERBOSE: GET https://sourceforge.net/projects/sevenzip/best_release.json with 0-byte payload
VERBOSE: received 3020-byte response of content type application/json; charset=utf-8
VERBOSE: Get-SourceForgeRepoRelease: Validating SourceForge release object.
VERBOSE: Get-SourceForgeRepoRelease: Property validation succeeded.
VERBOSE: Get-SourceForgeRepoRelease: Capture version number from: /7-Zip/24.05/7z2405-x64.exe.
VERBOSE: Get-SourceForgeRepoRelease: Found filename: [7z2405-x64.exe].
VERBOSE: Get-SourceForgeRepoRelease: Found folder: [/7-Zip/24.05/].
VERBOSE: Get-SourceForgeRepoRelease: Found version: [24.05].
VERBOSE: Resolve-SystemNetWebRequest: Attempting to resolve:
http://downloads.sourceforge.net/project/sevenzip/7-Zip/24.05/7z2405-x64.exe?ts=gAAAAABmSLJGYN4ECC437TJW9PUuR8v28TK-YgK
jW2JPRfIxH8hk0ti4j8xhQDALsg5OaHXrmd6PTfMBq1k0lvrG-4-Bx4X4dw%3D%3D.
WARNING: Resolve-SystemNetWebRequest: Return code: [], with:
http://downloads.sourceforge.net/project/sevenzip/7-Zip/24.05/7z2405-x64.exe?ts=gAAAAABmSLJGYN4ECC437TJW9PUuR8v28TK-YgK
jW2JPRfIxH8hk0ti4j8xhQDALsg5OaHXrmd6PTfMBq1k0lvrG-4-Bx4X4dw%3D%3D.
WARNING: Resolve-SystemNetWebRequest: For troubleshooting steps see: https://stealthpuppy.com/evergreen/troubleshoot/.
WARNING: Run 'Get-EvergreenApp -Name "7zip" -Verbose' to review additional details for troubleshooting.
Resolve-SystemNetWebRequest : You cannot call a method on a null-valued expression.
At C:\Program Files\WindowsPowerShell\Modules\Evergreen\2405.1054\Shared\Get-SourceForgeRepoRelease.ps1:64 char:17
+ $Resolved = Resolve-SystemNetWebRequest @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Resolve-SystemNetWebRequest], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull,Resolve-SystemNetWebRequest
Also see #677
I'm unable to replication this issue at the moment. In the mean time you can use:
Get-EvergreenAppFromApi -Name 7zip
Just piggy-backing on this issue - but 7-Zip URLs on the main site are now redirecting to GitHub - looks like this is the new home for 7-Zip releases:
https://github.com/ip7z/7zip/releases
I don't see much info to validate that's an offical build.
The links on the official site (e g. https://www.7-zip.org/a/7z2406-x64.msi) all redirect there now, so I assume it's legit.
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
?viasf=1
Hello you can use -UserAgent "wget" when downloading from sourceforge.
Closing duplicate. Use: https://github.com/aaronparker/evergreen/issues/677