ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.78k stars 1.34k forks source link

[Bug]: VS Code unable to install older versions #12290

Closed pbb72 closed 9 months ago

pbb72 commented 10 months ago

Prerequisites

Package Name

vscode

Expected/Current Behaviour

scoop install vscode@1.70.2 should install v.1.70.2

Instead, of gives an hash check failed error.

Steps to Reproduce

PS> scoop install vscode@1.70.2
WARN  Given version (1.70.2) does not match manifest (1.84.2)
WARN  Attempting to generate manifest for 'vscode' (1.70.2)
Autoupdating vscode
Searching hash for dl.7z in https://code.visualstudio.com/sha?build=stable
Found: e4dd3d83cb46e6889b02d542d30da37547329fba238745bed8a863eb365059a7 using Json Mode
Searching hash for dl.7z in https://code.visualstudio.com/sha?build=stable
Found: 3e309006bb2336e52b189520097474cc5bedbb5052b0e498996e224f3903ceac using Json Mode
Writing updated vscode manifest
Installing 'vscode' (1.70.2) [64bit]
dl.7z (110.8 MB) [============================================================================================] 100%
Checking hash of dl.7z ... ERROR Hash check failed!
App:         vscode
URL:         https://update.code.visualstudio.com/1.70.2/win32-x64-archive/stable#/dl.7z
First bytes: 50 4B 03 04 14 00 00 00
Expected:    e4dd3d83cb46e6889b02d542d30da37547329fba238745bed8a863eb365059a7
Actual:      3b20ef59eb1e6446e8c3ed65ada0af4531e52aa6f8add052a7f5740221e76323

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/ScoopInstaller/Extras/issues/new?title=vscode%401.84.2%3a+hash+check+failed

Possible Solution

It seems to me that the hash is always checked against the newest version, which of course fails for older versions.

Scoop and Buckets Version

Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
5f2c04010 (HEAD -> master, origin/master, origin/HEAD) sidekick-browser: Update to version 116.53.1.36304-816141b

'java' bucket:
6accee74 (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.402-2.0.202311171856

'KnotUntied_scoop-fonts' bucket:
9dc8b8d (HEAD -> master, origin/master, origin/HEAD) commitmono: Update to version 1.142

'main' bucket:
c05941604 (HEAD -> master, origin/master, origin/HEAD) sing-box: Update to version 1.6.6

'nerd-fonts' bucket:
370e208 (HEAD -> master, origin/master, origin/HEAD) GlowSansSC-Compressed: Update to version 0.93

'versions' bucket:
dcf071dba (HEAD -> master, origin/master, origin/HEAD) vscode-insiders: Update to version 1.85.0-insider+1700543120418

Scoop Config

last_update         scoop_repo                              scoop_branch
-----------         ----------                              ------------
21/11/2023 09:35:38 https://github.com/ScoopInstaller/Scoop master

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

HUMORCE commented 9 months ago

This feature is not guaranteed to be 100% available

HUMORCE commented 9 months ago

A known and documented issue.

pbb72 commented 9 months ago

A known and documented issue.

That is an extremely minimalist reply to close a bug report with. Known?? By whom? Definitely not by me. Documented?? Where? I didn't come across any.

If this is indicated anywhere, then surely this bug is still valid in pointing out the documentation is lacking in findability.

HUMORCE commented 9 months ago

I tagged the issue as wating feedback over 2 weeks, you stayed silent until I close it.

https://github.com/ScoopInstaller/Scoop/issues/3045 https://github.com/ScoopInstaller/Scoop/issues/3894


If this case, you can just skip hash check by command options.

pbb72 commented 9 months ago

You were waiting for feedback from me? Feedback on what, there was no question asked.

Also, you should be aware that GitHub does not send out notifications about added labels. So, the only notification I got was you saying This feature is not guaranteed to be 100% available. and two weeks later A known and documented issue.

HUMORCE commented 9 months ago

If you think I'm being rude about this, I am sorry. I am just waiting for how you're going to respond to my first reply.

You can skip the hash check for scoop install or scoop download and subscribe related issues in Core repo(see pre-reply).

pbb72 commented 9 months ago

No problem, you were not rude but just quicker to process this problem than I am. I know I am not the most tactful either. No harm meant. Thanks for the links to other issues for installing old versions, I now understand it's not a clear-cut as I thought it was. I will try skipping the hash-check next time!