emgarten / Sleet

A static nuget feed generator for Azure Storage, AWS S3, and more.
MIT License
362 stars 43 forks source link

Package Download Failures #146

Closed chrislove01 closed 3 years ago

chrislove01 commented 3 years ago

Hi

I have migrated a set of packages over to a Sleet S3 feed, most packages work, but some receive this error and I can't see whats wrong. I can see the packages in the bucket. Any ideas?

/root/.dotnet/sdk/3.1.301/NuGet.targets(128,5): error : The feed 'Package source 1 [*]' lists package '**' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.

I am creating the feed from the command line on Mac, and consuming in AWS code build. I have tried deleting and recreating the feed multiple times using sleet init --with-catalog --with-symbols.

Thanks

Chris

chrislove01 commented 3 years ago

Have also just tried version 3.2.0, and on creating the feed on Windows, same issue. Could it be case related?

emgarten commented 3 years ago

@chrislove01 check if you are able to download the nupkg through the browser. NuGet constructs the path to nupkg using the id and version in this format.

For the feed: https://nuget.blob.core.windows.net/packages/index.json the nupkg url is https://nuget.blob.core.windows.net/packages/flatcontainer/{id-lower}/{version-lower}/{id-lower}.{version-lower}.nupkg

Example: https://nuget.blob.core.windows.net/packages/flatcontainer/sleet/4.0.18/sleet.4.0.18.nupkg

More info on how NuGet feeds work is at: https://emgarten.com/posts/understanding-nuget-v3-feeds

Validate the feed

You can also try the validate command to ensure that all of the nupkgs and files are in place in the s3 bucket using https://github.com/emgarten/Sleet/blob/master/doc/commands.md#validate

S3 permissions

If validate runs successfully and you see the nupkg in the s3 bucket but can't download it from the browser, it is likely a permission issue. Check that your s3 bucket allows public read access.

emgarten commented 3 years ago

let me know if you are still seeing issues