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

Problems with more than one feed #814

Closed
dzendras opened this issue May 5, 2015 · 35 comments
Closed

Problems with more than one feed #814

dzendras opened this issue May 5, 2015 · 35 comments
Labels

Comments

@dzendras
Copy link

dzendras commented May 5, 2015

I'm having problems with one of the latest paket binaries (1.3.8). It seems that 0.4.2 doesn't show those problems.

  1. BUG1 and BUG2 may be inappropriate usages of paket or bugs (I'm not sure).
  2. WEBAPI fixes the problem (encountered by BUG1 and BUG2) by clearing paket.dependencies file.
  3. BUG3 scenario seems to be a bug.
    3a. SANITYCHECK confirms that Newtonsoft.Json is available on the internal feed.

Unfortuantely I am not able to send you a repro because of the internal feed involved.

BUG1

Given:
paket.references EMPTY
paket.dependencies with one line (source https://nuget.org/api/v2)
paket.lock EMPTY
When:
paket add nuget Microsoft.AspNet.WebApi project PaketSandbox
Then:

Paket version 1.3.8.0
Adding Microsoft.AspNet.WebApi to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
Resolving packages:
Paket failed with:
Could not find versions for package Microsoft.AspNet.WebApi in any of the sources in [].

BUG2
Given:
paket.references EMPTY
paket.dependencies with one line (source https://nuget.org/api/v2)
paket.lock ABSENT
When:
paket add nuget Microsoft.AspNet.WebApi project PaketSandbox
Then:
Paket version 1.3.8.0
Adding Microsoft.AspNet.WebApi to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
Resolving packages:
Paket failed with:
Could not find versions for package Microsoft.AspNet.WebApi in any of the sources in [].

WEBAPI
Given:
paket.references EMPTY
paket.dependencies EMPTY
paket.lock EMPTY
When:
paket add nuget Microsoft.AspNet.WebApi project PaketSandbox
Then:
Paket version 1.3.8.0
Adding Microsoft.AspNet.WebApi to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
Resolving packages:

  • Microsoft.AspNet.WebApi 5.2.3
  • Microsoft.AspNet.WebApi.WebHost 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.2.3
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Newtonsoft.Json 6.0.8
  • Microsoft.Net.Http 2.2.29
  • Microsoft.Bcl 1.1.10
  • Microsoft.Bcl.Build 1.0.21
    Locked version resolutions written to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.lock
    Dependencies files saved to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
    Adding Microsoft.AspNet.WebApi to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\PaketSandbox\paket.references
    References file saved to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\PaketSandbox\paket.references
    4 seconds - ready.

BUG3
Given:

  1. WEBAPI performed successfully
  2. Modify paket.dependencies so it looks like this:
    source http://internalfeed/NugetWebFeed/nuget //Add this line (internalfeed contains Newtonsoft.Json)

nuget log4net 1.2.0 //Add this line (internalfeed contains log4net)

source https://nuget.org/api/v2 //Created by WEBAPI

nuget Microsoft.AspNet.WebApi //Created by WEBAPI

When:
paket add nuget log4net project PaketSandbox
Then:
Paket version 1.3.8.0
C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies contains package log4net already. ==> Ignored
Resolving packages:

  • Newtonsoft.Json 6.0.8
    Paket failed with:
    Couldn't get package details for package Newtonsoft.Json on any of ["http://internalfeed/NugetWebFeed/nuget"].

SANITYCHECK
Given:
paket.references EMPTY
paket.lock EMPTY
paket.dependencies:
source http://internalfeed/NugetWebFeed/nuget //(feed contains Newtonsoft.Json)

nuget Newtonsoft.Json

When:
paket add nuget Newtonsoft.Json project PaketSandbox
Then:
Paket version 1.3.8.0
C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies contains package Newtonsoft.Json already. ==> Ignored
Resolving packages:

  • Newtonsoft.Json 6.0.6
    Locked version resolutions written to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.lock
    Dependencies files saved to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
    Adding Newtonsoft.Json to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\PaketSandbox\paket.references
    References file saved to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\PaketSandbox\paket.references
    Newtonsoft.Json 6.0.6 unzipped to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\packages\Newtonsoft.Json
    1 second - ready.

paket.lock:

NUGET
remote: http://internalfeed/NugetWebFeed/nuget
specs:
Newtonsoft.Json (6.0.6)

@forki
Copy link
Member

forki commented May 6, 2015

BUG1, BUG2 are confirmed as bugs and resolved in current version.

Is there any chance for me to get private access to your internal feed?

@forki forki added the bug label May 6, 2015
@dzendras
Copy link
Author

dzendras commented May 6, 2015

I am afraid it's not possible. It's an internal company feed.

However I can provide a sample that was the reason why I decided to make a repro:

BUG4
Given:
paket.references: A lot of them filled with various entries
paket.lock:

NUGET
  remote: http://internalfeed/NugetWebFeed/nuget
  specs:
    Internal_1 (0.2.071.3178)
      Newtonsoft.Json (>= 6.0.0 < 6.1.0)
    Internal_2 (0.0.071.9054)
      Newtonsoft.Json (>= 5.0.8)
    log4net (1.2.10)
    Newtonsoft.Json (6.0.6)
  remote: https://www.nuget.org/api/v2
  specs:
    Microsoft.AspNet.WebApi (5.2.3)
      Microsoft.AspNet.WebApi.WebHost (>= 5.2.3 < 5.3.0)
    Microsoft.AspNet.WebApi.Client (5.2.3)
      Microsoft.Net.Http (>= 2.2.22) - framework: portable-wp80+win+net45+wp81+wpa81
      Newtonsoft.Json (>= 6.0.4) - framework: portable-wp80+win+net45+wp81+wpa81, >= net45
    Microsoft.AspNet.WebApi.Core (5.2.3)
      Microsoft.AspNet.WebApi.Client (>= 5.2.3)
    Microsoft.AspNet.WebApi.WebHost (5.2.3)
      Microsoft.AspNet.WebApi.Core (>= 5.2.3 < 5.3.0)

paket.dependencies:

source http://internalfeed/NugetWebFeed/nuget

nuget Internal_1 ~> 0.0
nuget Internal_2 ~> 1.0
nuget log4net 1.2.10
nuget Newtonsoft.Json

source https://www.nuget.org/api/v2

nuget Microsoft.AspNet.WebApi
nuget Microsoft.AspNet.WebApi.Core

When:
paket install
Then:
Paket version 1.3.8.0
Resolving packages:
...

  • Newtonsoft.Json 6.0.6
  • Microsoft.AspNet.WebApi 5.2.3
    Paket failed with:
    Couldn't get package details for package Microsoft.AspNet.WebApi on any
    of ["http://internalfeed/NugetWebFeed/nuget"].

INFO1
Given:
paket.references: Same as BUG4
paket.dependencies: Same as BUG4
paket.lock ABSENT

When:
paket install
Then:
Succeeds

INFO2
Given:
paket.references: Same as BUG4
paket.dependencies: Same as BUG4
paket.lock Sane as BUG4
paket version 0.4.2

When:
paket install
Then:
Succeeds

@dzendras
Copy link
Author

dzendras commented May 6, 2015

So the question is: Why paket tries to get package details of WebApi (official nuget) on internal_feed (which hosts WebApi's dependency: Newtonsoft.Json)?

@forki
Copy link
Member

forki commented May 6, 2015

could you please try to align the paket.lock correctly?

@forki
Copy link
Member

forki commented May 6, 2015

hint: use editor and insert 4 spaces before every line of your code. then copy into comment.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Done

@forki
Copy link
Member

forki commented May 6, 2015

is there a version given after Internal_1 ?

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Yes, there is. I updated the lock file. I also noticed that there's Internal_2 that also requires Newtonsoft.Json.

Paket.dependencies updated as well.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Please note that I haven't published the entire lock and dependencies file. Just the relevant parts (dealing with Json and WebApi)

@forki
Copy link
Member

forki commented May 6, 2015

I think I found the issue.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Glad to hear that :) Is it fixable? :)

@forki
Copy link
Member

forki commented May 6, 2015

sure

2015-05-06 10:32 GMT+02:00 Jedrzej Grabowski notifications@github.com:

Glad to hear that :) Is it fixable? :)


Reply to this email directly or view it on GitHub
#814 (comment).

@forki forki closed this as completed in 6b7a44e May 6, 2015
@forki
Copy link
Member

forki commented May 6, 2015

please verify if the thing works now.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Unfortunately it doesn't... I'm going to give you some details shortly...

@dzendras
Copy link
Author

dzendras commented May 6, 2015

BUG3: The same error: Nothing's changed.
BUG4: There's a slight change (previously it stopped at WebApi, not WebApi.Client):

Paket version 1.3.22.0
Resolving packages:

  • Newtonsoft.Json 6.0.6
  • Microsoft.AspNet.WebApi 5.2.3
  • Microsoft.AspNet.WebApi.Client 5.2.3
    Paket failed with:
    Couldn't get package details for package Microsoft.AspNet.WebApi.Client
    on any of ["http://internalfeed/NugetWebFeed/nuget"].

@forki forki reopened this May 6, 2015
@forki
Copy link
Member

forki commented May 6, 2015

ok I see.

@forki
Copy link
Member

forki commented May 6, 2015

sorry playing ping pong here, but since I can't access the feed it's just guessing what's wrong. Anyways there is a new version available.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

I don't mind the ping pong :)

Still problems:
BUG3:
Paket version 1.3.23.0
Adding Newtonsoft.Json to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
Resolving packages:

  • Microsoft.AspNet.WebApi 5.2.3
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.2.3
  • Microsoft.AspNet.WebApi.WebHost 5.2.3
  • Microsoft.Net.Http 2.2.29
  • log4net 1.2.0
    Paket failed with:
    Couldn't get package details for package log4net on any of ["http://internalfeed/NugetWebFeed/nuget"].

BUG4:
We've got a new actor coming to the stage: Internal_3!
Let's do a brief introduction:

paket.dependencies:
nuget Internal_3 ~> 1.0
paket.lock:
Internal_3 (1.0.071.9432) //No dependencies

Then (outcome):
Paket version 1.3.23.0
Resolving packages:
...

  • Internal_3 1.0.071.9556
    ...
  • Newtonsoft.Json 6.0.6
  • Microsoft.AspNet.WebApi 5.2.3
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.2.3
  • Microsoft.AspNet.WebApi.WebHost 5.2.3
    ...
  • log4net 1.2.10
    ...

Paket failed with:
Could not find compatible versions for top level dependency:
"Internal_3 1.0.071.9432 (from C:...\paket.dependencies)"
Available versions:
- 1.0.071.9556
Try to relax the dependency or allow prereleases.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

BUG4:
Neither Internal_1 nor Internal_2 depend on Internal_3.
Internal_3 has no dependencies at all.

When you delete paket.lock and run paket install, then there are no errors.

@forki
Copy link
Member

forki commented May 6, 2015

Yes it's still a bug with the "smart" install. Will try to look deeper

2015-05-06 12:18 GMT+02:00 Jedrzej Grabowski notifications@github.com:

BUG4:
Neither Internal_1 nor Internal_2 depend on Internal_3.
Internal_3 has no dependencies at all.

When you delete paket.lock and run paket install, then there are no errors.


Reply to this email directly or view it on GitHub
#814 (comment).

@forki
Copy link
Member

forki commented May 6, 2015

Regarding Bug 3: didn't you say log4net is on the internal feed? It seems to look into the correct feed.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

I did. So as Newtonsoft.Json (the original error). Let me run sanity check with log4net to prove that log4net is accessible from internal feed...

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Indeed paket (both 0.4.2 and the latest one) is not able to get the information. However when I launched NuGet (via VS's Manage NuGet Packages) with the internal feed I could install log4net successfully:

------- Installing...log4net 1.2.10 -------
Installing 'log4net 1.2.10'.
Added file 'log4net.dll' to folder 'log4net.1.2.10\lib\1.0'.
Added file 'log4net.xml' to folder 'log4net.1.2.10\lib\1.0'.
Added file 'log4net.dll' to folder 'log4net.1.2.10\lib\1.1'.
Added file 'log4net.xml' to folder 'log4net.1.2.10\lib\1.1'.
Added file 'log4net.dll' to folder 'log4net.1.2.10\lib\2.0'.
Added file 'log4net.xml' to folder 'log4net.1.2.10\lib\2.0'.
Added file 'log4net.1.2.10.nupkg' to folder 'log4net.1.2.10'.
Successfully installed 'log4net 1.2.10'.
Adding 'log4net 1.2.10' to PaketSandbox.
For adding package 'log4net 1.2.10' to project 'PaketSandbox' that targets 'net451',

Assembly references are being added from 'lib\2.0'
Added reference 'log4net' to project 'PaketSandbox'
Added file 'packages.config'.
Added file 'packages.config' to project 'PaketSandbox'
Successfully added 'log4net 1.2.10' to PaketSandbox.

Bizarre...

@forki
Copy link
Member

forki commented May 6, 2015

I have no idea how to debug this one.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

I spotted a file in NuGet local cache (C:\Users\user\AppData\Local\NuGet\Cache): log4net.1.2.0.s2000701002.json.failed. Its content:

System.Exception: Could not retrieve data from http://internalfeed/NugetWebFeed/nuget/Packages(Id='log4net',Version='1.2.0')
Message: The remote server returned an error: (404) Not Found.
at Paket.Utils.getFromUrl@187-4.Invoke(String message)
at Paket.Utils.getFromUrl@182-3.Invoke(Exception _arg2)
at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@803.Invoke(AsyncParams`1 args)

Does it help?

EDIT: I ran it again after clearing NuGet cache via VS settings.

@forki
Copy link
Member

forki commented May 6, 2015

yes please delete the whole cache or retry with -f

@dzendras
Copy link
Author

dzendras commented May 6, 2015

I found the problem. My mistake.
I had invalid version in dependencies file: 1.2.0 instead of 1.2.10. Sorry for that.

BUG3 fixed.

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Ok all bugs mentioned in this ticket have been fixed (verified with 1.3.25.0).

Thank you very much for such a quick fix!

@forki forki closed this as completed May 6, 2015
@forki
Copy link
Member

forki commented May 6, 2015

was a bit like:

strange

but I'm glad it works now

@dzendras
Copy link
Author

dzendras commented May 6, 2015

Actually I'm having a problem. I think we need to reopen this one...

BUG5
Given:
BUG3 performed successfully //we have dependencies file with 2 feeds (internal first)
When:
paket add nuget Moq project PaketSandbox //Moq is NOT present on the internal feed
Then:
Paket version 1.3.25.0
Adding Moq to C:\Users\user\Documents\Visual Studio 2013\Projects\PaketSandbox\paket.dependencies
Resolving packages:

  • Newtonsoft.Json 6.0.8
  • Microsoft.AspNet.WebApi 5.2.3
  • Microsoft.AspNet.WebApi.Client 5.2.3
  • Microsoft.AspNet.WebApi.Core 5.2.3
  • Microsoft.AspNet.WebApi.WebHost 5.2.3
  • Microsoft.Net.Http 2.2.29
  • log4net 1.2.10
  • Microsoft.Bcl 1.1.10
  • Microsoft.Bcl.Build 1.0.21
    Paket failed with:
    Couldn't retrieve versions for Moq.

NOTE: I could install a dependency that was present on the internal feed.

@forki
Copy link
Member

forki commented May 6, 2015

working

@forki forki reopened this May 6, 2015
@dzendras
Copy link
Author

dzendras commented May 6, 2015

@forki
Copy link
Member

forki commented May 6, 2015

please try 1.3.26

@forki forki closed this as completed May 6, 2015
@dzendras
Copy link
Author

dzendras commented May 6, 2015

I'll try tomorrow when I come to work and have access to the internal feed.

@dzendras
Copy link
Author

dzendras commented May 7, 2015

I am delighted to confirm that the above bugs have been fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants