Skip to content

kpm restore failures on one NuGet feed shouldn't block other feeds #251

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

Closed
MrJul opened this issue Dec 30, 2014 · 3 comments
Closed

kpm restore failures on one NuGet feed shouldn't block other feeds #251

MrJul opened this issue Dec 30, 2014 · 3 comments

Comments

@MrJul
Copy link

MrJul commented Dec 30, 2014

Scenario
  • Two NuGet feeds are configured.
  • One NuGet feed answers correctly (it's nuget.org).
  • The other one answers with non-XML content for various reasons: authentication failure, page not found, server error, not a nuget feed URL, etc.
Expected result

The bogus feed is ignored, packages are restored from the first feed.

Actual result

Nothing is restored, a message The XML file <filename>.dat is corrupt appears.

How to reproduce

Add any website, such as bing.com as a secondary NuGet feed.

Real world scenario

We're using NuGet.org and a private TeamCity feed, which returns a HTTP 204 NoContent response when a package is not found. Thus, we can't restore any package.

@davidfowl
Copy link
Member

That's fixed in later versions of kpm. We only cache 200 responses.

@MrJul
Copy link
Author

MrJul commented Dec 30, 2014

Thank you for the quick answer.
Can we easily update the various KRE packages that come with VS2015 Preview (in %programfiles(x86)%\Microsoft Web Tools\Kre) to nightly builds?

@Praburaj
Copy link

This is a dup of aspnet/dnx#1018. I can still reproduce the issue and below is some repro steps I copied from the bug.

I can still reproduce this - For example if I have a package X in my project.json dependencies and I try to do a kpm restore -s http://notexistingfeed.com/api/v2 -s https://nuget.org/api/v2 (Note: This command has multiple feeds and the first one a non-existing feed). When there is an error (404/500 etc) in the first feed kpm restore fails and does not proceed to the fallback sources. For instance the same is handled differently in older nuget where it falls back.

The source at NonExisting [http://notexistingsite.com/api/v2] is unreachable. Falling back to NuGet Local Cache at C:\Users\prabht\AppData\Local\NuGet\Cache

natemcmaster pushed a commit that referenced this issue Nov 21, 2018
- #251

nit: add `--quiet` to Travis configuration so that log can be displayed in browser
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants