134

I'm working in VS Code and started getting this error yesterday. All of my json files have this error, not just a few. If I remember right there was an update to the program yesterday or the day before. Did the update break something or reset a setting that I forgot I had set?

When looking this up, people are talking about downloading the schema and using it locally, but I would prefer not to have to do that and would instead like to find out why this broke?

I am using a proxy, but as far as I know that hasn't changed. Here's the exact error I'm getting.

Problems loading reference 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load schema from 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to connect to https://schemastore.azurewebsites.net/schemas/json/package.json. Error: connect ECONNREFUSED 168.62.224.13:443

5
  • 55
    restart vscode, it helped me with the same issue.
    – mtx
    Commented Mar 14, 2018 at 20:25
  • 2
    Thank you. I tried that and it didn't work. Even restarted my computer.
    – kjw
    Commented Mar 14, 2018 at 20:36
  • 1
    You need to set your proxy. Please see stackoverflow.com/questions/37730040/… and stackoverflow.com/questions/36108515/… Commented Mar 22, 2018 at 14:15
  • 2
    go to the terminal, clear the terminal(ctrl/cmd + c), write, npm install/yarn add, then close the vsc/any text editor(at this phase it will still have the error). restart the terminal and the error will be gone(code .), It is caused by some squishy bug so re-installing the module clears the bug. Commented Mar 29, 2021 at 13:14
  • How did you see the full error log? I can't find it any of the output windows.
    – trebor
    Commented Jul 2, 2021 at 18:25

20 Answers 20

113

I'm behind my company's proxy which I don't know the details because it's everything automatic, and this problem have bug me for some time.

I'm not sure whether this is an universal solution but according to this issue, the http.proxySupport setting is defaulting to "override".

I turn this setting off and the errors disappeared:

"http.proxySupport": "off"
5
  • 4
    This worked instantly. I didn't have to restart, close offending editors, or fiddle with stuff! Commented Jan 21, 2021 at 6:34
  • 2
    It worked instantly for me too. Then the next day the same warning pops up, I check the "http.proxySupport" setting and it's still off, I tutn it on and the warning disappears. Turning off that setting is definitely not the solution. (You can keep my upvote though)
    – opensorcio
    Commented Mar 15, 2023 at 22:37
  • In my case, the proxy support was hiding that the real problem was in settings.json. Turning it off showed the real problem. Once resolved, I reset the setting and everything was fine.
    – Faliorn
    Commented Mar 28, 2023 at 14:32
  • This worked for me, despite not having any proxy or not every having used one.
    – Laurent
    Commented Jul 24, 2023 at 8:12
  • Yay! This worked for me too, not using a proxy either but this setting obv was the issue.
    – CallyB
    Commented Aug 6, 2023 at 11:42
80

Just close your VsCode Editor and open it again. That should fix the error.

7
  • 1
    This work for the problem of initiating package without internet of loss of internet connection
    – Adesoft
    Commented Mar 12, 2022 at 8:12
  • 3
    IMHO this should be accepted answer! In most cases you do not manually configure proxies.
    – kaushalyap
    Commented Sep 20, 2022 at 5:11
  • The same "answer" (more like a comment) has been provided a year before this, in the comments of the question itself (up). There is no need to convert someone's comment, into an answer, without adding anything, and also doing this as year after.
    – vsync
    Commented Feb 9, 2023 at 9:44
  • 3
    @vsync I respectfully disagree. I didn't see this answer in the comments but I did find it here. Also answers in the comments cannot be marked as the correct answer. Commented Feb 9, 2023 at 17:46
  • 1
    i had this problem after syncing on github, btw, with ur solution the problem was gone!
    – Ali Safaei
    Commented Jun 8, 2023 at 11:04
69

Open User settings of visual studio code through the command palette:

  1. Press F1
  2. Type user settings.
  3. Select Preferences:Open User Settings from drop down
  4. Put below code and modify accordingly:
"http.proxy": "http://username:password@hostname:port/",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": true

enter image description here

