Closed dhjensen closed 4 years ago
I also found this file to be "corrupted" C:\ProgramData\chocolatey\lib\chocolatey\chocolatey.nuspec Attached as .ZIP to bypas github file filter. chocolatey.ZIP
Deleting that file solved my last "problems" and I could perform choco upgrade again
What version of choco did you upgrade from when you upgraded to 0.10.15?
Thx for responding I don't remember anymore... :)
@ferventcoder Feel free to close this issue as I don't have any more to contribute and I haven't seen similar issues since.
Thanks for reminding me to get this closed off and labeled properly.
No repro is what I meant to go with there.
What You Are Seeing?
I am aware that I can delete these bad XML files but I just wanted to add this issue to make you aware it happened
PS C:\WINDOWS\system32> choco upgrade all -y Chocolatey v0.10.15 Upgrading the following packages: all By upgrading you accept licenses for the packages. Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. This is try 1/3. Retrying after 400 milliseconds. Error converted to warning: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. This is try 2/3. Retrying after 600 milliseconds. Error converted to warning: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. Maximum tries of 3 reached. Throwing error.
Chocolatey upgraded 0/0 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
What is Expected?
I expected choco to be able to upgrade the packages
How Did You Get This To Happen? (Steps to Reproduce)
I recently upgraded to choco 0.10.15 I can see that the .files have null values than valid XML
Output Log
First time it happens in the log:
https://gist.github.com/dhjensen/73bb113d67d1c41c624b39a5ed850feb#file-problem-null-txt-L4506
Full Log Output
~~~sh PS C:\WINDOWS\system32> choco upgrade all -y --debug --verbose Chocolatey v0.10.15 Chocolatey is running on Windows v 10.0.17134.0 Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". Command line: "C:\ProgramData\chocolatey\choco.exe" upgrade all -y --debug --verbose Received arguments: upgrade all -y --debug --verbose RemovePendingPackagesTask is now ready and waiting for PreRunMessage. Sending message 'PreRunMessage' out if there are subscribers... [Pending] Removing all pending packages that should not be considered installed... Performing validation checks. Global Configuration Validation Checks: - Package Exit Code / Exit On Reboot = Checked System State Validation Checks: Reboot Requirement Checks: - Pending Computer Rename = Checked - Pending Component Based Servicing = Checked - Pending Windows Auto Update = Checked - Pending File Rename Operations = Checked - Pending Windows Package Installer = Checked - Pending Windows Package Installer SysWow64 = Checked The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type 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. Configuration: CommandName='upgrade'| CacheLocation='C:\Users\dhjensen\AppData\Local\Temp\chocolatey'| ContainsLegacyPackageInstalls='True'| CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| Sources='https://chocolatey.org/api/v2/'|SourceType='normal'| Debug='True'|Verbose='True'|Trace='False'|Force='False'|Noop='False'| HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'| QuietOutput='False'|PromptForConfirmation='False'|AcceptLicense='True'| AllowUnofficialBuild='False'|Input='all'|AllVersions='False'| SkipPackageInstallProvider='False'|PackageNames='all'| Prerelease='False'|ForceX86='False'|OverrideArguments='False'| NotSilent='False'|ApplyPackageParametersToDependencies='False'| ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'| AllowMultipleVersions='False'|AllowDowngrade='False'| ForceDependencies='False'|Information.PlatformType='Windows'| Information.PlatformVersion='10.0.17134.0'| Information.PlatformName='Windows 10'| Information.ChocolateyVersion='0.10.15.0'| Information.ChocolateyProductVersion='0.10.15'| Information.FullName='choco, Version=0.10.15.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'| Information.Is64BitOperatingSystem='True'| Information.Is64BitProcess='True'|Information.IsInteractive='True'| Information.UserName='dhjensen'| Information.UserDomainName='DHJENSEN-PC'| Information.IsUserAdministrator='True'| Information.IsUserSystemAccount='False'| Information.IsUserRemoteDesktop='False'| Information.IsUserRemote='True'| Information.IsProcessElevated='True'| Information.IsLicensedVersion='False'|Information.LicenseType='Foss'| Information.CurrentDirectory='C:\WINDOWS\system32'| Features.AutoUninstaller='True'|Features.ChecksumFiles='True'| Features.AllowEmptyChecksums='False'| Features.AllowEmptyChecksumsSecure='True'| Features.FailOnAutoUninstaller='False'| Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'| Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'| Features.VirusCheck='False'| Features.FailOnInvalidOrMissingLicense='False'| Features.IgnoreInvalidOptionsSwitches='True'| Features.UsePackageExitCodes='True'| Features.UseEnhancedExitCodes='False'| Features.UseFipsCompliantChecksums='False'| Features.ShowNonElevatedWarnings='True'| Features.ShowDownloadProgress='True'| Features.StopOnFirstPackageFailure='False'| Features.UseRememberedArgumentsForUpgrades='False'| Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'| Features.SkipPackageUpgradesWhenNotInstalled='False'| Features.RemovePackageInformationOnUninstall='False'| Features.ExitOnRebootDetected='False'| Features.LogValidationResultsOnWarnings='True'| Features.UsePackageRepositoryOptimizations='True'| Features.ScriptsCheckLastExitCode='False'| ListCommand.LocalOnly='False'| ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'| ListCommand.PageSize='25'|ListCommand.Exact='False'| ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'| ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'| ListCommand.ApprovedOnly='False'| ListCommand.DownloadCacheAvailable='False'| ListCommand.NotBroken='False'| ListCommand.IncludeVersionOverrides='False'| UpgradeCommand.FailOnUnfound='False'| UpgradeCommand.FailOnNotInstalled='False'| UpgradeCommand.NotifyOnlyAvailableUpgrades='False'| UpgradeCommand.ExcludePrerelease='False'| NewCommand.AutomaticPackage='False'| NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'| SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'| SourceCommand.AllowSelfService='False'| SourceCommand.VisibleToAdminsOnly='False'| FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'| ApiKeyCommand.Remove='False'|PinCommand.Command='unknown'| OutdatedCommand.IgnorePinned='False'|Proxy.BypassOnLocal='True'| _ Chocolatey:ChocolateyUpgradeCommand - Normal Run Mode _ Upgrading the following packages: all By upgrading you accept licenses for the packages. Running list with the following filter = '' --- Start of List --- Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlReader.MoveToContent() at System.Xml.XmlReader.IsStartElement(String localname, String ns) at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.try_catch_with_logging_exception[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
This is try 1/3. Retrying after 400 milliseconds.
Error converted to warning:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement(String localname, String ns)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.try_catch_with_logging_exception[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__1()
at chocolatey.infrastructure.synchronization.GlobalMutex.enter[T](Func`1 func, Int32 timeout)
at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement(String localname, String ns)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.try_catch_with_logging_exception[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
This is try 2/3. Retrying after 600 milliseconds.
Error converted to warning:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement(String localname, String ns)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.try_catch_with_logging_exception[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__1()
at chocolatey.infrastructure.synchronization.GlobalMutex.enter[T](Func`1 func, Int32 timeout)
at chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
Error deserializing response of type chocolatey.infrastructure.app.domain.PackageFiles:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement(String localname, String ns)
at chocolatey.infrastructure.services.XmlService.<>c__DisplayClass4`1.b__2()
at chocolatey.infrastructure.tolerance.FaultTolerance.try_catch_with_logging_exception[T](Func`1 function, String errorMessage, Boolean throwError, Boolean logWarningInsteadOfError, Boolean logDebugInsteadOfError, Boolean isSilent)
Maximum tries of 3 reached. Throwing error.
chocolatey 0.10.15
chocolatey-core.extension 1.3.3
chocolatey-misc-helpers.extension 0.0.3.1
DotNet4.5.2 4.5.2.20140902
ext2fsd 0.69.0.20171118
garmin-express 6.14.1
geforce-game-ready-driver 430.86
git.install 2.21.0
gitkraken 5.0.4
Hardwipe 5.1.3
jre8 8.0.211
logitechgaming 9.02.65
OneDrive 17.3.6798.0207
putty 0.71
putty.portable 0.71
qbittorrent 4.1.6
resilio-sync-home 2.6.3.1340
sysinternals 2019.6.5
treesizefree 4.3.1.2
vcredist2010 10.0.40219.2
vlc 3.0.6
vscode 1.34.0
youtube-dl 2019.05.20
--- End of List ---
Chocolatey upgraded 0/0 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Sending message 'PostRunMessage' out if there are subscribers...
Chocolatey had an error occur:
System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at NuGet.XmlUtility.LoadSafe(Stream input, Boolean ignoreWhiteSpace)
at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema)
at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
at NuGet.UnzippedPackage.EnsureManifest(String manifestFilePath)
at NuGet.LocalPackageRepository.OpenPackage(String path)
at NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path)
at NuGet.LocalPackageRepository.d__28.MoveNext()
at NuGet.CollectionExtensions.AddRange[T](ICollection`1 collection, IEnumerable`1 items)
at NuGet.LocalPackageRepository.FindPackagesById(Func`2 openPackage, String packageId)
at NuGet.PackageRepositoryExtensions.FindPackagesById(IPackageRepository repository, String packageId)
at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, SemanticVersion version, IPackageConstraintProvider constraintProvider, Boolean allowPrereleaseVersions, Boolean allowUnlisted)
at chocolatey.infrastructure.app.services.NugetService.upgrade_run(ChocolateyConfiguration config, Action`1 continueAction, Boolean performAction, Action`1 beforeUpgradeAction)
at chocolatey.infrastructure.app.services.NugetService.upgrade_run(ChocolateyConfiguration config, Action`1 continueAction, Action`1 beforeUpgradeAction)
at chocolatey.infrastructure.app.services.ChocolateyPackageService.perform_source_runner_function[T](ChocolateyConfiguration config, Func`2 function)
at chocolatey.infrastructure.app.services.ChocolateyPackageService.upgrade_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Container container)
at chocolatey.console.Program.Main(String[] args)
Exiting with 1
PS C:\WINDOWS\system32>
~~~