All of my .json files have problems loading reference/schema from schemastore.azurewebsites.net
JsonVisual Studio-CodeJson Problem Overview
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
Json Solutions
Solution 1 - Json
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"
Solution 2 - Json
Open User settings of visual studio code through the command palette:
- Press F1
- Type
user settings
. - Select
Preferences:Open User Settings
from drop down - Put below code and modify accordingly
> "http.proxy": "http://username:password@hostname:port/";, > "http.proxyAuthorization": null, > "http.proxyStrictSSL": true
Solution 3 - Json
Just close your VsCode Editor and open it again. That should fix the error.
Solution 4 - Json
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
Solution 5 - Json
I just turned off checkbox schema download
and error gone.
Press F1 and follow open user settings/user/extentions/JSON
Solution 6 - Json
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"
}
]
Solution 7 - Json
Add this to your setting.json. Your problem will be solved! Plus this works for me.
"json.schemas": [
{
"fileMatch": ["/package.json"],
"url": "https://json.schemastore.org/package",
"schema": true
}
]
Solution 8 - Json
please follow the step below to solve this problem:
- Open the folder where package.json file present
- Type
npm install
from cmd - restart VS code or any IDE that you use.
Solution 9 - Json
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.
Solution 10 - Json
If you still want the proxy support to work, just disable the proxyStrictSSL
. Don't need to adjust other settings.
Solution 11 - Json
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.
Solution 12 - Json
I`ve just delete this setting
"http.proxy": "http://.......",
Solution 13 - Json
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://docs.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
Solution 14 - Json
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.
Solution 15 - Json
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