ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.04k stars 1.4k forks source link

Unable to update multiple apps after updating to new Github personal Access token #5723

Closed Aravinth-Earth closed 10 months ago

Aravinth-Earth commented 11 months ago

Bug Report

Current Behavior

I have been using my own GitHub PAT, which got expired some time back, then configured with new token, with that I am unable to update few apps ( it's a static list, tried with different PAT token {which has fine grained access config to access all public GitHub repositories}, But works for the rest without any issue

Expected Behavior

All apps should get updated, without any error

Additional context/output

just the extracted list of apps, where the update is failing & where it's not App Name Update Status
authy Updated
bitwarden Failed
discord Failed
github Updated
googlechrome Updated
signal Updated
slack Updated
standardnotes Failed
telegram Failed
tutanota Updated
ungoogled-chromium Failed
vscode Updated
winmerge Failed
youtube-music Failed

the power shell output

PS C:\Windows\System32> scoop update && scoop status
Updating Scoop...
Updating 'extras' bucket...
 * 4d576ebee sidekick-browser: Update to version 116.53.1.36304-816141b  48 seconds ago
 * f8da0b9b1 radarr: Update to version 5.1.3.8246                        49 seconds ago
 * 091271afd okular: Update to version 23.08.2-1575                      49 seconds ago
 * d761ac1f1 librewolf: Update to version 119.0.1-1                      49 seconds ago
 * 2d9c99db9 jackett: Update to version 0.21.1179                        50 seconds ago
Updating 'java' bucket...
Updating 'main' bucket...
 * 06b21e9df sing-box: Update to version 1.6.3                           45 seconds ago
 * c5135896b flow: Update to version 0.221.0                             46 seconds ago
 * dbfaf740f dolt: Update to version 1.26.0                              46 seconds ago
Scoop was updated successfully!
Scoop is up to date.

Name               Installed Version Latest Version     Missing Dependencies Info
----               ----------------- --------------     -------------------- ----
authy              2.4.1             2.4.2
bitwarden          2023.9.3          2023.10.1
discord            1.0.9010-15       1.0.9022-16
github             3.3.5             7000
googlechrome       119.0.6045.106    119.0.6045.124
signal             6.37.0            6.38.0
slack              4.35.121          4.35.126
standardnotes      3.178.4           3.181.23
telegram           4.10.2            4.11.6
tutanota           3.118.22          3.118.25
ungoogled-chromium 118.0.5993.88-1.1 119.0.6045.105-1.1
vscode             1.83.1            1.84.2
winmerge           2.16.32           2.16.34
youtube-music      2.1.3             2.2.0

PS C:\Windows\System32> scoop update * && scoop cleanup * -k
authy: 2.4.1 -> 2.4.2
bitwarden: 2023.9.3 -> 2023.10.1
discord: 1.0.9010-15 -> 1.0.9022-16
github: 3.3.5 -> 7000
googlechrome: 119.0.6045.106 -> 119.0.6045.124
signal: 6.37.0 -> 6.38.0
slack: 4.35.121 -> 4.35.126
standardnotes: 3.178.4 -> 3.181.23
telegram: 4.10.2 -> 4.11.6
tutanota: 3.118.22 -> 3.118.25
ungoogled-chromium: 118.0.5993.88-1.1 -> 119.0.6045.105-1.1
vscode: 1.83.1 -> 1.84.2
winmerge: 2.16.32 -> 2.16.34
youtube-music: 2.1.3 -> 2.2.0
Updating 14 outdated apps:
Updating 'authy' (2.4.1 -> 2.4.2)
Downloading new version
authy-2.4.2-full.nupkg (84.0 MB) [============================================================================] 100%
Checking hash of authy-2.4.2-full.nupkg ... ok.
Uninstalling 'authy' (2.4.1)
Unlinking ~\scoop\apps\authy\current
Installing 'authy' (2.4.2) [64bit] from extras bucket
Loading authy-2.4.2-full.nupkg from cache
Extracting authy-2.4.2-full.nupkg ... done.
Linking ~\scoop\apps\authy\current => ~\scoop\apps\authy\2.4.2
Creating shortcut for Authy Desktop (Authy Desktop.exe)
'authy' (2.4.2) was installed successfully!
Updating 'bitwarden' (2023.9.3 -> 2023.10.1)
Downloading new version
OperationStopped: C:\Users\aravi\scoop\apps\scoop\current\lib\install.ps1:111
Line |
 111 |          throw $e
     |          ~~~~~~~~
     | Response status code does not indicate success: 401 (Unauthorized).

Possible Solution

No Clue, But seems some config related problem (may be on pat token creation ?)?

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 7.3.9

Additional software: Skipping the optional value

Scoop Configuration

{
  "last_update": "2023-11-10T09:36:14.7397572+05:30",
  "gh_token": "token-value",
  "git-set-token": "token-value",
  "scoop_branch": "master",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}
Zottelchen commented 11 months ago

I am receiving the same error after updating my PAT recently, but on Windows 10.

Aravinth-Earth commented 11 months ago

I am receiving the same error after updating my PAT recently, but on Windows 10.

Interesting!, By any chance is it the same/similar list of apps, you have issue with ?

Zottelchen commented 11 months ago

My currently stuck apps are:

I assume it has to do with the Github download links.

Aravinth-Earth commented 10 months ago

it seems so !

Also is there an easier way in scoop to get detailed error info of the failed install ? rather than just the one-liner !

Updating 'bitwarden' (2023.9.3 -> 2023.10.1)
Downloading new version
OperationStopped: C:\Users\aravi\scoop\apps\scoop\current\lib\install.ps1:111
Line |
 111 |          throw $e
     |          ~~~~~~~~
     | Response status code does not indicate success: 401 (Unauthorized).
Aravinth-Earth commented 10 months ago

Tried to re-install one of the apps with update issue, But the clean install also throws an error as Response status code does not indicate success: 401 (Unauthorized).

The full error message,

PS C:\Windows\System32> scoop install bitwarden
Installing 'bitwarden' (2023.10.1) [64bit] from extras bucket
Response status code does not indicate success: 401 (Unauthorized).
URL https://github.com/bitwarden/clients/releases/download/desktop-v2023.10.1/Bitwarden-Portable-2023.10.1.exe is not valid

But when hitting that download URL directly from the browser tab ( in both authorized or UN-authorized way), able to download the exe file.

So, Is the actual error, is it something to do with scoop way of downloading the files ?

Aravinth-Earth commented 10 months ago

@Zottelchen - found any workaround yet ?

Zottelchen commented 10 months ago

@Aravinth-Earth I just deleted the previous token and generated a new one on GitHub. Then I explicitly deleted the token saved by scoop (scoop config rm gh_token) and set the new one (scoop config gh_token <token>). Seems to work for now.

Aravinth-Earth commented 10 months ago

Cool, It' works for me as well..

Zottelchen commented 10 months ago

Maybe a temporary issue with token issuing on GitHubs part. Could also explain why the issue isn't more widespread🤔

Aravinth-Earth commented 10 months ago

True, Feels like a glitch in Github side & nothing to do with scoop, Hence closing this issue

Aravinth-Earth commented 10 months ago

Closing this issue