tiuub / KeeOtp2

KeeOtp2 is a plugin for KeePass. It provides a form to display one time passwords and is fully compatible with the built-in OTP function.
MIT License
126 stars 11 forks source link

choco installation error #33

Closed mdeweerd closed 8 months ago

mdeweerd commented 3 years ago

This issue has been appearing since a while: "2021-10-02 00:50:13,133 26976 [ERROR] - ERROR: Specified cast is not valid." "C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '''] exited with '-1'."

Extract from log,hopefully this helps


1-10-02 00:50:11,784 26976 [INFO ] - VERBOSE: Exporting alias 'Generate-BinFile'.
2021-10-02 00:50:11,786 26976 [INFO ] - VERBOSE: Exporting alias 'Add-BinFile'.
2021-10-02 00:50:11,791 26976 [INFO ] - VERBOSE: Exporting alias 'Start-ChocolateyProcess'.
2021-10-02 00:50:11,793 26976 [INFO ] - VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.
2021-10-02 00:50:11,795 26976 [INFO ] - VERBOSE: Exporting alias 'Remove-BinFile'.
2021-10-02 00:50:11,797 26976 [INFO ] - VERBOSE: Exporting alias 'refreshenv'.
2021-10-02 00:50:11,799 26976 [INFO ] - VERBOSE: Importing function 'Add-VisualStudioComponent'.
2021-10-02 00:50:11,800 26976 [INFO ] - VERBOSE: Importing function 'Add-VisualStudioWorkload'.
2021-10-02 00:50:11,802 26976 [INFO ] - VERBOSE: Importing function 'Format-FileSize'.
2021-10-02 00:50:11,804 26976 [INFO ] - VERBOSE: Importing function 'Get-AppInstallLocation'.
2021-10-02 00:50:11,806 26976 [INFO ] - VERBOSE: Importing function 'Get-AvailableDriveLetter'.
2021-10-02 00:50:11,808 26976 [INFO ] - VERBOSE: Importing function 'Get-ChecksumValid'.
2021-10-02 00:50:11,809 26976 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyUnzip'.
2021-10-02 00:50:11,811 26976 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyWebFile'.
2021-10-02 00:50:11,813 26976 [INFO ] - VERBOSE: Importing function 'Get-EffectiveProxy'.
2021-10-02 00:50:11,815 26976 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariable'.
2021-10-02 00:50:11,816 26976 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariableNames'.
2021-10-02 00:50:11,818 26976 [INFO ] - VERBOSE: Importing function 'Get-FtpFile'.
2021-10-02 00:50:11,821 26976 [INFO ] - VERBOSE: Importing function 'Get-OSArchitectureWidth'.
2021-10-02 00:50:11,823 26976 [INFO ] - VERBOSE: Importing function 'Get-PackageCacheLocation'.
2021-10-02 00:50:11,825 26976 [INFO ] - VERBOSE: Importing function 'Get-PackageParameters'.
2021-10-02 00:50:11,827 26976 [INFO ] - VERBOSE: Importing function 'Get-PackageParametersBuiltIn'.
2021-10-02 00:50:11,829 26976 [INFO ] - VERBOSE: Importing function 'Get-ToolsLocation'.
2021-10-02 00:50:11,830 26976 [INFO ] - VERBOSE: Importing function 'Get-UACEnabled'.
2021-10-02 00:50:11,832 26976 [INFO ] - VERBOSE: Importing function 'Get-UninstallRegistryKey'.
2021-10-02 00:50:11,834 26976 [INFO ] - VERBOSE: Importing function 'Get-VirusCheckValid'.
2021-10-02 00:50:11,837 26976 [INFO ] - VERBOSE: Importing function 'Get-VisualStudioInstaller'.
2021-10-02 00:50:11,839 26976 [INFO ] - VERBOSE: Importing function 'Get-VisualStudioInstallerHealth'.
2021-10-02 00:50:11,840 26976 [INFO ] - VERBOSE: Importing function 'Get-VisualStudioInstance'.
2021-10-02 00:50:11,842 26976 [INFO ] - VERBOSE: Importing function 'Get-VisualStudioVsixInstaller'.
2021-10-02 00:50:11,844 26976 [INFO ] - VERBOSE: Importing function 'Get-WebContent'.
2021-10-02 00:50:11,846 26976 [INFO ] - VERBOSE: Importing function 'Get-WebFile'.
2021-10-02 00:50:11,848 26976 [INFO ] - VERBOSE: Importing function 'Get-WebFileName'.
2021-10-02 00:50:11,850 26976 [INFO ] - VERBOSE: Importing function 'Get-WebHeaders'.
2021-10-02 00:50:11,852 26976 [INFO ] - VERBOSE: Importing function 'Install-BinFile'.
2021-10-02 00:50:11,855 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyDesktopLink'.
2021-10-02 00:50:11,857 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyEnvironmentVariable'.
2021-10-02 00:50:11,858 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyExplorerMenuItem'.
2021-10-02 00:50:11,860 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyFileAssociation'.
2021-10-02 00:50:11,862 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyInstallPackage'.
2021-10-02 00:50:11,864 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPackage'.
2021-10-02 00:50:11,866 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPath'.
2021-10-02 00:50:11,868 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPinnedTaskBarItem'.
2021-10-02 00:50:11,871 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPowershellCommand'.
2021-10-02 00:50:11,873 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyShortcut'.
2021-10-02 00:50:11,875 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyVsixPackage'.
2021-10-02 00:50:11,876 26976 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyZipPackage'.
2021-10-02 00:50:11,878 26976 [INFO ] - VERBOSE: Importing function 'Install-DotNetDevPack'.
2021-10-02 00:50:11,880 26976 [INFO ] - VERBOSE: Importing function 'Install-DotNetFramework'.
2021-10-02 00:50:11,882 26976 [INFO ] - VERBOSE: Importing function 'Install-VisualStudio'.
2021-10-02 00:50:11,885 26976 [INFO ] - VERBOSE: Importing function 'Install-VisualStudioInstaller'.
2021-10-02 00:50:11,887 26976 [INFO ] - VERBOSE: Importing function 'Install-VisualStudioVsixExtension'.
2021-10-02 00:50:11,889 26976 [INFO ] - VERBOSE: Importing function 'Install-Vsix'.
2021-10-02 00:50:11,891 26976 [INFO ] - VERBOSE: Importing function 'Install-WindowsUpdate'.
2021-10-02 00:50:11,893 26976 [INFO ] - VERBOSE: Importing function 'Register-Application'.
2021-10-02 00:50:11,895 26976 [INFO ] - VERBOSE: Importing function 'Remove-Process'.
2021-10-02 00:50:11,897 26976 [INFO ] - VERBOSE: Importing function 'Remove-VisualStudioComponent'.
2021-10-02 00:50:11,899 26976 [INFO ] - VERBOSE: Importing function 'Remove-VisualStudioProduct'.
2021-10-02 00:50:11,901 26976 [INFO ] - VERBOSE: Importing function 'Remove-VisualStudioWorkload'.
2021-10-02 00:50:11,903 26976 [INFO ] - VERBOSE: Importing function 'Set-EnvironmentVariable'.
2021-10-02 00:50:11,905 26976 [INFO ] - VERBOSE: Importing function 'Set-PowerShellExitCode'.
2021-10-02 00:50:11,907 26976 [INFO ] - VERBOSE: Importing function 'Start-ChocolateyProcessAsAdmin'.
2021-10-02 00:50:11,908 26976 [INFO ] - VERBOSE: Importing function 'Test-ProcessAdminRights'.
2021-10-02 00:50:11,910 26976 [INFO ] - VERBOSE: Importing function 'Test-WindowsUpdate'.
2021-10-02 00:50:11,913 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-BinFile'.
2021-10-02 00:50:11,916 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyEnvironmentVariable'.
2021-10-02 00:50:11,918 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyPackage'.
2021-10-02 00:50:11,920 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyZipPackage'.
2021-10-02 00:50:11,922 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-VisualStudio'.
2021-10-02 00:50:11,924 26976 [INFO ] - VERBOSE: Importing function 'Uninstall-VisualStudioVsixExtension'.
2021-10-02 00:50:11,925 26976 [INFO ] - VERBOSE: Importing function 'Update-SessionEnvironment'.
2021-10-02 00:50:11,927 26976 [INFO ] - VERBOSE: Importing function 'Write-ChocolateyFailure'.
2021-10-02 00:50:11,929 26976 [INFO ] - VERBOSE: Importing function 'Write-ChocolateySuccess'.
2021-10-02 00:50:11,932 26976 [INFO ] - VERBOSE: Importing function 'Write-FileUpdateLog'.
2021-10-02 00:50:11,933 26976 [INFO ] - VERBOSE: Importing function 'Write-FunctionCallLogMessage'.
2021-10-02 00:50:11,935 26976 [INFO ] - VERBOSE: Importing alias 'Add-BinFile'.
2021-10-02 00:50:11,937 26976 [INFO ] - VERBOSE: Importing alias 'Generate-BinFile'.
2021-10-02 00:50:11,939 26976 [INFO ] - VERBOSE: Importing alias 'Get-InstallRegistryKey'.
2021-10-02 00:50:11,940 26976 [INFO ] - VERBOSE: Importing alias 'Get-OSBitness'.
2021-10-02 00:50:11,942 26976 [INFO ] - VERBOSE: Importing alias 'Get-ProcessorBits'.
2021-10-02 00:50:11,946 26976 [INFO ] - VERBOSE: Importing alias 'Invoke-ChocolateyProcess'.
2021-10-02 00:50:11,948 26976 [INFO ] - VERBOSE: Importing alias 'refreshenv'.
2021-10-02 00:50:11,950 26976 [INFO ] - VERBOSE: Importing alias 'Remove-BinFile'.
2021-10-02 00:50:11,951 26976 [INFO ] - VERBOSE: Importing alias 'Start-ChocolateyProcess'.
2021-10-02 00:50:11,973 26976 [DEBUG] - ---------------------------Script Execution---------------------------
2021-10-02 00:50:11,974 26976 [DEBUG] - Running 'ChocolateyScriptRunner' for keepass-plugin-keeotp2 v1.5.6.1 with packageScript 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2', installArguments: '', packageParameters: '',
2021-10-02 00:50:11,990 26976 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1'
2021-10-02 00:50:12,001 26976 [INFO ] - VERBOSE: Searching registry for installed KeePass...
2021-10-02 00:50:13,133 26976 [ERROR] - ERROR: Specified cast is not valid.
2021-10-02 00:50:13,137 26976 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1' -installArguments '' -packageParameters '''] exited with '-1'.
2021-10-02 00:50:13,140 26976 [DEBUG] - Calling command ['"C:\WINDOWS\System32\shutdown.exe" /a']
2021-10-02 00:50:13,186 26976 [DEBUG] - Command ['"C:\WINDOWS\System32\shutdown.exe" /a'] exited with '1116'
2021-10-02 00:50:13,457 26976 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2'
2021-10-02 00:50:13,458 26976 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\keepass-plugin-keeotp2.nupkg'
  with checksum '7F44B5E2CCD41F0A88A5523065FD7230'
