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

Unable to read registry snapshot file #487

Closed
HyP3r- opened this issue Nov 20, 2015 · 6 comments
Closed

Unable to read registry snapshot file #487

HyP3r- opened this issue Nov 20, 2015 · 6 comments

Comments

@HyP3r-
Copy link

HyP3r- commented Nov 20, 2015

If I run this command: choco upgrade -y all, I get this errors: Unable to read registry snapshot file.

Here the full Log:

2015-11-20 15:31:09,524 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.9.9.8, Culture=neutral, PublicKeyToken=79d02ea9cad655eb
2015-11-20 15:31:09,524 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.9.9.8, Culture=neutral, PublicKeyToken=79d02ea9cad655eb
2015-11-20 15:31:09,561 [DEBUG] - XmlConfiguration is now operational
2015-11-20 15:31:09,923 [INFO ] - ============================================================
2015-11-20 15:31:09,926 [INFO ] - Chocolatey v0.9.9.8
2015-11-20 15:31:09,935 [DEBUG] - Chocolatey is running on Windows v 6.1.7601.65536
2015-11-20 15:31:09,938 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2015-11-20 15:31:09,938 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2015-11-20 15:31:09,953 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" upgrade -y all
2015-11-20 15:31:09,954 [DEBUG] - Received arguments: upgrade -y all
2015-11-20 15:31:10,012 [DEBUG] - 
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.
2015-11-20 15:31:10,024 [DEBUG] - Configuration: CommandName='upgrade'|
CacheLocation='C:\Users\FendtO\AppData\Local\Temp'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|
Sources='https://chocolatey.org/api/v2/'|Debug='False'|Verbose='False'|
Force='False'|Noop='False'|HelpRequested='False'|RegularOutput='True'|
PromptForConfirmation='False'|AcceptLicense='True'|
AllowUnofficialBuild='False'|Input='all'|AllVersions='False'|
SkipPackageInstallProvider='False'|PackageNames='all'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|ForceDependencies='False'|
Information.PlatformType='Windows'|
Information.PlatformVersion='6.1.7601.65536'|
Information.PlatformName='Windows 7'|
Information.ChocolateyVersion='0.9.9.8'|
Information.ChocolateyProductVersion='0.9.9.8'|
Information.FullName='choco, Version=0.9.9.8, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|

Information.Is64Bit='True'|Information.IsInteractive='True'|
Information.IsUserAdministrator='True'|
Information.IsProcessElevated='True'|Features.AutoUninstaller='False'|
Features.CheckSumFiles='True'|Features.FailOnAutoUninstaller='False'|
ListCommand.LocalOnly='False'|
ListCommand.IncludeRegistryPrograms='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
NewCommand.AutomaticPackage='False'|SourceCommand.Command='unknown'|
FeatureCommand.Command='unknown'|PushCommand.TimeoutInSeconds='0'|
PinCommand.Command='unknown'|
2015-11-20 15:31:10,032 [DEBUG] - _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _
2015-11-20 15:31:10,038 [INFO ] - Upgrading the following packages:
2015-11-20 15:31:10,040 [INFO ] - all
2015-11-20 15:31:10,040 [INFO ] - By upgrading you accept licenses for the packages.
2015-11-20 15:31:10,126 [DEBUG] - Running list with the following filter = ''
2015-11-20 15:31:10,385 [DEBUG] - --- Start of List ---
2015-11-20 15:31:10,386 [DEBUG] - 7zip 9.38
2015-11-20 15:31:10,387 [DEBUG] - 7zip.install 9.38
2015-11-20 15:31:10,387 [DEBUG] - autohotkey 1.1.22.09
2015-11-20 15:31:10,387 [DEBUG] - autohotkey.install 1.1.22.09
2015-11-20 15:31:10,387 [DEBUG] - autohotkey.portable 1.1.22.09
2015-11-20 15:31:10,387 [DEBUG] - cdburnerxp 4.5.6.5931
2015-11-20 15:31:10,387 [DEBUG] - filezilla 3.14.1
2015-11-20 15:31:10,388 [DEBUG] - flashplayeractivex 19.0.0.226
2015-11-20 15:31:10,388 [DEBUG] - flashplayerplugin 19.0.0.245
2015-11-20 15:31:10,388 [DEBUG] - foxitreader 7.1.3.0320
2015-11-20 15:31:10,388 [DEBUG] - git 2.6.3
2015-11-20 15:31:10,388 [DEBUG] - git.install 2.6.3
2015-11-20 15:31:10,388 [DEBUG] - jre8 8.0.66
2015-11-20 15:31:10,388 [DEBUG] - keepass-classic 1.29
2015-11-20 15:31:10,388 [DEBUG] - notepadplusplus 6.8.6
2015-11-20 15:31:10,389 [DEBUG] - notepadplusplus.install 6.8.6
2015-11-20 15:31:10,389 [DEBUG] - openvpn 2.3.6
2015-11-20 15:31:10,389 [DEBUG] - paint.net 4.0.5
2015-11-20 15:31:10,389 [DEBUG] - PDFCreator 2.1.2
2015-11-20 15:31:10,389 [DEBUG] - WinPcap 4.1.3.20141005
2015-11-20 15:31:10,389 [DEBUG] - wireshark 1.12.8
2015-11-20 15:31:10,389 [DEBUG] - --- End of List ---
2015-11-20 15:31:15,507 [INFO ] - 7zip v9.38 is the latest version available based on your source(s).
2015-11-20 15:31:16,057 [INFO ] - wireshark v1.12.8 is the latest version available based on your source(s).
2015-11-20 15:31:16,060 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bkp\jre8".
2015-11-20 15:31:16,098 [ERROR] - Error deserializing response of type chocolatey.infrastructure.app.domain.Registry:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:31:16,116 [WARN ] - Unable to read registry snapshot file:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:31:16,387 [INFO ] - jre8 v8.0.66 is the latest version available based on your source(s).
2015-11-20 15:31:16,737 [INFO ] - git v2.6.3 is the latest version available based on your source(s).
2015-11-20 15:31:18,867 [WARN ] - You have flashplayeractivex v19.0.0.226 installed. Version 19.0.0.245 is available based on your source(s).
2015-11-20 15:31:18,875 [DEBUG] - Backing up existing flashplayeractivex prior to upgrade.
2015-11-20 15:31:18,879 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\flashplayeractivex'
 to 'C:\ProgramData\chocolatey\lib-bkp\flashplayeractivex'
2015-11-20 15:31:20,900 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\flashplayeractivex".
2015-11-20 15:31:20,907 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\flashplayeractivex\flashplayeractivex.nupkg"
 to "C:\ProgramData\chocolatey\lib\flashplayeractivex\flashplayeractivex.nupkg".
2015-11-20 15:31:20,912 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\flashplayeractivex\tools".
2015-11-20 15:31:20,913 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\flashplayeractivex\tools\chocolateyInstall.ps1"
 to "C:\ProgramData\chocolatey\lib\flashplayeractivex\tools\chocolateyInstall.ps1".
2015-11-20 15:31:22,440 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\flashplayeractivex'
2015-11-20 15:31:22,451 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\flashplayeractivex\flashplayeractivex.nupkg'
  with checksum '4021F1BCCE7323454FE5ACFD75F50D45'
2015-11-20 15:31:22,453 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\flashplayeractivex\tools\chocolateyInstall.ps1'
  with checksum 'F67A6E8BB499F2AA9122567956DA6F2B'
2015-11-20 15:31:22,702 [INFO ] - 
flashplayeractivex v19.0.0.245
2015-11-20 15:31:22,712 [ERROR] - Error deserializing response of type chocolatey.infrastructure.app.domain.Registry:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:31:22,712 [WARN ] - Unable to read registry snapshot file:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:31:22,766 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\flashplayeractivex\tools\chocolateyInstall.ps1':
2015-11-20 15:31:22,776 [DEBUG] - $packageName = 'flashplayeractivex'
$version = '19.0.0.245'
$installArgs = '/quiet /norestart REMOVE_PREVIOUS=YES'
$url = 'http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_19_active_x.msi'

$majorVersion = ([version] $version).Major

$alreadyInstalled = Get-WmiObject -Class Win32_Product | Where-Object {
  $_.Name -eq "Adobe Flash Player $majorVersion ActiveX" -and
  $_.Version -eq $version
}

try {

  $allRight = $true


  if ([System.Environment]::OSVersion.Version -ge '6.2') {
    $allRight = $false
    Write-ChocolateyFailure $packageName $('Your Windows version is not ' +
      'suitable for this package. This package is only for Windows XP to Windows 7')
  }

  if (Get-Process iexplore -ErrorAction SilentlyContinue) {
    $allRight = $false
    Write-ChocolateyFailure $packageName 'Internet Explorer is running. ' +
      'The installation will fail an 1603 error. ' +
      'Close Internet Explorer and reinstall this package.'
  }

  if ($alreadyInstalled) {
    $allRight = $false
    Write-Output "Adobe Flash Player ActiveX for IE $version is already installed."
  }

  if ($allRight) {
    Install-ChocolateyPackage $packageName 'msi' $installArgs $url
  }

} catch {
  Write-ChocolateyFailure $packageName $($_.Exception.Message)
  throw
}

2015-11-20 15:31:22,813 [DEBUG] - Calling command ['"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[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\flashplayeractivex\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"']
2015-11-20 15:32:00,580 [INFO ] -  Installing flashplayeractivex...
2015-11-20 15:32:07,344 [INFO ] -  flashplayeractivex has been installed.
2015-11-20 15:32:07,361 [DEBUG] - Command ['"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[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\flashplayeractivex\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"'] exited with '0'
2015-11-20 15:32:07,361 [DEBUG] - Calling command ['"shutdown" /a']
2015-11-20 15:32:07,375 [DEBUG] - Command ['"shutdown" /a'] exited with '1116'
2015-11-20 15:32:07,418 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\flashplayeractivex'
2015-11-20 15:32:07,419 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\flashplayeractivex\flashplayeractivex.nupkg'
  with checksum '0D9FF05D18DB0CFC3FB8ADE34807295D'
2015-11-20 15:32:07,419 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\flashplayeractivex\tools\chocolateyInstall.ps1'
  with checksum 'CBE6E2F1AFC6BA9FFC9405BE94456280'
2015-11-20 15:32:07,444 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\flashplayeractivex.19.0.0.245\.sxs".
2015-11-20 15:32:07,444 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\flashplayeractivex.19.0.0.245\.pin".
2015-11-20 15:32:07,446 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\flashplayeractivex".
2015-11-20 15:32:07,447 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bkp\flashplayeractivex".
2015-11-20 15:32:07,448 [INFO ] -  The upgrade of flashplayeractivex was successful.
2015-11-20 15:32:07,998 [INFO ] - filezilla v3.14.1 is the latest version available based on your source(s).
2015-11-20 15:32:08,325 [INFO ] - paint.net v4.0.5 is the latest version available based on your source(s).
2015-11-20 15:32:09,700 [INFO ] - foxitreader v7.1.3.0320 is the latest version available based on your source(s).
2015-11-20 15:32:17,118 [INFO ] - notepadplusplus v6.8.6 is the latest version available based on your source(s).
2015-11-20 15:32:17,705 [INFO ] - WinPcap v4.1.3.20141005 is the latest version available based on your source(s).
2015-11-20 15:32:18,051 [INFO ] - PDFCreator v2.1.2 is the latest version available based on your source(s).
2015-11-20 15:32:18,269 [INFO ] - keepass-classic v1.29 is the latest version available based on your source(s).
2015-11-20 15:32:18,482 [INFO ] - openvpn v2.3.6 is the latest version available based on your source(s).
2015-11-20 15:32:22,696 [INFO ] - autohotkey v1.1.22.09 is the latest version available based on your source(s).
2015-11-20 15:32:24,147 [INFO ] - notepadplusplus.install v6.8.6 is the latest version available based on your source(s).
2015-11-20 15:32:24,687 [INFO ] - autohotkey.install v1.1.22.09 is the latest version available based on your source(s).
2015-11-20 15:32:24,866 [INFO ] - 7zip.install v9.38 is the latest version available based on your source(s).
2015-11-20 15:32:24,878 [ERROR] - Error deserializing response of type chocolatey.infrastructure.app.domain.Registry:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:32:24,879 [WARN ] - Unable to read registry snapshot file:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:32:25,463 [INFO ] - autohotkey.portable v1.1.22.09 is the latest version available based on your source(s).
2015-11-20 15:32:25,474 [ERROR] - Error deserializing response of type chocolatey.infrastructure.app.domain.Registry:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:32:25,475 [WARN ] - Unable to read registry snapshot file:
 Fehler im XML-Dokument (12,30).
2015-11-20 15:32:26,205 [INFO ] - flashplayerplugin v19.0.0.245 is the latest version available based on your source(s).
2015-11-20 15:32:26,749 [INFO ] - cdburnerxp v4.5.6.5931 is the latest version available based on your source(s).
2015-11-20 15:32:26,764 [ERROR] - Error deserializing response of type chocolatey.infrastructure.app.domain.Registry:
 Fehler im XML-Dokument (34,30).
2015-11-20 15:32:26,765 [WARN ] - Unable to read registry snapshot file:
 Fehler im XML-Dokument (34,30).
2015-11-20 15:32:27,521 [INFO ] - git.install v2.6.3 is the latest version available based on your source(s).
2015-11-20 15:32:27,526 [WARN ] - 
Chocolatey upgraded 1/21 package(s). 0 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2015-11-20 15:32:27,527 [DEBUG] - Exiting with 0

How can I solve that?

@ferventcoder
Copy link
Member

Delete the registry snapshot file. Look in c:\ProgramData\chocolatey\.chocolatey - one of the .registry files in there is corrupt. If you can, I'd like to know the contents of it (minus sensitive data if there is any) so we can see if it is something with the data itself or just a corrupted file.

@ferventcoder
Copy link
Member

Duplicate of #257

@ferventcoder
Copy link
Member

We also added #337 - but that's likely why choco is still running.

@HyP3r-
Copy link
Author

HyP3r- commented Nov 27, 2015

Removing those files solved my problem thanks. But unfortunately none of these Files seems to be invalid. I've renamed all .registry files and uploaded it all, if you want to do some diagnostic:
7zip.install.9.38_registry.txt
autohotkey.install.1.1.22.04_registry.txt
autohotkey.install.1.1.22.06_registry.txt
autohotkey.install.1.1.22.07_registry.txt
autohotkey.install.1.1.22.09_registry.txt
autohotkey.portable.1.1.22.09_registry.txt
cdburnerxp.4.5.6.5844_registry.txt
cdburnerxp.4.5.6.5931_registry.txt
filezilla.3.13.1_registry.txt
filezilla.3.14.0_registry.txt
filezilla.3.14.1_registry.txt
flashplayeractivex.18.0.0.232_registry.txt
flashplayeractivex.19.0.0.185_registry.txt
flashplayeractivex.19.0.0.207_registry.txt
flashplayeractivex.19.0.0.226_registry.txt
flashplayeractivex.19.0.0.245_registry.txt
flashplayerplugin.18.0.0.232_registry.txt
flashplayerplugin.19.0.0.185_registry.txt
flashplayerplugin.19.0.0.207_registry.txt
flashplayerplugin.19.0.0.245_registry.txt
FoxitReader.7.1.3.0320_registry.txt
git.install.2.5.1_registry.txt
git.install.2.5.2_registry.txt
git.install.2.5.3_registry.txt
git.install.2.6.0_registry.txt
git.install.2.6.1_registry.txt
git.install.2.6.2_registry.txt
git.install.2.6.3_registry.txt
jre8.8.0.51_registry.txt
jre8.8.0.60.20150902_registry.txt
jre8.8.0.65_registry.txt
jre8.8.0.66_registry.txt
keepass-classic.1.29_registry.txt
notepadplusplus.install.6.8.3_registry.txt
notepadplusplus.install.6.8.5_registry.txt
notepadplusplus.install.6.8.6_registry.txt
openvpn.2.3.6_registry.txt
paint.net.4.0.5_registry.txt
PDFCreator.2.1.2_registry.txt
wireshark.1.12.7_registry.txt
wireshark.1.12.8_registry.txt

@molehillrocker
Copy link

I got this error too and found out that it originates from the following lines in one of my .registry files: <Publisher>Microsoft&#x0;P</Publisher>. IIRC &#x0; represents the NUL character, which is not allowed in XML.
After replacing <Publisher>Microsoft&#x0;P</Publisher> by <Publisher>Microsoft</Publisher>, everything works fine.

@ferventcoder
Copy link
Member

ferventcoder commented Jun 12, 2016

In 0.9.10, this will be handled to avoid these issues, but when a key has issues, it will tell you which key has the issue.

ferventcoder added a commit that referenced this issue Jun 12, 2016
- Same some values coming from the registry as CData, in case they have
   values that are not legal in XML when serialized.
- Remove the null terminator in bad registry keys, if found.
- Report where failing key is located, when unable to read a snapshot
   file.
ferventcoder added a commit that referenced this issue Jun 12, 2016
* stable:
  (doc) update CHANGELOG/nuspec
  (GH-487) Registry Snapshot Enhancements / Fixes
  (GH-358) Capture Arguments During Install/Upgrade
  (maint) remove spaces
  (maint) Format-FileSize silent
  (maint) update shims
  (GH-789) Use PowerShell commenting, not C#
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

4 participants