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

Nuget: Central Directory corrupt #13711

Open
jeffschwMSFT opened this issue Aug 15, 2024 · 3 comments
Open

Nuget: Central Directory corrupt #13711

jeffschwMSFT opened this issue Aug 15, 2024 · 3 comments
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Restore Partner:DotNet Priority:2 Issues for the current backlog. Type:Bug

Comments

@jeffschwMSFT
Copy link

NuGet Product Used

dotnet.exe

Product Version

.NET 9 Preview

Worked before?

yes

Impact

It's more difficult to complete my work

Repro Steps & Context

Full details can be found here dotnet/dnceng#3099

  Restored D:\a\_work\1\s\src\libraries\externals.csproj (in 1.01 sec).
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error : Central Directory corrupt. [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory() [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Packaging.PackageArchiveReader..ctor(Stream stream, Boolean leaveStreamOpen, IFrameworkNameProvider frameworkProvider, IFrameworkCompatibilityProvider compatibilityProvider) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Packaging.PackageArchiveReader..ctor(Stream stream) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Protocol.RemotePackageArchiveDownloader.GetPackageReader() [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [D:\a\_work\1\s\Build.proj]
D:\a\_work\1\s\.dotnet\sdk\9.0.100-preview.5.24307.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [D:\a\_work\1\s\Build.proj]

Verbose Logs

No response

@Nigusu-Allehu
Copy link
Contributor

Thank for reaching out!
You have a link to a build in the referenced dceng issue. However, I am not able to access it (it doesn't exist anymore).

Just by looking at the error, my guess is, maybe there is a corrupt nupkg being used by your project.

Is it possible to provide some sort of repro step or a build we could look into?

@jeffschwMSFT
Copy link
Author

jeffschwMSFT commented Aug 16, 2024

this is part of the netcoreapp build (for .NET Core). We see this issue ~daily in our build. there are constant changes, but less likely that it is a corrupt package. I do not have a standalone repro

@nkolev92
Copy link
Member

Continuing some of this discussion via e-mail.

Regardless of the root problem, I think there's an opportunity for improving the logging here, since the log message doesn't even tell us what package is corrupt.

@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Priority:2 Issues for the current backlog. Category:Quality Week Issues that should be considered for quality week and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Triage:NeedsMoreInfo labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Restore Partner:DotNet Priority:2 Issues for the current backlog. Type:Bug
Projects
None yet
Development

No branches or pull requests

4 participants