2021-10-02 00:50:13,459 26976 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\keepass-plugin-keeotp2.nuspec'
  with checksum '610E8A6D36CB5EAED5C332E690BFA130'
2021-10-02 00:50:13,461 26976 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1'
  with checksum 'C5CBF9029AD0B392B4F9A822E2479FC3'
2021-10-02 00:50:13,463 26976 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyuninstall.ps1'
  with checksum 'CE17D16E75A6B9F26FA8FED7DC40B5CC'
2021-10-02 00:50:13,475 26976 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\keepass-plugin-keeotp2.1.5.6.1\.arguments".
2021-10-02 00:50:13,475 26976 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\keepass-plugin-keeotp2.1.5.6.1\.extra".
2021-10-02 00:50:13,478 26976 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\keepass-plugin-keeotp2.1.5.6.1\.version".
2021-10-02 00:50:13,480 26976 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\keepass-plugin-keeotp2.1.5.6.1\.sxs".
2021-10-02 00:50:13,481 26976 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\keepass-plugin-keeotp2.1.5.6.1\.pin".
2021-10-02 00:50:13,486 26976 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\keepass-plugin-keeotp2".
2021-10-02 00:50:13,488 26976 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2021-10-02 00:50:13,490 26976 [ERROR] - The install of keepass-plugin-keeotp2 was NOT successful.
2021-10-02 00:50:13,493 26976 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1'.
 See log for details.
tiuub commented 3 years ago

Hi @mdeweerd,

Im on it. In the meantime you can manually install the plugin by downloading the .plgx from the Releases page and place it in the Plugins folder.

Kind regards

mdeweerd commented 3 years ago

@tiuub Thank you!

I used to install it manually, but I try to switch to choco to make updates easier. Then this messed up some stuff due to the manual/choco mixing. It's not urgent ;-), but if nobody reports it then it could be bad press for a good plugin ;-).

tiuub commented 3 years ago

Did you use powershell with admin privileges and is your KeePass fully installed or the portable version?

Kind regards

mdeweerd commented 1 year ago

Update:

Just tried in Powershell, with admin privileges, Keepass fully installed (just upgraded using `choco install --force keepass`` to v2.53.1 .

Error when trying to install keepass-plugin-keeotp2:

Progress: Downloading keepass-plugin-keeotp2 1.5.9... 100%

keepass-plugin-keeotp2 v1.5.9 (forced) [Approved]
keepass-plugin-keeotp2 package files install completed. Performing other installation steps.
ERROR: Specified cast is not valid.
The install of keepass-plugin-keeotp2 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\keepass-plugin-keeotp2\tools\chocolateyinstall.ps1'.
 See log for details.

This is on windows 11.

mdeweerd commented 8 months ago

Stale Issue, closed by the author, not a bot ;-).