Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle MSI Error 1638 on upgrade of packages #762

Open
bc3tech opened this issue Jun 1, 2016 · 9 comments
Open

Handle MSI Error 1638 on upgrade of packages #762

bc3tech opened this issue Jun 1, 2016 · 9 comments

Comments

@bc3tech
Copy link
Contributor

bc3tech commented Jun 1, 2016

Editor (Rob): Handle 1638 errors automatically allowing things to be "upgraded" automatically. In other words, see this error come back and then do the needful on getting things into the correct state.

This may incorporate some switches and feature flags to allow for customization of how this works.

Related to #484 and #755.

ORIGINAL

What You Are Seeing?

Trying to update plexmediaserver pkg on my machine. I do cup -y -pre -f and am met with error code 1638 failure from the installer. If I go to the temp dir and execute the installer manually, it throws me the error that another version is installed and I need to uninstall that first

What is Expected?

I would expect plex to do something successful, esp with the -f flag on it. As it stands now, there's no way for me to get the version on the PC and the choco version in sync (without a complete uninstall)

How Did You Get This To Happen? (Steps to Reproduce)

  1. cinst plexmediserver --version=0.9.11.7803
  2. Install plexmediaserver v0.9.15.6.1714-7be11e1 from plex.com (or otherwise outside choco)
  3. cup plexmediaserver -y -pre -f
  4. Observe error

Output Log

PS C:\WINDOWS\system32> cup plexmediaserver -y -pre -f
Chocolatey v0.9.10-beta1-385-g8127955 Professional
Upgrading the following packages:
plexmediaserver
By upgrading you accept licenses for the packages.
You have plexmediaserver v0.9.11.7803 installed. Version 0.9.1213.1464 is available based on your source(s).

plexmediaserver v0.9.1213.1464 (forced) [Approved]
Loading 'chocolatey.licensed' extension.
Virus check: 0/54 scan engines flagged this assembly.
 Due to possible false positives we fail at 5 minimum positives.
 Virus scan engines indicate this file is probably safe. For details see
  https://www.virustotal.com/file/5510607d949e3341d1886df79587209d8f73b5a264225ece7d7ab89d7bfa9bc1/analysis/
Installing Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe...

ERROR: Running ["d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.
1464-4ccd2ca-en-US.exe"  /quiet /norestart] was not successful. Exit code was '1638'. See log for possible error message
s.
The upgrade of plexmediaserver was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'.
 See log for details.

Chocolatey upgraded 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
 - plexmediaserver (exited 1638) - Error while running 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyIn
stall.ps1'.
 See log for details.
NOTE: Hiding sensitive configuration data! Please double and triple 
 check to be sure no sensitive data is shown, especially if copying 
 output to a gist for review.
2016-06-01 11:33:37,595 [DEBUG] - Configuration: LicensedInformation.LicenseType='Professional'|
LicensedInformation.LicenseIsValid='True'|
LicensedInformation.LicenseIsTrial='False'|
LicensedInformation.LicenseUserName='Brandon H... (brandon[at REDACTED])'|

LicensedInformation.LicenseExpirationDate='5/6/2017 12:00:00 AM'|
LicensedInformation.LicensedVersion='1.3.2.0'|
LicensedInformation.LicensedProductVersion='1.3.2'|
LicensedFeatures.UseDownloadCache='True'|
VirusConfiguration.VirusCheckMinimumPositives='5'|
VirusConfiguration.VirusScannerType='VirusTotal'|
VirusConfiguration.GenericVirusScannerArgs='[[File]]'|
VirusConfiguration.GenericVirusScannerValidExitCodes='0'|
CommandName='upgrade'|
CacheLocation='d:\users\SYSTEM\AppData\Local\Temp\chocolatey'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='45'|
Sources='https://licensedpackages.chocolatey.org/api/v2/;https://chocolatey.org/api/v2/'|

SourceType='normal'|Debug='False'|Verbose='False'|Force='True'|
Noop='False'|HelpRequested='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='False'|AcceptLicense='True'|
AllowUnofficialBuild='False'|Input='plexmediaserver'|
AllVersions='False'|SkipPackageInstallProvider='False'|
PackageNames='plexmediaserver'|Prerelease='True'|ForceX86='False'|
OverrideArguments='False'|NotSilent='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.14342.0'|
Information.PlatformName='Windows'|
Information.ChocolateyVersion='0.9.10.0'|
Information.ChocolateyProductVersion='0.9.10-beta1-385-g8127955'|
Information.FullName='choco, Version=0.9.10.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64Bit='True'|Information.IsInteractive='True'|
Information.IsUserAdministrator='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='True'|Features.AutoUninstaller='True'|
Features.CheckSumFiles='True'|Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.VirusCheck='True'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|ListCommand.LocalOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'|
ListCommand.Exact='False'|ListCommand.ByIdOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|FeatureCommand.Command='unknown'|
ConfigCommand.Command='unknown'|PinCommand.Command='unknown'|
2016-06-01 11:33:37,611 [DEBUG] - _ Chocolatey:ProChocolateyUpgradeCommand - Normal Run Mode _
2016-06-01 11:33:37,636 [INFO ] - Upgrading the following packages:
2016-06-01 11:33:37,663 [INFO ] - plexmediaserver
2016-06-01 11:33:37,697 [INFO ] - By upgrading you accept licenses for the packages.
2016-06-01 11:33:38,825 [WARN ] - You have plexmediaserver v0.9.11.7803 installed. Version 0.9.1213.1464 is available based on your source(s).
2016-06-01 11:33:38,870 [DEBUG] - Backing up existing plexmediaserver prior to upgrade.
2016-06-01 11:33:38,881 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\plexmediaserver'
 to 'C:\ProgramData\chocolatey\lib-bkp\plexmediaserver'
2016-06-01 11:33:40,892 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\plexmediaserver".
2016-06-01 11:33:40,901 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\plexmediaserver\plexmediaserver.0.9.8.18290.nupkg"
 to "C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.0.9.8.18290.nupkg".
2016-06-01 11:33:40,910 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\plexmediaserver\plexmediaserver.nupkg"
 to "C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.nupkg".
2016-06-01 11:33:40,919 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\plexmediaserver\tools".
2016-06-01 11:33:40,926 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\plexmediaserver\tools\chocolateyInstall.ps1"
 to "C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1".
2016-06-01 11:33:42,441 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\plexmediaserver'
2016-06-01 11:33:42,456 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.0.9.8.18290.nupkg'
  with checksum 'E2D4D5CCF5D59012C8F7BCD9A5229F11'
2016-06-01 11:33:42,470 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.nupkg'
  with checksum '7F2A18191BF9AF9D211FE5EEA14001E5'
2016-06-01 11:33:42,484 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'
  with checksum '63179D8FC0446B26EBDA85009DDF131B'
2016-06-01 11:33:43,898 [INFO ] - 
plexmediaserver v0.9.1213.1464 (forced) [Approved]
2016-06-01 11:33:44,406 [DEBUG] - Setting installer args and package parameters for plexmediaserver
2016-06-01 11:33:44,416 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1':
2016-06-01 11:33:44,423 [DEBUG] - $packageName = 'Plex Media Server'
$installerType = 'exe'
$url = 'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'
$silentArgs = '/quiet /norestart'
$validExitCodes = @(0)

Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url"  -validExitCodes $validExitCodes

2016-06-01 11:33:44,457 [DEBUG] - Calling built-in PowerShell host 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\plexmediaserver\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''']
2016-06-01 11:33:44,468 [DEBUG] - Redirecting System.Management.Automation.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35, requested by ''
2016-06-01 11:33:44,476 [DEBUG] - Attempting to load assembly System.Management.Automation.resources failed:
 Could not load file or assembly 'System.Management.Automation.resources, Version=5.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2016-06-01 11:33:44,489 [DEBUG] - Attempting to load assembly System.Management.Automation.resources failed:
 Could not load file or assembly 'System.Management.Automation.resources, Version=4.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2016-06-01 11:33:44,499 [DEBUG] - Attempting to load assembly System.Management.Automation.resources failed:
 Could not load file or assembly 'System.Management.Automation.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2016-06-01 11:33:44,508 [DEBUG] - Attempting to load assembly System.Management.Automation.resources failed:
 Could not load file or assembly 'System.Management.Automation.resources, Version=1.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
2016-06-01 11:33:44,948 [DEBUG] - Host version is 5.1.14342.1000, PowerShell Version is '5.1.14342.1000' and CLR Version is '4.0.30319.42000'.
2016-06-01 11:33:45,432 [DEBUG] - Loading community extensions
2016-06-01 11:33:45,451 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'
2016-06-01 11:33:45,459 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.extensions.psm1'.
2016-06-01 11:33:45,490 [DEBUG] - Importing 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.licensed.dll'
2016-06-01 11:33:45,514 [INFO ] - Loading 'chocolatey.licensed' extension.
2016-06-01 11:33:45,537 [INFO ] - VERBOSE: Loading module from path 'C:\ProgramData\chocolatey\extensions\chocolatey\chocolatey.licensed.dll'.
2016-06-01 11:33:45,564 [INFO ] - VERBOSE: Importing cmdlet 'Get-ChocolateyWebFileCmdlet'.
2016-06-01 11:33:45,580 [INFO ] - VERBOSE: Importing cmdlet 'Get-VirusCheckValidCmdlet'.
2016-06-01 11:33:45,593 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebFileCmdlet'.
2016-06-01 11:33:45,605 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebFileNameCmdlet'.
2016-06-01 11:33:45,620 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebHeadersCmdlet'.
2016-06-01 11:33:45,635 [INFO ] - VERBOSE: Importing cmdlet 'Install-ChocolateyInstallPackageCmdlet'.
2016-06-01 11:33:45,649 [INFO ] - VERBOSE: Importing cmdlet 'Install-ChocolateyPackageCmdlet'.
2016-06-01 11:33:45,663 [INFO ] - VERBOSE: Exporting function 'Format-FileSize'.
2016-06-01 11:33:45,679 [INFO ] - VERBOSE: Exporting function 'Get-ChecksumValid'.
2016-06-01 11:33:45,695 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyUnzip'.
2016-06-01 11:33:45,713 [INFO ] - VERBOSE: Exporting function 'Get-ChocolateyWebFile'.
2016-06-01 11:33:45,726 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariable'.
2016-06-01 11:33:45,740 [INFO ] - VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.
2016-06-01 11:33:45,753 [INFO ] - VERBOSE: Exporting function 'Get-FtpFile'.
2016-06-01 11:33:45,766 [INFO ] - VERBOSE: Exporting function 'Get-ProcessorBits'.
2016-06-01 11:33:45,780 [INFO ] - VERBOSE: Exporting function 'Get-ToolsLocation'.
2016-06-01 11:33:45,794 [INFO ] - VERBOSE: Exporting function 'Get-UACEnabled'.
2016-06-01 11:33:45,807 [INFO ] - VERBOSE: Exporting function 'Get-VirusCheckValid'.
2016-06-01 11:33:45,821 [INFO ] - VERBOSE: Exporting function 'Get-WebFile'.
2016-06-01 11:33:45,834 [INFO ] - VERBOSE: Exporting function 'Get-WebFileName'.
2016-06-01 11:33:45,847 [INFO ] - VERBOSE: Exporting function 'Get-WebHeaders'.
2016-06-01 11:33:45,859 [INFO ] - VERBOSE: Exporting function 'Install-BinFile'.
2016-06-01 11:33:45,874 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.
2016-06-01 11:33:45,889 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.
2016-06-01 11:33:45,902 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.
2016-06-01 11:33:45,915 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.
2016-06-01 11:33:45,930 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.
2016-06-01 11:33:45,944 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPackage'.
2016-06-01 11:33:45,958 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPath'.
2016-06-01 11:33:45,973 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.
2016-06-01 11:33:45,989 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.
2016-06-01 11:33:46,003 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyShortcut'.
2016-06-01 11:33:46,023 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.
2016-06-01 11:33:46,049 [INFO ] - VERBOSE: Exporting function 'Install-Vsix'.
2016-06-01 11:33:46,071 [INFO ] - VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.
2016-06-01 11:33:46,097 [INFO ] - VERBOSE: Exporting function 'Set-EnvironmentVariable'.
2016-06-01 11:33:46,118 [INFO ] - VERBOSE: Exporting function 'Set-PowerShellExitCode'.
2016-06-01 11:33:46,137 [INFO ] - VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.
2016-06-01 11:33:46,155 [INFO ] - VERBOSE: Exporting function 'Test-ProcessAdminRights'.
2016-06-01 11:33:46,170 [INFO ] - VERBOSE: Exporting function 'Uninstall-BinFile'.
2016-06-01 11:33:46,190 [INFO ] - VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.
2016-06-01 11:33:46,206 [INFO ] - VERBOSE: Exporting function 'UnInstall-ChocolateyZipPackage'.
2016-06-01 11:33:46,221 [INFO ] - VERBOSE: Exporting function 'Update-SessionEnvironment'.
2016-06-01 11:33:46,238 [INFO ] - VERBOSE: Exporting function 'Write-ChocolateyFailure'.
2016-06-01 11:33:46,253 [INFO ] - VERBOSE: Exporting function 'Write-ChocolateySuccess'.
2016-06-01 11:33:46,268 [INFO ] - VERBOSE: Exporting function 'Write-FileUpdateLog'.
2016-06-01 11:33:46,285 [INFO ] - VERBOSE: Exporting cmdlet 'Get-ChocolateyWebFileCmdlet'.
2016-06-01 11:33:46,301 [INFO ] - VERBOSE: Exporting cmdlet 'Get-VirusCheckValidCmdlet'.
2016-06-01 11:33:46,320 [INFO ] - VERBOSE: Exporting cmdlet 'Get-WebFileCmdlet'.
2016-06-01 11:33:46,336 [INFO ] - VERBOSE: Exporting cmdlet 'Get-WebFileNameCmdlet'.
2016-06-01 11:33:46,351 [INFO ] - VERBOSE: Exporting cmdlet 'Get-WebHeadersCmdlet'.
2016-06-01 11:33:46,369 [INFO ] - VERBOSE: Exporting cmdlet 'Install-ChocolateyInstallPackageCmdlet'.
2016-06-01 11:33:46,388 [INFO ] - VERBOSE: Exporting cmdlet 'Install-ChocolateyPackageCmdlet'.
2016-06-01 11:33:46,403 [INFO ] - VERBOSE: Exporting alias 'Generate-BinFile'.
2016-06-01 11:33:46,418 [INFO ] - VERBOSE: Exporting alias 'Add-BinFile'.
2016-06-01 11:33:46,436 [INFO ] - VERBOSE: Exporting alias 'Remove-BinFile'.
2016-06-01 11:33:46,452 [INFO ] - VERBOSE: Exporting alias 'refreshenv'.
2016-06-01 11:33:46,469 [INFO ] - VERBOSE: Importing cmdlet 'Get-ChocolateyWebFileCmdlet'.
2016-06-01 11:33:46,485 [INFO ] - VERBOSE: Importing cmdlet 'Get-VirusCheckValidCmdlet'.
2016-06-01 11:33:46,500 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebFileCmdlet'.
2016-06-01 11:33:46,521 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebFileNameCmdlet'.
2016-06-01 11:33:46,573 [INFO ] - VERBOSE: Importing cmdlet 'Get-WebHeadersCmdlet'.
2016-06-01 11:33:46,614 [INFO ] - VERBOSE: Importing cmdlet 'Install-ChocolateyInstallPackageCmdlet'.
2016-06-01 11:33:46,632 [INFO ] - VERBOSE: Importing cmdlet 'Install-ChocolateyPackageCmdlet'.
2016-06-01 11:33:46,647 [INFO ] - VERBOSE: Importing function 'Format-FileSize'.
2016-06-01 11:33:46,662 [INFO ] - VERBOSE: Importing function 'Get-ChecksumValid'.
2016-06-01 11:33:46,678 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyUnzip'.
2016-06-01 11:33:46,694 [INFO ] - VERBOSE: Importing function 'Get-ChocolateyWebFile'.
2016-06-01 11:33:46,710 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariable'.
2016-06-01 11:33:46,734 [INFO ] - VERBOSE: Importing function 'Get-EnvironmentVariableNames'.
2016-06-01 11:33:46,748 [INFO ] - VERBOSE: Importing function 'Get-FtpFile'.
2016-06-01 11:33:46,763 [INFO ] - VERBOSE: Importing function 'Get-ProcessorBits'.
2016-06-01 11:33:46,779 [INFO ] - VERBOSE: Importing function 'Get-ToolsLocation'.
2016-06-01 11:33:46,794 [INFO ] - VERBOSE: Importing function 'Get-UACEnabled'.
2016-06-01 11:33:46,809 [INFO ] - VERBOSE: Importing function 'Get-VirusCheckValid'.
2016-06-01 11:33:46,825 [INFO ] - VERBOSE: Importing function 'Get-WebFile'.
2016-06-01 11:33:46,839 [INFO ] - VERBOSE: Importing function 'Get-WebFileName'.
2016-06-01 11:33:46,854 [INFO ] - VERBOSE: Importing function 'Get-WebHeaders'.
2016-06-01 11:33:46,871 [INFO ] - VERBOSE: Importing function 'Install-BinFile'.
2016-06-01 11:33:46,889 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyDesktopLink'.
2016-06-01 11:33:46,903 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyEnvironmentVariable'.
2016-06-01 11:33:46,918 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyExplorerMenuItem'.
2016-06-01 11:33:46,933 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyFileAssociation'.
2016-06-01 11:33:46,949 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyInstallPackage'.
2016-06-01 11:33:46,966 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPackage'.
2016-06-01 11:33:46,982 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPath'.
2016-06-01 11:33:46,996 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPinnedTaskBarItem'.
2016-06-01 11:33:47,013 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyPowershellCommand'.
2016-06-01 11:33:47,041 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyShortcut'.
2016-06-01 11:33:47,079 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyVsixPackage'.
2016-06-01 11:33:47,098 [INFO ] - VERBOSE: Importing function 'Install-ChocolateyZipPackage'.
2016-06-01 11:33:47,128 [INFO ] - VERBOSE: Importing function 'Install-Vsix'.
2016-06-01 11:33:47,149 [INFO ] - VERBOSE: Importing function 'Set-EnvironmentVariable'.
2016-06-01 11:33:47,164 [INFO ] - VERBOSE: Importing function 'Set-PowerShellExitCode'.
2016-06-01 11:33:47,181 [INFO ] - VERBOSE: Importing function 'Start-ChocolateyProcessAsAdmin'.
2016-06-01 11:33:47,197 [INFO ] - VERBOSE: Importing function 'Test-ProcessAdminRights'.
2016-06-01 11:33:47,212 [INFO ] - VERBOSE: Importing function 'Uninstall-BinFile'.
2016-06-01 11:33:47,226 [INFO ] - VERBOSE: Importing function 'Uninstall-ChocolateyPackage'.
2016-06-01 11:33:47,242 [INFO ] - VERBOSE: Importing function 'UnInstall-ChocolateyZipPackage'.
2016-06-01 11:33:47,256 [INFO ] - VERBOSE: Importing function 'Update-SessionEnvironment'.
2016-06-01 11:33:47,270 [INFO ] - VERBOSE: Importing function 'Write-ChocolateyFailure'.
2016-06-01 11:33:47,286 [INFO ] - VERBOSE: Importing function 'Write-ChocolateySuccess'.
2016-06-01 11:33:47,301 [INFO ] - VERBOSE: Importing function 'Write-FileUpdateLog'.
2016-06-01 11:33:47,317 [INFO ] - VERBOSE: Importing alias 'Add-BinFile'.
2016-06-01 11:33:47,332 [INFO ] - VERBOSE: Importing alias 'Generate-BinFile'.
2016-06-01 11:33:47,348 [INFO ] - VERBOSE: Importing alias 'refreshenv'.
2016-06-01 11:33:47,366 [INFO ] - VERBOSE: Importing alias 'Remove-BinFile'.
2016-06-01 11:33:47,442 [DEBUG] - Running 'ChocolateyScriptRunner' for plexmediaserver v0.9.1213.1464 with packageScript 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\plexmediaserver', installArguments: '', packageParameters: '',
2016-06-01 11:33:47,466 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'
2016-06-01 11:33:47,509 [DEBUG] - Running 'Install-ChocolateyPackage' for Plex Media Server with url:'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', args: '/quiet /norestart', fileType: 'exe', url64bit: '', checksum: '', checksumType: '', checksum64: '', checksumType64: '', validExitCodes: '0' 
2016-06-01 11:33:47,582 [DEBUG] - Running 'Get-ChocolateyWebFile' for Plex Media Server with url:'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', fileFullPath:'d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex Media ServerInstall.exe', url64bit:'', checksum: '', checksumType: '', checksum64: '', checksumType64: ''
2016-06-01 11:33:47,601 [DEBUG] - Running 'Get-ProcessorBits'
2016-06-01 11:33:47,624 [DEBUG] - CPU is 64 bit
2016-06-01 11:33:47,666 [DEBUG] - Running licensed 'Get-WebFileName' with url:'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', defaultName:'Plex Media ServerInstall.exe' userAgent:'chocolatey command line'
2016-06-01 11:33:47,719 [DEBUG] - Using private CDN cache instead of original url.
2016-06-01 11:33:47,737 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2016-06-01 11:33:47,936 [DEBUG] - Using response url to determine file name ('https://files.chocolatey.org/plexmediaserver/0.9.1213.1464/F1DB38744C8DA00F0E6C58594B7FE6261A579C3AFC8BA6D2734AE68772F477304DDD057EF37DC045A0E075C7A6A1FB5AA45AEB4D0610D987E4A56912813871B7/x86/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe').
2016-06-01 11:33:47,945 [DEBUG] - File name determined from url is 'Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'
2016-06-01 11:33:47,983 [DEBUG] - Running licensed 'Get-WebHeaders' with url:'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', userAgent:'chocolatey command line'
2016-06-01 11:33:48,069 [DEBUG] - Using private CDN content instead of original url.
2016-06-01 11:33:48,083 [DEBUG] - Setting the UserAgent to 'chocolatey command line'
2016-06-01 11:33:48,091 [DEBUG] - Request Headers:
2016-06-01 11:33:48,099 [DEBUG] -   Accept=*/*
2016-06-01 11:33:48,107 [DEBUG] -   User-Agent=chocolatey command line
2016-06-01 11:33:48,326 [DEBUG] - Response Headers:
2016-06-01 11:33:48,333 [DEBUG] -   Connection=keep-alive
2016-06-01 11:33:48,339 [DEBUG] -   x-amz-id-2=I+FSLep3eTKST6suC1B8xB1fzGOdM5DK+QS7hky6baDbw8OndqOLcRQVy9HSoYw3/tfbCS9JtEw=
2016-06-01 11:33:48,345 [DEBUG] -   x-amz-request-id=E52B036C2C2EA785
2016-06-01 11:33:48,351 [DEBUG] -   CF-Cache-Status=HIT
2016-06-01 11:33:48,357 [DEBUG] -   CF-RAY=2ac411c5c24b109f-ORD
2016-06-01 11:33:48,364 [DEBUG] -   Accept-Ranges=bytes
2016-06-01 11:33:48,371 [DEBUG] -   Content-Length=87205240
2016-06-01 11:33:48,377 [DEBUG] -   Cache-Control=public, max-age=14400
2016-06-01 11:33:48,383 [DEBUG] -   Content-Type=application/octet-stream
2016-06-01 11:33:48,390 [DEBUG] -   Date=Wed, 01 Jun 2016 16:33:48 GMT
2016-06-01 11:33:48,396 [DEBUG] -   Expires=Wed, 01 Jun 2016 20:33:48 GMT
2016-06-01 11:33:48,402 [DEBUG] -   ETag="7e72bbafaa993b892ccd4725dc253a98"
2016-06-01 11:33:48,408 [DEBUG] -   Last-Modified=Mon, 01 Feb 2016 16:57:24 GMT
2016-06-01 11:33:48,413 [DEBUG] -   Set-Cookie=__cfduid=dd2c550e5115ab28e383039bc5b4afaee1464798828; expires=Thu, 01-Jun-17 16:33:48 GMT; path=/; domain=.chocolatey.org; HttpOnly
2016-06-01 11:33:48,418 [DEBUG] -   Server=cloudflare-nginx
2016-06-01 11:33:48,452 [DEBUG] - Plex Media Server's requested file has already been downloaded. Using cached copy at
  'd:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'.
2016-06-01 11:33:50,570 [DEBUG] - Running licensed 'Get-VirusCheckValid' with url:'https://downloads.plex.tv/plex-media-server/0.9.12.13.1464-4ccd2ca/Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', file: 'd:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'
2016-06-01 11:33:50,735 [DEBUG] - Conducting virus check for 'Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'.
2016-06-01 11:33:55,801 [INFO ] - Virus check: 0/54 scan engines flagged this assembly. 
 Due to possible false positives we fail at 5 minimum positives.
2016-06-01 11:33:55,912 [WARN ] -  Virus scan engines indicate this file is probably safe. For details see
  https://www.virustotal.com/file/5510607d949e3341d1886df79587209d8f73b5a264225ece7d7ab89d7bfa9bc1/analysis/
2016-06-01 11:33:56,018 [DEBUG] - Checking that 'd:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe' is the size we expect it to be.
2016-06-01 11:33:56,117 [DEBUG] - Verifying package provided checksum of '' for 'd:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe'.
2016-06-01 11:33:56,222 [DEBUG] - Running 'Get-ChecksumValid' with file:'d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', checksum: '', checksumType: ''
2016-06-01 11:33:56,331 [DEBUG] - Running licensed 'Install-ChocolateyInstallPacakge' for $packageName with File:'d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', SilentArguments: '/quiet /norestart', InstallerType: 'exe', ValidExitCodes: '0', -UseOnlyPackageSilentArguments: 'False'
2016-06-01 11:33:56,467 [INFO ] - Installing Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe...
2016-06-01 11:33:56,580 [DEBUG] - Attempting to detect type for 'Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe' with db 'C:\ProgramData\chocolatey\tools\detector\db'
2016-06-01 11:33:56,681 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\7za.exe" x -aoa -o"C:\ProgramData\chocolatey\tools\detector" -y "C:\ProgramData\chocolatey\tools\detector.zip"']
2016-06-01 11:33:58,929 [DEBUG] - Command ['"C:\ProgramData\chocolatey\tools\7za.exe" x -aoa -o"C:\ProgramData\chocolatey\tools\detector" -y "C:\ProgramData\chocolatey\tools\detector.zip"'] exited with '0'
2016-06-01 11:34:00,030 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\detector\diec.exe" "d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe"']
2016-06-01 11:34:00,549 [WARN ] - 
2016-06-01 11:34:00,555 [DEBUG] - Command ['"C:\ProgramData\chocolatey\tools\detector\diec.exe" "d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe"'] exited with '0'
2016-06-01 11:34:00,750 [DEBUG] - fileTypeOutput='PE: overlay: CAB archive'
2016-06-01 11:34:00,883 [DEBUG] - Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:'d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe', statements: ' /quiet /norestart' 
2016-06-01 11:34:00,983 [DEBUG] - Elevating Permissions and running ["d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe"  /quiet /norestart]. This may take a while, depending on the statements.
2016-06-01 11:34:01,135 [DEBUG] - Setting RunAs for elevation
2016-06-01 11:34:01,839 [DEBUG] - Command ["d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe"  /quiet /norestart] exited with '1638'.
2016-06-01 11:34:01,955 [ERROR] - ERROR: Running ["d:\users\SYSTEM\AppData\Local\Temp\chocolatey\plexmediaserver\0.9.1213.1464\Plex-Media-Server-0.9.1213.1464-4ccd2ca-en-US.exe"  /quiet /norestart] was not successful. Exit code was '1638'. See log for possible error messages.
2016-06-01 11:34:01,989 [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\plexmediaserver\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters '''] exited with '1638'.
2016-06-01 11:34:01,995 [DEBUG] - Calling command ['"C:\WINDOWS\System32\shutdown.exe" /a']
2016-06-01 11:34:02,043 [DEBUG] - Command ['"C:\WINDOWS\System32\shutdown.exe" /a'] exited with '1116'
2016-06-01 11:34:02,453 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\plexmediaserver'
2016-06-01 11:34:02,460 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\.chocolateyPending'
  with checksum 'AB741E0EB5AFDB5DFCA9A4DD98DDBF3A'