4
  • This didn't help. VS Code v1.27.2 (user setup)
    – Dev
    Commented Oct 8, 2018 at 3:03
  • 1
    this solve my isssue on windows 7 and vscode v 1.31. Thanks. yes we need to restart the vscode after updating the settings.json
    – xkeshav
    Commented Feb 13, 2019 at 9:47
  • 1
    Thanks, this works on VS Code v1.50.1.0 with just "http.proxyAuthorization" and "http.proxyStrictSSL". I didn't add "http.proxy".
    – Adeola
    Commented Oct 28, 2020 at 8:58
  • 3
    worked only set the ("http.proxyAuthorization": null)
    – Cedric S.
    Commented Mar 19, 2021 at 14:19
57

I just turned off the checkbox schema download and the error goes away.

Press F1 and follow open user settings/user/extensions JSON

8
  • 20
    Unchecking und then checking it again worked for me...
    – Ini
    Commented May 17, 2021 at 21:21
  • 1
    @Ini this worked for me after I checked and unchecked on one project, but for the other, I had to do that and restart vsc for the warning to go away Commented Aug 28, 2021 at 8:52
  • 1
    "json.schemaDownload.enable": false in settings.json Commented Mar 15, 2022 at 14:39
  • Unchecked it and worked for me Commented Aug 24, 2022 at 12:32
  • 1
    Now there error in the Problems tab changed to: Problems loading reference 'json.schemastore.org/eslintrc': Unable to load schema from 'json.schemastore.org/eslintrc': Downloading schemas is disabled through setting 'json.schemaDownload.enable'.
    – vsync
    Commented Feb 9, 2023 at 9:47
26

I was facing following issue with Angular 6:

Problems loading reference 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load schema from 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to connect to https://schemastore.azurewebsites.net/schemas/json/package.json. Error: unable to get local issuer certificate

I added following properties at the end of the User Settings File and worked for me:

"http.proxy": "",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": false
3
  • Verified to be working on VS Code v1.27.2 (user setup)
    – Dev
    Commented Oct 8, 2018 at 3:04
  • Funny thing, is that I commented this code and the problem didn't return anymore.
    – Dev
    Commented Oct 8, 2018 at 3:13
  • This works if you are in a secure VED with no outside access.
    – httpete
    Commented Apr 12, 2019 at 13:55
24

Add this to your settings.json. Your problem will be solved! Plus this works for me.

"json.schemas": [
    {
      "fileMatch": ["/package.json"],
      "url": "https://json.schemastore.org/package",
      "schema": true
    }
  ]
2
12

I solved this issue by turning off proxy support in VS Code.

Open Settings and search for proxy support at the top. The only option shown should then be the one you want to switch from Override (which is the default) to off:

PS: You can also locate settings by pressing F1 and entering user settings.

enter image description here

7

Well i didnt like the idea to set "http.proxyStrictSSL": false, so i started searching, and i found this Issue on SchemaStore site from azure. After seeing this i concluded that my proxy was getting some problem with the certificate and authentication. What i did was change all "https" to "http" in the following session of package.json file(Mine was on this path: C:\Program Files\Microsoft VS Code\resources\app\extensions\typescript-basics\package.json).

"jsonValidation": [
  {
    "fileMatch": "tsconfig.json",
    "url": "http://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
  },
  {
    "fileMatch": "tsconfig.json",
    "url": "./schemas/tsconfig.schema.json"
  },
  {
    "fileMatch": "tsconfig.*.json",
    "url": "http://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
  },
  {
    "fileMatch": "tsconfig.*.json",
    "url": "./schemas/tsconfig.schema.json"
  },
  {
    "fileMatch": "typings.json",
    "url": "http://schemastore.azurewebsites.net/schemas/json/typings.json"
  }
]
5

please follow the step below to solve this problem:

  1. Open the folder where package.json file present
  2. Type npm install from cmd
  3. restart VS code or any IDE that you use.
2
  • 4
    Made no difference. Why do you think it would?
    – thoni56
    Commented Feb 12, 2019 at 1:00
  • 1
    Because a messd up package.json can lead to this issue. I'm personally experiencing a similar problem because in my project there's some version of some module that needs to be there but doesn't get along with some other module. In previous versions of the same project, with older modules version, we had no problem whatsoever, it was introduced by updating the modules
    – strongmmc
    Commented Aug 11, 2020 at 10:07
3

I tried every setting - the only one which works is adding this to settings.json:

  "json.schemas": [
    {
      "fileMatch": [
        "/package.json"
      ],
      "url": "https://json.schemastore.org/package",
      "schema": true
    },
  ]
}

Note, using the HTTP URL doesn't work - it just ignores the URL.

3

It's issue of opening the vs code using command line or any type of terminal

for avoid this issue.

Just restart the vs code or close the vs code and open again

2

If you still want the proxy support to work, just disable the proxyStrictSSL. Don't need to adjust other settings.

1
  • 1
    "http.proxyStrictSSL": false in settings.json Commented Mar 15, 2022 at 14:37
1

Add following code in setting.json file

    "http.proxy": "",
    "http.proxyStrictSSL": false

To Open setting.json file use the below step

  1. Press F1
  2. Type User Setting and then select Preferences:Open User Settings

Then click on Edit Setting.json link enter image description here

0
0

After banging my head against this for longer than I care to admit, I just needed to add the proxyAuthorization value for my Base64 encoded credentials, and did not need the proxy or proxyStrictSSL values.

I already had my proxy correctly configured in my environment variables. It only has the domain and port, not my credentials, ex. "HTTP_PROXY" "http://example.com:port/".

I used this C# code in LINQPad to get the proxyAuthorization value from my credentials:

var pw = "[email protected]:password";
var base64Encoded = Convert.ToBase64String(Encoding.UTF8.GetBytes(pw));
base64Encoded.Dump();

This is what I have in my user settings.json, using the encoded string from the above code dump.

"http.proxyAuthorization": "BASE64_ENCODED_VALUE"

Note: I believe that if I didn't need the full username with email address in the credentials for our proxy to let me out, I could have used an above solution. But since I did, this was the only way I could get it to work.

0

I`ve just delete this setting 😃

"http.proxy": "http://.......",
1
  • Review: it would be helpful if you mentioned the name and location of the settings file. Otherwise: OK
    – H.Hasenack
    Commented Dec 27, 2020 at 12:07
0

For me this works the Azure Storage Emulator stopped working ;-(

To start the Azure Storage Emulator:

Select the Start button or press the Windows key.
Begin typing Azure Storage Emulator.
Select the emulator from the list of displayed applications.

https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator

just do the 3

in CMD

AzureStorageEmulator.exe init         
AzureStorageEmulator.exe start      
AzureStorageEmulator.exe status     

BAM all worked

0

you need your server up and running in order to load schema from https://json.schemastore.org/stylelintrc.json, seems your server is off that is why you are getting this error.

0

delete .dart_tool folder in project root. After than reload visual stodio code.

resolved my issue: "name" marked with red line.

Unable to load schema from 'https://json.schemastore.org/pubspec.json': Request vscode/content failed unexpectedly without providing any details.YAML(768)

0

While working on a WordPress theme, I could't get the schema validator to work.

This is what worked for me:

  • I copied the the schema validator directly from GitHub
  • created a theme.json file and paste it in there
  • provided the path to the validator file as the URL like this:
{
  "$schema": "/Users/user/Desktop/projects/wp-references/theme.json",
}

Hope that helps someone too!

-1

for me turns out that the problem was due to terminal.integrated.shell.windows being deprecated in VSCode. these are the steps i followed to fix it :

  • Open command palette (CTRL + Shift + P)
  • Search "Preferences: Open "User Settings" (the JSON file)"
  • find this field => terminal.integrated.shell.windows delete it and type this instead inside of "terminal.integrated.profiles.windows":
  "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell"
  },
  "Command Prompt": {
    "path": [
      "${env:windir}\\Sysnative\\cmd.exe",
      "${env:windir}\\System32\\cmd.exe"
    ],
    "args": [],
    "icon": "terminal-cmd"
  },
  "Git Bash": {
    "source": "Git Bash"
  }
},```

if you want to disable PowerShell, just set its value to null

Not the answer you're looking for? Browse other questions tagged or ask your own question.