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

choco always fails with "Root element is missing" when executing "upgrade" or "uninstall" #918

Closed
boskowski opened this issue Aug 19, 2016 · 3 comments

Comments

@boskowski
Copy link

Each time I issue a "choco uninstall" for any installed package or a "choco upgrade" for any updatable package, the command fails with a laconic "Root element is missing".

choco uninstall log
choco upgrade log also containing this stacktrace:

System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   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.<GetPackages>d__15.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 NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId)
   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)

I don't know if there's a connection, but the problem started appearing after I interrupted with Ctrl-C an inadvertently issued "choco update jre8". Deleting C:\ProgramData\chocolatey\config\chocolatey.config doesn't help.

@jberezanski
Copy link

I expect one (or more) of the .nupkg files under C:\ProgramData\chocolatey\lib is corrupted. You could verify this by moving package directories out of lib one by one (starting with jre8) and checking if the issue persists.

@boskowski
Copy link
Author

Thank you very much, removing jre8 from lib solved the issue.

@ferventcoder
Copy link
Member

#717 is where we will handle this.

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

3 participants