2016-06-01 11:34:02,466 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.0.9.8.18290.nupkg'
  with checksum 'E2D4D5CCF5D59012C8F7BCD9A5229F11'
2016-06-01 11:34:02,473 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.nupkg'
  with checksum '19E7FB2C6252D8C2F927A80EADDBE919'
2016-06-01 11:34:02,480 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\plexmediaserver.nuspec'
  with checksum '177EBA7610B39936EDBE06C475503BAC'
2016-06-01 11:34:02,486 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'
  with checksum '973D195AABA44C359792C3FA967FAB6A'
2016-06-01 11:34:02,509 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\plexmediaserver.0.9.1213.1464\.files.update".
2016-06-01 11:34:02,515 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\plexmediaserver.0.9.1213.1464\.sxs".
2016-06-01 11:34:02,521 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\plexmediaserver.0.9.1213.1464\.pin".
2016-06-01 11:34:02,535 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\plexmediaserver".
2016-06-01 11:34:02,545 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2016-06-01 11:34:02,551 [ERROR] - The upgrade of plexmediaserver was NOT successful.
2016-06-01 11:34:02,575 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'.
 See log for details.
2016-06-01 11:34:02,601 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\plexmediaserver'
 to 'C:\ProgramData\chocolatey\lib-bad\plexmediaserver'
