Skip to content

kpm restore fails to proceed to fallback sources when there is an error in the first listed feed #15

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
itsananderson opened this issue May 13, 2014 · 7 comments

Comments

@itsananderson
Copy link

I was walking through the getting started section, and I noticed an exception being thrown from the kpm restore step.

Attempting to resolve dependency System.Console >= 4.0.0.0
  OK https://my-feed.cloudapp.net/api/v2/FindPackagesById()?Id='System.Console' 448ms
Warning: FindPackagesById: System.Console
  '=' is an unexpected token. The expected token is ';'. Line 21, position 78.

(I've sanitized the actual feed URL, but I'm a Microsoft employee if that helps)

My guess is that one of three things is happening:

  1. kpm doesn't know how to negotiate authentication with the private NuGet feed
  2. The private feed needs an update to work with kpm, and kpm doesn't gracefully handle communicating with old feeds
  3. The feed simply doesn't contain the "System.Console" package, and kpm doesn't gracefully handle missing packages.

Other details:

KRE builds tested (both reproduced issue)

0.1-alpha-build-0421 svr50   x86          C:\Users\me\.kre\packages
0.1-alpha-build-0425 svr50   x86          C:\Users\me\.kre\packages

Pretty sure these aren't relevant, but:

  • Windows 8.1 update
  • IIS 8.5

Here's a full dump of console output, and the actual response I get from the NuGet feed when I run the Id='System.Console' query in the browser: https://gist.github.com/itsananderson/3f6c8ec3fb1bb8699a91

@itsananderson
Copy link
Author

I forgot to mention, but when I disable that package source, kpm restore works as expected

@glennc
Copy link
Contributor

glennc commented May 13, 2014

Which feed did you disable to make it work? The MyGet feed is public as of this morning, so you should be able to use it without any auth getting in the way.

@itsananderson
Copy link
Author

I disabled my private NuGet feed (which uses Microsoft federated auth). I didn't touch the MyGet or nuget.org feeds

@Alxandr
Copy link
Contributor

Alxandr commented May 14, 2014

I have something of the same problem. I get InternelServerError on one of the feeds, and that just crashes the whole restore.

@Praburaj
Copy link

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

@Praburaj
Copy link

Updating the title of the bug to reflect the issue.

@Praburaj Praburaj changed the title kpm restore throws an "unexpected token" error when I have a custom NuGet feed kpm restore fails to proceed to fallback sources when there is an error in the first listed feed Dec 29, 2014
@Praburaj
Copy link

This issue was moved to aspnet/dnx#1018

jkotalik pushed a commit that referenced this issue Nov 1, 2018
Jhkim/add installancm ps1
natemcmaster pushed a commit that referenced this issue Nov 14, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
natemcmaster pushed a commit that referenced this issue Nov 20, 2018
natemcmaster pushed a commit that referenced this issue Nov 30, 2018
- Introduced AssemblyWrapper to enable testing
- Cleaned up properties on ResourceManagerStringLocalizer
- #15

Change "Strategy" to "Provider"
- #19
dougbu pushed a commit to dotnet-maestro-bot/AspNetCore that referenced this issue Sep 11, 2019
- It appears these dependencies are no longer needed.  Builds pass on a new agent without them installed.
@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

4 participants