Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
End of Central Directory record could not be found.
-
Hello,
I try to push a Nuget via the command given in ProGet.
But after 3 tentive the powershell command ends with an Internal Server Error 500.
In the ProGet error message I have the following message:An error occurred processing a PUT request to http://URL_My_Feed: End of Central Directory record could not be found.
And the Details:
System.IO.InvalidDataException: End of Central Directory record could not be found.
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
at Inedo.ProGet.Feeds.NuGet.ParsedNuGetPackage.Read(Stream stream)
at Inedo.ProGet.Feeds.NuGet.NuGetFeed.InstallOrUpdatePackageAsync(Stream stream, Boolean calculateHash, Boolean cached, Boolean install, Boolean overwrite, Nullable1 publishDate, Nullable
1 listed, Nullable`1 downloadCount, Boolean promoted)
at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.PutHandler.ProcessPutRequestAsync(HttpContext context, WebApiContext apiContext, RequestData urlData, NuGetFeed feed)
at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.ProcessRequestAsync(HttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetFeedHandler.ProcessRequestAsync(HttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
at Inedo.ProGet.WebApplication.FeedEndpoints.FeedEndpointHandler.FeedRequestHandler.ProcessRequestAsync(HttpContext context)I specify that just before I managed to push other nuget with the same command.
Thank you in advance for your help
-
Hi @avoisin_5738 ,
The error "End of Central Directory record could not be found" basically means that the file is not a valid ZIP file. The most common case for this is pushing the wrong file (
.nuspec
instead of.nupkg
, or a dll or .psm file). There are some other rare cases where the stream can be corrupted on the way to ProGet, but that's not common.Hope that helps,
Steve
-
Hello @stevedennis,
Thank you for your answer.
I maybe in this rare cases where the stream can be corrupted.
Because the file is a.nupkg
and it has already been uploaded to Klondike.
Would ProGet have additional checks that don’t exist at Klondike?
I was wondering too, does ProGet have a limit on file size?
-
Hi @avoisin_5738 ,
The error message means that an invalid zip file was received in the request; so the file can't even be opened. I don't know how Klondike works.
If you're totally sure that you're uploading the nupkg file, I would try opening it as a zip file (like rename it to .zip, use 7zip, etc.). I would expect a similar error.
If it's a valid zip file, I would upload it via the UI; if that works, it means your script has some kind of issue in corrupting the stream, or not sending the complete file, etc.
Steve
-
Thank you @stevedennis.
I’ll check my
.nupkg
.
Because I can’t upload it with a script or interface.
-
Hi @avoisin_5738 ,
How did you create this
.nupkg
file?If you rename the
.nupkg
file to a.zip
file, will it open a zip file in Windows or with a tool like 7zip?If you can open it as a zip file on your workstation, then please test if you can import the file into ProGet using this method: https://docs.inedo.com/docs/proget-bulk-import-with-droppath
Thanks,
Alana
-
Hello @atripp
Sorry for taking so long to reply, I hadn't seen the message. Here are my answers:
We have a "Nuget-Writer" tool based on Microsoft libraries and the Coap tool.
Yes, if we rename the file to .zip we can open it with Windows and 7zip.I tried the "Drop Path" method and here are the logs:
DEBUG: 2023-10-10 15:14:54Z - Scanning for packages in D:\Bulk-import...
DEBUG: 2023-10-10 15:14:54Z - Importing 1 files from the drop path...
DEBUG: 2023-10-10 15:14:54Z - Found D:\Bulk-import\My_Nuget_1.2.2.6.nupkg
WARN : 2023-10-10 15:14:54Z - Error installing package: End of Central Directory record could not be found.
DEBUG: 2023-10-10 15:14:54Z - Deleting files...
DEBUG: 2023-10-10 15:14:54Z - Indexed 0 packages in Demo_NuGet feed.
-
Hi @avoisin_5738 ,
Thanks; so in this case, it sounds like there is something wrong with the zip file that our compression library does not like. We of course do not write our own zip library, but we can investigate. We have never had this problem in over 10 years... so it must be a something very strange. But we will look at it.
From here, can you create a test
.npukg
that we can use to reproduce? And also, can you send us the script/code that you use to create the custom package?If it's a small file, then please email it to support at inedo dot com, with [QA-1267] in the subject (so that we can find it). If it's a huge file, then let's find a nother way to transmit it to us.
Thanks,
Alana
-
Hello @atripp
I'm confused.
I had several nuggets that could not be pushed via the command and I did not verify the renaming to .zip on all of them.
When I tried the "Drop Path" method I tried on one that I hadn't checked.With your message that it's been 10 years since you've had a problem like this. I started again from scratch and I noticed that this Nuget indeed does not open with windows but it opens with 7zip. What's more, I asked our teams and this nuget is not necessarily good.
What put me in error was that it was in our old binary manager and that our new binary manager accepts it.
I'll be able to do some more tests on replication.
Thank you for your help