dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.73k stars 1.07k forks source link

Error following Getting Started #5273

Closed Cronan closed 4 years ago

Cronan commented 8 years ago

Steps to reproduce

Follow Getting Started - https://dotnet.github.io/getting-started/

log  : Restoring packages for C:\Temp\hwapp\project.json...
error: Object reference not set to an instance of an object.

Environment data

.NET Command Line Tools (1.0.0-beta-001598)

Product Information:
Version:     1.0.0-beta-001598
Commit Sha:  7582649f88

Runtime Environment:
OS Name:     Windows
OS Version:  6.1.7601
OS Platform: Windows
Runtime Id:  win7-x64
blackdwarf commented 8 years ago

@Cronan thanks for reporting this. Which shell are you using?

/cc @piotrpMSFT

Cronan commented 8 years ago

cmd.exe

Cronan commented 8 years ago

FYI I commented out the /clear line in the local Nuget.config file, now I get a better class of failure:

log  : Restoring packages for C:\Temp\hwapp\project.json...
info :   GET http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library'
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'
log  : Retrying 'FindPackagesByIdAsyncCore' for source http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library'.
log  : Response status code does not indicate success: 401 (Unauthorized).
info :   GET http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library'
log  : Retrying 'FindPackagesByIdAsyncCore' for source http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library'.
log  : Response status code does not indicate success: 401 (Unauthorized).
info :   GET http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library'
error: Failed to retrieve information from remote source 'http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library''.
error: Response status code does not indicate success: 401 (Unauthorized).
error: Failed to retrieve information from remote source 'http://nuget/nuget/Rosa/FindPackagesById()?id='NETStandard.Library''.
error:   Response status code does not indicate success: 401 (Unauthorized).
Cronan commented 8 years ago

http://nuget is my internal NuGet server - set up as the first package source - when I remove it, I then get the following:

log  : Restoring packages for C:\Temp\hwapp\project.json...
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'
log  : Retrying 'FindPackagesByIdAsyncCore' for source https://www.nuget.org/api/v2/FindPac
kagesById()?id='NETStandard.Library'.
log  : Object reference not set to an instance of an object.
error: Object reference not set to an instance of an object.
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'
blackdwarf commented 8 years ago

@Cronan does restore ever finish?

Cronan commented 8 years ago

I couldn't find any GitHub confi that worked, I tried removing out in-house one, just pointing to GitHub v2, and just pointing to v3 api. Most gave me the nullref.

Ivan

_____________________________

From: Zlatko Knezevic notifications@github.com Sent: Thursday, March 3, 2016 17:56 Subject: Re: [cli] Error following Getting Started (#1679) To: dotnet/cli cli@noreply.github.com Cc: Ivan Cronyn ivan.cronyn@gmail.com

@Cronan does restore ever finish?

— Reply to this email directly or view it on GitHub.

joepeer commented 8 years ago

I'm on windows 10 and I'm also seeing this issue on 1.0.0-beta-001598

I'm behind a corporate proxy but my environment variables http_proxy and https_proxy are correctly set.

I was using 1.0.1.001200 dev build and it used to work fine.

I also tried on Ubuntu 14.04 dotnet new and dotnet restore and instead I get:

error: The reason phrase must not contain new line characters.

Again my http_proxy and http_proxy variables are correctly set.

Prior using this build I was using 1.0.0-beta-001246 on ubuntu 14.04 and it worked fine.

blackdwarf commented 8 years ago

@Cronan @joepeer both of you have proxies configured on the machines you are doing restores on?

Cronan commented 8 years ago

I'm running through a corporate proxy, I'm using cntlm to centralise and encrypt my credentials. I can access Git etc through this setup.

Ivan

On Fri, Mar 4, 2016 at 6:05 PM -0800, "Zlatko Knezevic" notifications@github.com wrote:

@Cronan @joepeer both of you have proxies configured on the machines you are doing restores on?

— Reply to this email directly or view it on GitHub.

blackdwarf commented 8 years ago

This could be the NuGet + proxies + credentials issue. @emgarten does it look similar?

emgarten commented 8 years ago

@Cronan would you run dotnet restore with --verbosity debug and paste the stack trace for the null reference exceptions?

What version of NuGet.Server are you running?

@blackdwarf I haven't seen this issue before, but it could be related to auth.

Cronan commented 8 years ago
trace: Running restore with 8 concurrent jobs.
trace: Reading project file C:\Temp\hwapp\project.json.
trace: Loaded project hwapp from C:\Temp\hwapp\project.json.
trace: Found project root directory: C:\Temp\hwapp.
trace: Using packages directory: C:\Users\icronyn\.nuget\packages\.
log  : Restoring packages for C:\Temp\hwapp\project.json...
trace: Restoring packages for DNXCore,Version=v5.0...
error: Object reference not set to an instance of an object.
trace: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
trace:    at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
trace:    at System.Net.Http.WinHttpAuthHelper.PreAuthenticateRequest(WinHttpRequestState state, UInt32 proxyAuthScheme)
trace:    at System.Net.Http.WinHttpHandler.<StartRequest>d__101.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()
trace:    --- End of inner exception stack trace ---
trace:    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
trace:    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
trace:    at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
trace:    at NuGet.CommandLine.XPlat.Program.Main(String[] args)
trace: ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
trace:    at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
trace:    at System.Net.Http.WinHttpAuthHelper.PreAuthenticateRequest(WinHttpRequestState state, UInt32 proxyAuthScheme)
trace:    at System.Net.Http.WinHttpHandler.<StartRequest>d__101.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()<---
Cronan commented 8 years ago

Also, we're on 2.6.x of nuget server

Cronan commented 8 years ago

For the stack trace above, I created a new app, so the Nuget.config file still has the /clear line

rocklan commented 8 years ago

I'm having the same error and getting the same stack trace. @Cronan did you find a workaround?

emgarten commented 8 years ago

@Cronan does your nuget server use Windows Auth?

afortaleza commented 8 years ago

I'm having the same error when I run dotnet restore, also behind a corporate proxy. http_proxy and https_proxy variables set, git works fine on github, npm works fine. Here's my log:

trace: Running restore with 4 concurrent jobs.
trace: Reading project file C:\src\hwapp\project.json.
trace: Loaded project hwapp from C:\src\hwapp\project.json.
trace: Found project root directory: C:\src\hwapp.
trace: Using packages directory: C:\Users\anderson.fortaleza\.nuget\packages\.
log  : Restoring packages for C:\src\hwapp\project.json...
trace: Restoring packages for DNXCore,Version=v5.0...
error: Object reference not set to an instance of an object.
trace: System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
trace:    at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
trace:    at System.Net.Http.WinHttpAuthHelper.PreAuthenticateRequest(WinHttpRequestState state, UInt32 proxyAuthScheme)
trace:    at System.Net.Http.WinHttpHandler.<StartRequest>d__101.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()
trace:    --- End of inner exception stack trace ---
trace:    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
trace:    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
trace:    at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
trace:    at NuGet.CommandLine.XPlat.Program.Main(String[] args)
trace: ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
trace:    at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
trace:    at System.Net.Http.WinHttpAuthHelper.PreAuthenticateRequest(WinHttpRequestState state, UInt32 proxyAuthScheme)
trace:    at System.Net.Http.WinHttpHandler.<StartRequest>d__101.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()<---
Cronan commented 8 years ago

@emgarten Yes, my devops guys say we use Windows Auth

emgarten commented 8 years ago

@Cronan Windows auth isn't supported yet for dotnet restore, only basic auth.

Cronan commented 8 years ago

@emgarten I still can't get this to work when I remove my internal server, I'll repost my comment from above:

http://nuget is my internal NuGet server - set up as the first package source - when I remove it, I then get the following:

log  : Restoring packages for C:\Temp\hwapp\project.json...
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'
log  : Retrying 'FindPackagesByIdAsyncCore' for source https://www.nuget.org/api/v2/FindPac
kagesById()?id='NETStandard.Library'.
log  : Object reference not set to an instance of an object.
error: Object reference not set to an instance of an object.
info :   GET https://www.nuget.org/api/v2/FindPackagesById()?id='NETStandard.Library'
emgarten commented 8 years ago

@Cronan would you run again with --verbosity verbose this looks like a different issue based on your output logs.

qiansen1386 commented 8 years ago

I am creating a new Nuget package project using VS2015, and it warp the project with DNX for me. Then when I try to install some basic NuGet packages, I get this. image

Warning: FindPackagesById: NuGet.CommandLine
  Response status code does not indicate success: 401 (Unauthorized).
  GET http://nugetrepo.misatravel.net/FindPackagesById()?id='NuGet.CommandLine'
  GET https://www.nuget.org/api/v2/package/NuGet.CommandLine/3.3.0
Warning: FindPackagesById: NuGet.CommandLine
  Response status code does not indicate success: 401 (Unauthorized).
  GET http://nugetrepo.misatravel.net/FindPackagesById()?id='NuGet.CommandLine'
Error: FindPackagesById: NuGet.CommandLine
  Response status code does not indicate success: 401 (Unauthorized).

Who the hell is responsible for this? You guys? DNX? NuGet? Why Microsoft always make things over complicated...

blackdwarf commented 8 years ago

@qiansen1386 I'm sorry, I don't follow. What has this got to do with the CLI?

qiansen1386 commented 8 years ago

@blackdwarf I also don't know what is dotnet cli..... But I get the same error with @Cronan . Google sent me here. So sorry.... I have moved it to https://github.com/NuGet/Home/issues/2388 Should I remove my post from here?

blackdwarf commented 8 years ago

@qiansen1386 no need. However, it is a good point whether this needs to be in NuGet. @emgarten thoughts?

emgarten commented 8 years ago

@qiansen1386 that auth error is coming from DNU which did not support authenticated feeds. DNU has been replaced by NuGet.

emgarten commented 8 years ago

From the stack this looks like a nuget issue. I'm moving the bug to that repo.

https://github.com/NuGet/Home/issues/2393

Barryrowe commented 8 years ago

I know this was closed and moved over to the NuGet project, but I'm not 100% convinced this isn't an issue with the Visual Studio's execution context of the dotnet restore command.

What I'm seeing is that if I do a command line dotnet restore with the http_proxy environment variable set, it works no problem. Doing a restore from within Visual Studio (with the http_proxy environment variable set at the system level), it fails and I end up with a 407 proxy errors.

What I find really bizarre, is that if I open a command prompt, run set http_proxy=[myproxyserver] and then do a command line dotnet restore, after this it appears that I can install packages normally through the visual studio nuget extension.

As soon as I close the command prompt that I ran the dotnet restore from, any nuget installs from visual studio begin failing again. This makes no sense to me, as the environment contexts shouldn't be related, but it appears my understanding of ENV in windows isn't complete.

You can see the same notes provided to the NuGet ticket here: https://github.com/NuGet/Home/issues/2393#issuecomment-254203923

Barryrowe commented 8 years ago

Sorry, I posted this on the wrong issue.