-
Notifications
You must be signed in to change notification settings - Fork 905
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
If a nupkg/nuspec is corrupt, do not fail trying to read it #717
Comments
@DarwinJS can you get me details on this one again? I just attempted to recreate this and was unable to. |
If I remember correctly the file was truncated and the install failed. D.
|
Hit by the same issue - out of space on one of dev servers, downloaded nupkg/nuspec files were broken (0 in lenght). |
I suggest starting with a more useful error message. "Root element is missing" is not very helpful. Maybe make it something like: "Root element is missing. Probably the nupkg file is broken. You can try to delete it by (add some command to chocolatey which just deletes everything) and start over." This would solve the issues for many users. Later™, you could do a more sophisticaed/automated solution. |
@masgo I completely agree with better/more actionable errors - it's a constant struggle when you use libraries that don't share this same idea. |
Note for the implementer - take a look at #1829 as well. |
To make it easier to discover, I documented the issue and workaround on superuser.com. |
Thanks for doing that @jawn! |
For those who also encounter this zero size file bug, you can remove them using this PowerShell command.
|
Ran into this again today when trying to upgrade the mediainfo package, kept getting
Then when I removed the imagemagick.app folder from lib I started getting "root element is missing" until I ran @scls19fr's cleanup script. +1 to this being handled more gracefully |
There may have been a network issue. Related to #198.
Zero byte nupkgs or nuspec files will give an issue like "Root element is missing".
Workaround
Find and remove the zero byte file and that should fix the issue. This is a manual workaround until Chocolatey can handle this.
The text was updated successfully, but these errors were encountered: