Extras icon indicating copy to clipboard operation
Extras copied to clipboard

[email protected]: hash check failed

Open mikma-git opened this issue 3 years ago • 2 comments

I am greeted with this error when trying to run 'scoop update -a':

[17:37] mikma ~ > scoop update -a
syncthingtray: 1.4.8 -> 1.4.9
Updating one outdated app:
Updating 'syncthingtray' (1.4.8 -> 1.4.9)
Downloading new version
syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip (25,4 MB) [=============================================================================================================================================] 100%
Checking hash of syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip ... Get-FileHash : The file 'C:\Users\mikma\scoop\cache\syncthingtray#1.4.9#https_github.com_Martchus_syncthingtray_releases_download_v1.4.9_syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip' cannot be read: Operati
on did not complete successfully because the file contains a virus or potentially unwanted software.
At C:\Users\mikma\scoop\apps\scoop\current\lib\install.ps1:674 char:16
+     $actual = (Get-FileHash -Path $file -Algorithm $algorithm).Hash.T ...
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (C:\Users\mikma\...mingw32.exe.zip:PSObject) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : FileReadError,Get-FileHash

You cannot call a method on a null-valued expression.
At C:\Users\mikma\scoop\apps\scoop\current\lib\install.ps1:674 char:5
+     $actual = (Get-FileHash -Path $file -Algorithm $algorithm).Hash.T ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Operation did not complete successfully because the file contains a virus or potentially unwanted software.
At C:\Users\mikma\scoop\apps\scoop\current\lib\core.ps1:1176 char:16
+         return Get-Content $file -Encoding byte -TotalCount 8
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (C:\Users\mikma\...mingw32.exe.zip:String) [Get-Content], IOException
    + FullyQualifiedErrorId : GetContentReaderIOError,Microsoft.PowerShell.Commands.GetContentCommand

ERROR Hash check failed!
App:         extras/syncthingtray
URL:         https://github.com/Martchus/syncthingtray/releases/download/v1.4.9/syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip
First bytes:
Expected:    71aee6fca114a78d21c317e7c6e36257446b56f46ae7017363c96c9fda882ed8
Actual:

mikma-git avatar Nov 27 '23 15:11 mikma-git

Cannot reproduce

Are you sure your scoop is up to date? Clean cache and reinstall Please run scoop update; scoop cache rm syncthingtray; and update/reinstall application

Hash mismatch could be caused by these factors:

  • Network error
  • Antivirus configuration
  • Blocked site (Great Firewall of China, Corporate restrictions, ...)

github-actions[bot] avatar Nov 27 '23 15:11 github-actions[bot]

[17:38] mikma ~ > scoop update; scoop cache rm syncthingtray;
Updating Scoop...
Updating 'ACooper81_scoop-apps' bucket...
Updating 'extras' bucket...
Updating 'main' bucket...
Updating 'nerd-fonts' bucket...
Removing https_github.com_Martchus_syncthingtray_releases_download_v1.4.8_syncthingtray-1.4.8-x86_64-w64-mingw32.exe.zip...
Deleted: 1 file, 25,3 MB
[17:43] mikma ~ > scoop uninstall syncthingtray
Uninstalling 'syncthingtray' (1.4.8).
Removing shim 'syncthingtray-cli.shim'.
Removing shim 'syncthingtray-cli.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Syncthing Tray.lnk
Unlinking ~\scoop\apps\syncthingtray\current
'syncthingtray' was uninstalled.
[17:43] mikma ~ > scoop install syncthingtray
Installing 'syncthingtray' (1.4.9) [64bit] from extras bucket
syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip (25,4 MB) [=============================================================================================================================================] 100%
Checking hash of syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip ... Get-FileHash : The file 'C:\Users\mikma\scoop\apps\syncthingtray\1.4.9\syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip' cannot be read: Operation did not complete successfully because the file contains a virus
 or potentially unwanted software.
At C:\Users\mikma\scoop\apps\scoop\current\lib\install.ps1:674 char:16
+     $actual = (Get-FileHash -Path $file -Algorithm $algorithm).Hash.T ...
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (C:\Users\mikma\...mingw32.exe.zip:PSObject) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : FileReadError,Get-FileHash

You cannot call a method on a null-valued expression.
At C:\Users\mikma\scoop\apps\scoop\current\lib\install.ps1:674 char:5
+     $actual = (Get-FileHash -Path $file -Algorithm $algorithm).Hash.T ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Operation did not complete successfully because the file contains a virus or potentially unwanted software.
At C:\Users\mikma\scoop\apps\scoop\current\lib\core.ps1:1176 char:16
+         return Get-Content $file -Encoding byte -TotalCount 8
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (C:\Users\mikma\...mingw32.exe.zip:String) [Get-Content], IOException
    + FullyQualifiedErrorId : GetContentReaderIOError,Microsoft.PowerShell.Commands.GetContentCommand

ERROR Hash check failed!
App:         extras/syncthingtray
URL:         https://github.com/Martchus/syncthingtray/releases/download/v1.4.9/syncthingtray-1.4.9-x86_64-w64-mingw32.exe.zip
First bytes:
Expected:    71aee6fca114a78d21c317e7c6e36257446b56f46ae7017363c96c9fda882ed8
Actual:

mikma-git avatar Nov 27 '23 15:11 mikma-git