Unable to load schema from vscode://schemas/settings/folder

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
4 min

banner

# Unable to load schema from vscode://schemas/settings/folder

The VS Code warning "Unable to load schema from 'vscode://schemas/settings/folder': cannot open vscode://schemas/settings/folder." occurs due to schema registration issues, most commonly in settings.json.

To resolve the issue, try to set a dummy key to a default value in your settings.json file.

unable to load schema from vscode cannot open

Here is the complete error message.

shell
Unable to load schema from 'vscode://schemas/settings/folder': cannot open vscode://schemas/settings/folder. Detail: Unable to resolve text model content for resource vscode://schemas/settings/folder. (768)

In your settings.json file, try to set a dummy key to a default value, save the file and see if the warning disappears.

For example, you can add the following key at the top of your settings.json file.

settings.json
{ "json.schemaDownload.enable": true, }

add key with default value into settings json

Save the file after adding the key at the top of your settings.json file.

The warning was shown in my .vscode/settings.json file, so that's where I added the extra key.

I've also written an article on how to open settings.json in VS Code

The key-value pair is not important. You could simply try to change the value of a certain key back and forth and save the file, e.g.:

  1. Change the value of a key from true to false.
  2. Save the settings.json file.
  3. Change the value back to true.
  4. Save the file.
  5. See if the warning disappears.

Note that you might have to do this every time you restart VS Code.

You can also try to comment out a line, save the file and uncomment the line again.

As shown in this GitHub issue, the VS Code team is currently working to fix the bug.

# Setting json.validate.enable to false in settings.json

If the issue persists, try to set the json.validate.enable key to false in your settings.json file.

The key is used to enable or disable JSON validation.

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the following key-value pair.
settings.json
{ "json.validate.enable": false, }

setting json validate enable to false in settings json

Make sure to remove the trailing comma if the property comes last.

# Try to close the tab of the file that caused the issue

If the issue persists, try to:

  1. Close the VS Code tab of the file that causes the issue.
  2. Close VS Code.
  3. Reopen the tab and see if the warning reappears.

If the issue persists, try to toggle a key-value pair in your JSON file.

For example, if you got the warning in your settings.json file, set the following property.

settings.json
{ "json.schemaDownload.enable": true, }

add key with default value into settings json

Save the file after adding the key at the top of your settings.json file.

The key-value pair is not important. You could simply try to change the value of a certain key back and forth and save the file, e.g.:

  1. Change the value of a key from true to false.
  2. Save the settings.json file.
  3. Change the value back to true.
  4. Save the file.
  5. See if the warning disappears.

Note that you might have to do this every time you restart VS Code.

You can also try to:

  1. Comment out a line by pressing Ctrl + /.
  2. Save the file.
  3. See if the warning disappears.
  4. Uncomment the line and save the file again.

# Set the http.proxySupport setting to off

The warning is also caused due to proxy issues.

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the following key-value pairs.
settings.json
{ "http.proxySupport": "off", "http.proxyStrictSSL": false }

disable proxy support

Setting the http.proxySupport key to off disables proxy support for extensions.

If the issue persists, try to close VS Code completely and reopen it.

If you work behind your company's proxy and know the authentication details, you can specify them in your settings.json file as follows.

settings.json
{ "http.proxy": "http://username:password@hostname:port/", "http.proxyAuthorization": null, "http.proxyStrictSSL": true }

# Enable/Disable the Schema download setting

If the issue persists:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type schema download into the search field.

  2. Try to check or uncheck the JSON Schema Download: Enable checkbox.

  • If the checkbox is checked, try to uncheck it and see if the warning disappears.

  • If the checkbox is unchecked, try to check it and see if the warning disappears.

enable disable schema download

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.