vscode-nuget-package-manager icon indicating copy to clipboard operation
vscode-nuget-package-manager copied to clipboard

NuGet Add Pacakge Error

Open CareyYang opened this issue 6 years ago • 21 comments

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.

CareyYang avatar May 20 '19 03:05 CareyYang

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

786744873 avatar May 21 '19 12:05 786744873

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 avatar May 21 '19 20:05 jmrog

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.

jmrog avatar May 21 '19 20:05 jmrog

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

786744873 avatar May 22 '19 01:05 786744873

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.

CareyYang avatar May 22 '19 13:05 CareyYang

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 ?

jmrog avatar May 22 '19 13:05 jmrog

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

CareyYang avatar May 22 '19 14:05 CareyYang

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?

jmrog avatar May 22 '19 14:05 jmrog

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 avatar May 22 '19 14:05 CareyYang

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

CareyYang avatar May 22 '19 14:05 CareyYang

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.

jmrog avatar May 22 '19 14:05 jmrog

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 avatar Jul 21 '19 06:07 likai3615560

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

likai3615560 avatar Jul 22 '19 03:07 likai3615560

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

maxpowercode avatar Jul 23 '19 07:07 maxpowercode

vscood for Mac have the problem in China

sevenNightL avatar Aug 01 '19 00:08 sevenNightL

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

jscjs avatar Aug 21 '19 06:08 jscjs

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

xBoo avatar Aug 29 '19 06:08 xBoo

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

athinboy avatar Nov 13 '19 07:11 athinboy

@jmrog

image

image

athinboy avatar Nov 13 '19 07:11 athinboy

vscode for Mac have the problem in China

Eashiong avatar Oct 21 '20 13:10 Eashiong

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.

KyleC69 avatar Nov 05 '21 22:11 KyleC69