Skip to content

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

Closed

Description

@itsananderson

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

Activity

  1. itsananderson commented on May 13, 2014

    @itsananderson
    Author

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

  2. glennc commented on May 13, 2014

    @glennc
    Contributor

    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.

  3. itsananderson commented on May 13, 2014

    @itsananderson
    Author

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

  4. Alxandr commented on May 14, 2014

    @Alxandr
    Contributor

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

  5. Praburaj commented on Dec 29, 2014

    @Praburaj

    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
    
  6. Praburaj commented on Dec 29, 2014

    @Praburaj

    Updating the title of the bug to reflect the issue.

  7. 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[/+] on Dec 29, 2014
  8. Praburaj commented on Dec 29, 2014

    @Praburaj

    This issue was moved to aspnet/dnx#1018

  9. added 2 commits that reference this issue on Oct 17, 2018
  10. added a commit that references this issue on Nov 1, 2018
  11. added a commit that references this issue on Sep 11, 2019
  12. ghost locked as resolved and limited conversation to collaborators on Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions