Intermittent Workload CLI errors: 'Number of entries expected in End of Central Directory...'
See original GitHub issueWe are seeing increasing reports of this particular error when running dotnet workload *
commands from the CLI:
Workload installation failed: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.
I’ve observed this using the NuGet Client API libraries myself with the CopyNupkgFileToAsync(..)
method: https://github.com/Redth/dotnet-maui-check/blob/main/MauiCheck/AcquirePackagesCommand.cs#L196
It seems to be what’s happening is at some point the NuGet client is downloading to the cache and storing a corrupt .nupkg (zip) file. The problem is, once this is in the cache, it will not try and correct it by downloading it again.
This is really more of a NuGet client issue (I’ll file an issue there and link back here) but it does ultimately affect workload commands. Perhaps there could be something done to add retry logic or wipe the failed cache item when this is encountered to improve success?
Issue Analytics
- State:
- Created 2 years ago
- Comments:29 (27 by maintainers)
Top GitHub Comments
NuGet has a code fix for this. Our next insertion into the .NET SDK (next week) will add it into .NET 7 and .NET 6.0.3xx daily builds.
@zivkan I agree, this is a tricky problem to investigate, especially if telemetry is missing.
Unfortunately I don’t know of a way to simulate a connection problem like mine. And I don’t understand fully why my network is behaving the way it is either. I got a strong wireless connection to the cell tower 🤷♂️
But I can offer to try out your solution when it becomes available.
Thank you for your effort!