Installing a package fails when one of the sources fail #1183

Closed
yishaigalatzer opened this Issue Aug 14, 2015 · 10 comments

Projects

None yet

4 participants

@yishaigalatzer

Lets verify this is not happening for none ASP.Net 5 projects (and UWP projects as well), and if it does fix it

From @NickCraver

I was unable to reach our internal NuGet server which breaks installs for all packages. Regardless of their source. I just ran a test where I started a ASP.Net MVC 5 project (testing something for David Fowler) and tried to install Microsoft.Owin.Host.SystemWeb. This was nothing special, just the first search result for "owin", a test case off the top of my head. It did not install from nuget.org because another package source was down (which by the way is defined lower in the list). Here's what happened there: http://i.stack.imgur.com/tDxcY.png Here's the corresponding restore log. Related: why was it trying to hit my package source anyway? What would that accomplish? All that could happen is downloading the wrong package I didn't search for and click install on from a package source further down the list.

@yishaigalatzer yishaigalatzer added this to the 3.2 milestone Aug 14, 2015
@zhili1208
Contributor

Checked none Asp.net5 projects and UWP projects. for none asp.net5 projects,package can be installed without any error and for UWP , package also can be installed but with warning says there is error when connect to one source.

@yishaigalatzer

@nickcraver can you please confirm thus is the same thing you are seeing?

@zhili1208 zhili1208 closed this Aug 20, 2015
@yishaigalatzer

@nickcraver we verified the assumptions above. If you see something different please re-open.

@RanjiniM RanjiniM added 3 - Done and removed 2 - Working labels Sep 1, 2015
@RanjiniM RanjiniM removed their assignment Sep 1, 2015
@RanjiniM
Member
RanjiniM commented Sep 1, 2015

Verified that this is working now

@NickCraver

I really am sorry my time is so limited, I'm split between many projects at the moment. This is still broken though, here's a log of me attempting the same Owin package with the latest NuGet extension (3.1.60724.766):

Installing NuGet package Microsoft.Owin.Host.SystemWeb.3.0.1.
Successfully installed 'Microsoft.Owin.Host.SystemWeb.3.0.1' to TestApp2
========== Finished ==========
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\ncraver.STACKEXCHANGE\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe "C:\Users\ncraver.STACKEXCHANGE\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" restore "C:\Users\ncraver.STACKEXCHANGE\Documents\Visual Studio 2015\Projects\TestApp2\src\TestApp2" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU"
Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256
Restoring packages for C:\Users\ncraver.STACKEXCHANGE\Documents\Visual Studio 2015\Projects\TestApp2\src\TestApp2\project.json
  GET https://www.nuget.org/api/v2/
  OK https://www.nuget.org/api/v2/ 502ms
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/
  OK https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/ 414ms
  GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb'
Warning: FindPackagesById: Microsoft.Owin.Host.SystemWeb
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb'
  GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime'
Warning: FindPackagesById: Microsoft.Owin.Host.SystemWeb
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb'
Warning: FindPackagesById: System.Runtime
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime'
  OK https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb' 326ms
  GET https://www.nuget.org/api/v2/package/Microsoft.Owin.Host.SystemWeb/3.0.1
Warning: FindPackagesById: System.Runtime
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime'
Error: FindPackagesById: Microsoft.Owin.Host.SystemWeb
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin.Host.SystemWeb' is not a valid NuGet v2 service response.
Error: FindPackagesById: System.Runtime
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime' is not a valid NuGet v2 service response.
  OK https://www.nuget.org/api/v2/FindPackagesById()?id='System.Runtime' 459ms
  OK https://www.nuget.org/api/v2/package/Microsoft.Owin.Host.SystemWeb/3.0.1 267ms
  GET https://www.nuget.org/api/v2/FindPackagesById()?id='Owin'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin'
  GET https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Owin'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin'
Warning: FindPackagesById: Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin' is not a valid NuGet v2 service response.
Warning: FindPackagesById: Microsoft.Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin'
  OK https://www.nuget.org/api/v2/FindPackagesById()?id='Owin' 105ms
  GET https://www.nuget.org/api/v2/package/Owin/1.0.0
  OK https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Owin' 105ms
  GET https://www.nuget.org/api/v2/package/Microsoft.Owin/3.0.1
Warning: FindPackagesById: Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin' is not a valid NuGet v2 service response.
Warning: FindPackagesById: Microsoft.Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin' is not a valid NuGet v2 service response.
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin'
  GET https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin'
  OK https://www.nuget.org/api/v2/package/Microsoft.Owin/3.0.1 157ms
Error: FindPackagesById: Microsoft.Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Owin' is not a valid NuGet v2 service response.
Error: FindPackagesById: Owin
  Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Owin' is not a valid NuGet v2 service response.
  OK https://www.nuget.org/api/v2/package/Owin/1.0.0 208ms
----------
System.IO.InvalidDataException: Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime' is not a valid NuGet v2 service response. ---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
   at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetv2Feed.EnsureValidFindPackagesResponse(Stream stream, String uri)
   --- End of inner exception stack trace ---
   at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetv2Feed.EnsureValidFindPackagesResponse(Stream stream, String uri)
   at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetv2Feed.<>c__DisplayClass25_0.<FindPackagesByIdAsyncCore>b__0(Stream stream)
   at Microsoft.Framework.PackageManager.Restore.NuGet.HttpSource.<GetAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetv2Feed.<FindPackagesByIdAsyncCore>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RemoteWalkProvider.<FindLibrary>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibrary>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryByVersion>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryMatch>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryEntry>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<CreateGraphNode>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<>c__DisplayClass69_0.<<Execute>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<Execute>d__69.MoveNext()
----------
Restore failed
Response from https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='System.Runtime' is not a valid NuGet v2 service response.
NuGet Config files used:
    C:\Users\ncraver.STACKEXCHANGE\AppData\Roaming\NuGet\NuGet.Config
Feeds used:
    https://www.nuget.org/api/v2/
    https://buildserver.local/httpAuth/app/nuget/v1/FeedService.svc/
    C:\Program Files (x86)\Microsoft Web Tools\DNU
@yishaigalatzer

@NickCraver as far as I can tell this looks like an ASP.net 5 / dnu restore log. It is a different code base from nuget. And indeed the current behavior.

I suggest opening a bug in the aspnet/home or aspnet/dnx repo

@NickCraver

Gotcha - thanks @yishaigalatzer. I just confirmed the non-dnu version is now working correctly (I tried with a regular console application a moment ago). I'll follow up with the dnu side on this bug.

It is worth noting that what is and isn't "core stuff" and therefore dnu based is far from clear in the UI - you have to look at the logs to tell the difference from the UI. I think unless there's some UI indication of the differentiation of underlying tooling, you'll continue to get issues on both sides.

I'm fairly familiar with the tooling and I readily assumed the any issue with the NuGet package dialog from the NuGet extension would be an issue here. It didn't occur to me to even look at dnu when doing things from the Visual Studio UI...and I bet I'm not alone.

I don't have a good suggestion for fixing it, only that there should be some sort of better indication there that what's underneath is very different, despite there being an identical UI wrapping it.

@yishaigalatzer

@NickCraver the plan is merge them, its a point in time thing, we plan to merge the codebase, so it will be the right place to report eventually. When it comes to making UI changes, we prefer to stick to dealing with other issues at the expense of getting bugs reported on both sides.

@NickCraver

@yishaigalatzer understood, I appreciate the insight there and plan there - it definitely makes sense with all the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment