jmrog / vscode-nuget-package-manager

An extension for Visual Studio Code that lets you easily add or remove .NET Core 1.1+ package references to/from your project's .csproj file using Code's Command Palette.
MIT License
34 stars 17 forks source link

NuGet Add Pacakge Error #38

Open CareyYang opened 5 years ago

CareyYang commented 5 years ago

the error happened When I add IdentityServer4 package, the error massage is "version information could not be retrieved from Nuget pacakge repository". the first,enter ctrl+shift+p image the second, I select the first, Add package, the third,I enter "IdentityServer4", the fourth, I select "IdentityServer4" after it show this error,the image: image How I can do? thanks for you first.

786744873 commented 5 years ago

I have meet the same question,and try many time,but I still can't resolve this problem untill now. Please someone can help us,please

jmrog commented 5 years ago

I've tried to reproduce this many times, but I never have a problem. Can one of you please confirm whether this is still happening for you? Can you perhaps provide me with more details, such as VSCode version, operating system, and any other information you think might be relevant (e.g., whether you are behind a proxy of some kind)?

jmrog commented 5 years ago

Can you also mention where in the world you are located geographically? I'm starting to suspect that there could be an issue in a particular region.

786744873 commented 5 years ago

Can you also mention where in the world you are located geographically? I'm starting to suspect that there could be an issue in a particular region.

Thank you for your replay,sir. I am a Chinese Developer.From last week until now,I find many developer have the same thing happend on me.such as :https://tieba.baidu.com/p/6112114402?red_tag=1008495548

I take some screenshot of this problem https://send.firefox.com/download/f4b4890ebb060194/#_Ip9_bbHRa2FcyzFzkeFpg

VSCode Version: 1.34.0 Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758 Date: 2019-05-15T21:59:37.030Z Electron: 3.1.8 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.17134

CareyYang commented 5 years ago

Can you also mention where in the world you are located geographically? I'm starting to suspect that there could be an issue in a particular region.

Thank you for your replay. I am a Chinese Developer.I'm in China now.I try it again after your replay. but the same thing happened.the screenshot of the my environment is: image My OS is the lasted version of windows 10 v1809. I can get the same package any another way.so I think it's not the proplem of network.

jmrog commented 5 years ago

Thank you both for following up. I still suspect that this is a network problem, for a couple of reasons:

  1. So far, all of the reports about this issue have come from users in China,
  2. Users in China have had problems accessing NuGet package data in the past, and
  3. I can't reproduce the issue at all (I'm not in China).

As a (partial) test, are you able to get to this URL from China: https://api.nuget.org/v3-flatcontainer/IdentityServer4/index.json ?

CareyYang commented 5 years ago

Thank you both for following up. I still suspect that this is a network problem, for a couple of reasons:

  1. So far, all of the reports about this issue have come from users in China,
  2. Users in China have had problems accessing NuGet package data in the past, and
  3. I can't reproduce the issue at all (I'm not in China).

As a (partial) test, are you able to get to this URL from China: https://api.nuget.org/v3-flatcontainer/IdentityServer4/index.json ?

I am able to get to the Url in China,the screenshot is: image

jmrog commented 5 years ago

Thank you both for following up. I still suspect that this is a network problem, for a couple of reasons:

  1. So far, all of the reports about this issue have come from users in China,
  2. Users in China have had problems accessing NuGet package data in the past, and
  3. I can't reproduce the issue at all (I'm not in China).

As a (partial) test, are you able to get to this URL from China: https://api.nuget.org/v3-flatcontainer/IdentityServer4/index.json ?

I am able to get to the Url in China,the screenshot is: image

I see. Notice that it redirected you to azure.cn. Apparently azure.cn does not have the correct information. What you should be seeing is this:

image

So, there appears to be a problem with the redirect or the server to which it is redirecting for users in China. That kind of problem is out of my control. Do you know whether there is some other URL that is accessible by Chinese users and that returns the version information shown in my screenshot?

CareyYang commented 5 years ago

Thank you for your replay again,But I haven't found the way to return the version information in China yet,if I get it,I tell you.

CareyYang commented 5 years ago

Thank you both for following up. I still suspect that this is a network problem, for a couple of reasons:

  1. So far, all of the reports about this issue have come from users in China,
  2. Users in China have had problems accessing NuGet package data in the past, and
  3. I can't reproduce the issue at all (I'm not in China).

As a (partial) test, are you able to get to this URL from China: https://api.nuget.org/v3-flatcontainer/IdentityServer4/index.json ?

I am able to get to the Url in China,the screenshot is: image

I see. Notice that it redirected you to azure.cn. Apparently azure.cn does not have the correct information. What you should be seeing is this:

image

So, there appears to be a problem with the redirect or the server to which it is redirecting for users in China. That kind of problem is out of my control. Do you know whether there is some other URL that is accessible by Chinese users and that returns the version information shown in my screenshot?

I found the method just now. the Url replace "https://api.nuget.org/v3-flatcontainer/IdentityServer4/index.json" whth "https://nuget.cdn.azure.cn/v3-flatcontainer/identityserver4/index.json ".All words are lowercase.this URL that is accessible by Chinese users and that returns the version information shown in your screenshot: image

jmrog commented 5 years ago

Nice find. Thanks. I would say this is a bug in the server that is redirecting you to azure.cn. URL paths are case-sensitive, so a redirect should not change the case of anything in a URL path.

likai3615560 commented 5 years ago

Nice find. Thanks. I would say this is a bug in the server that is redirecting you to azure.cn. URL paths are case-sensitive, so a redirect should not change the case of anything in a URL path.

how to fix this bug

likai3615560 commented 5 years ago

Nice find. Thanks. I would say this is a bug in the server that is redirecting you to azure.cn. URL paths are case-sensitive, so a redirect should not change the case of anything in a URL path.

how to fix this bug

use vpn succeed

maxpowercode commented 5 years ago

if key word use lowercase letter ,the url callback success info,like this: https://nuget.cdn.azure.cn/v3-flatcontainer/identityserver4/index.json

sevenNightL commented 5 years ago

vscood for Mac have the problem in China

jscjs commented 5 years ago

I use the command code “dotnet add package IdentityServer4 --version 2.5.2” to install the package,and it works well.

xBoo commented 5 years ago

This problem still exists, anyone have idea to solve it?

athinboy commented 4 years ago

@xBoo @jmrog here: https://www.cnblogs.com/mingjing/p/11579034.html

athinboy commented 4 years ago

@jmrog

image

image

Eashiong commented 3 years ago

vscode for Mac have the problem in China

KyleC69 commented 2 years ago

As of this date the case problem still exists. I am using Ubuntu 21.10 and code-insiders versions 1.63. I can enter lowercase microsoft.extensions.hosting it returns list using pascal casing. after selecting option it returns versioning information not available. if i call the url all lower case the version information is returned. New out of the box worker project. GEO Location: Oregon, USA [2021-11-05 15:42:14.019] [renderer1] [error] [Extension Host] Versioning information could not be retrieved from the NuGet package repository. Please try again later.