2016-06-01 11:34:04,617 [DEBUG] - Attempting rollback
2016-06-01 11:34:04,624 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib-bkp\plexmediaserver'
 to 'C:\ProgramData\chocolatey\lib\plexmediaserver'
2016-06-01 11:34:06,633 [DEBUG] - Attempting to delete file "C:\Users\Brandon\AppData\Local\NuGet\Cache\plexmediaserver.0.9.1213.1464.nupkg".
2016-06-01 11:34:06,646 [WARN ] - 
Chocolatey upgraded 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2016-06-01 11:34:08,339 [ERROR] - Failures:
2016-06-01 11:34:08,362 [ERROR] -  - plexmediaserver (exited 1638) - Error while running 'C:\ProgramData\chocolatey\lib\plexmediaserver\tools\chocolateyInstall.ps1'.
 See log for details.
2016-06-01 11:34:08,384 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2016-06-01 11:34:08,402 [DEBUG] - Exiting with 1638
@ferventcoder
Copy link
Member

So with 0.9.10, we've added the beforeModify script to allow packages to do things like uninstall an older version prior to install. I think there may be something additional that needs to occur here as well. Would you agree with that?

@ferventcoder
Copy link
Member

We have plans to take the exit codes and interpret them better.

@patnolan
Copy link

Hi is there any ETA for this enhancement as it's a real problem for alot of people?

@ferventcoder
Copy link
Member

@patnolan Did not realize this was a real problem for folks, as it seems slightly installer (and by extension package) dependent when this would occur.

I believe I was mentioning the enhancement here would be for Chocolatey to automatically better handle 1638 issues. There is nothing keeping the package(s) in question from being fixed to deal with this issue.

@ferventcoder
Copy link
Member

And it was still under triage, waiting for @bc3tech or anyone else to get back on this issue with more details. I imagine he is likely quite busy and this fell off of his radar.

@bc3tech
Copy link
Contributor Author

bc3tech commented Nov 29, 2017

i've not seen too many pkg authors use the beforemodify, but at first glance it seems that this should indeed do the trick. apologies for the delay in responding.

@bc3tech bc3tech closed this as completed Nov 29, 2017
@ferventcoder
Copy link
Member

I do think we should repurpose this ticket or maybe call it a duplicate of #484 ?

@ferventcoder
Copy link
Member

Actually, Let's just say they are related. 1638, 1618, and generally better handling of MSIs.

@ferventcoder ferventcoder reopened this Nov 29, 2017
@ferventcoder ferventcoder changed the title Error 1638 while trying to update pkg Handle MSI Error 1638 on upgrade of packages Nov 29, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.x, 0.10.10 Nov 29, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.10, 0.10.12 Mar 27, 2018
@ferventcoder ferventcoder modified the milestones: 0.10.12, 0.10.13 May 3, 2018
@ferventcoder ferventcoder modified the milestones: 0.10.13, 0.10.14, 0.10.15 Mar 9, 2019
@ferventcoder ferventcoder modified the milestones: 0.10.15, 0.10.16 Apr 1, 2019
@gep13 gep13 modified the milestones: 0.10.16, 0.10.17 May 31, 2019
@martin9700
Copy link

I am specifically encountering this error and wondering if there is any progress on this or perhaps a better work around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants