sublimelsp / LSP-json

Schema validation/completions for your JSON and Sublime files
MIT License
72 stars 9 forks source link

Crash with malformed userSchemas setting #48

Closed AmjadHD closed 4 years ago

AmjadHD commented 4 years ago

This is how i triggered it the first time:

  1. in User/LSP-json.sublime-settings add the following:
    {
    "userSchemas":
    [
        {
            "fileMatch": ["pyrightconfig.json"],
            "url": "https://raw.githubusercontent.com/microsoft/pyright/master/client/schemas/pyrightconfig.schema.json"
        }
    ]
    }

    note the typo "url" instead of "uri"

  2. In an open project folder add a pyrightconfig.json file
  3. open it and start typing

Log

log ``` :: --> lsp-json initialize(1): {'capabilities': {'workspace': {'applyEdit': True, 'workspaceEdit': {'documentChanges': True, 'failureHandling': 'abort'}, 'executeCommand': {}, 'configuration': True, 'symbol': {'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'workspaceFolders': True}, 'experimental': {}, 'window': {'workDoneProgress': True}, 'textDocument': {'definition': {'linkSupport': True, 'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'documentHighlight': {'dynamicRegistration': True}, 'typeDefinition': {'linkSupport': True, 'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'symbolKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, 'dynamicRegistration': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': []}}, 'dynamicRegistration': True}, 'declaration': {'linkSupport': True, 'dynamicRegistration': True}, 'implementation': {'linkSupport': True, 'dynamicRegistration': True}, 'publishDiagnostics': {'relatedInformation': True}, 'hover': {'contentFormat': ['markdown', 'plaintext'], 'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}, 'synchronization': {'willSave': True, 'willSaveWaitUntil': True, 'didSave': True, 'dynamicRegistration': True}, 'completion': {'completionItem': {'snippetSupport': True}, 'completionItemKind': {'valueSet': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, 'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'signatureHelp': {'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': True}}}, 'clientInfo': {'name': 'Sublime Text LSP', 'version': '0.11.4'}, 'processId': 4936, 'initializationOptions': {'customCapabilities': {'rangeFormatting': {'editLimit': 1000}}, 'provideFormatter': True}, 'rootPath': 'C:\\Users\\Lehdhili\\AppData\\Roaming\\Sublime Text 3\\Packages\\LSP-json', 'workspaceFolders': [{'name': 'LSP-json', 'uri': 'file:///C:/Users/Lehdhili/AppData/Roaming/Sublime%20Text%203/Packages/LSP-json'}, {'name': 'sublime_lib', 'uri': 'file:///C:/Users/Lehdhili/AppData/Roaming/Sublime%20Text%203/Packages/sublime_lib/st3/sublime_lib'}], 'rootUri': 'file:///C:/Users/Lehdhili/AppData/Roaming/Sublime%20Text%203/Packages/LSP-json'} :: <<< lsp-json 1: {'capabilities': {'textDocumentSync': 2, 'colorProvider': {}, 'foldingRangeProvider': True, 'documentRangeFormattingProvider': True, 'selectionRangeProvider': True, 'definitionProvider': True, 'hoverProvider': True, 'documentSymbolProvider': True, 'completionProvider': {'resolveProvider': False, 'triggerCharacters': ['"', ':']}}} :: -> lsp-json initialized: {} :: -> lsp-json workspace/didChangeConfiguration: {'settings': {'json': {'resultLimit': 5000, 'format': {'enable': True}}}} :: -> lsp-json textDocument/didOpen :: --> lsp-json textDocument/documentColor(2): {'textDocument': {'uri': 'file:///C:/Users/Lehdhili/AppData/Roaming/Sublime%20Text%203/Packages/LSP-json/pyrightconfig.json'}} :: <<< lsp-json 2: [] :: -> lsp-json json/schemaAssociations: [{'fileMatch': ['/*.sublime-build'], 'uri': 'sublime://schemas/sublime-build'}, {'fileMatch': ['/*.sublime-color-scheme', '/*.hidden-color-scheme'], 'uri': 'sublime://schemas/sublime-color-scheme'}, {'fileMatch': ['/*.sublime-commands'], 'uri': 'sublime://schemas/sublime-commands'}, {'fileMatch': ['/*.sublime-completions'], 'uri': 'sublime://schemas/sublime-completions'}, {'fileMatch': ['/*.sublime-keymap'], 'uri': 'sublime://schemas/sublime-keymap'}, {'fileMatch': ['/*.sublime-macro'], 'uri': 'sublime://schemas/sublime-macro'}, {'fileMatch': ['/*.sublime-menu'], 'uri': 'sublime://schemas/sublime-menu'}, {'fileMatch': ['/*.sublime-mousemap'], 'uri': 'sublime://schemas/sublime-mousemap'}, {'fileMatch': ['/*.sublime-project'], 'uri': 'sublime://schemas/sublime-project'}, {'fileMatch': ['/*.sublime-settings'], 'uri': 'sublime://schemas/sublime-settings'}, {'fileMatch': ['/*.sublime-theme', '/*.hidden-theme'], 'uri': 'sublime://schemas/sublime-theme'}, {'fileMatch': ['/.vscode/*.json'], 'uri': 'sublime://schemas/vscode-base'}, {'fileMatch': ['/package.json'], 'uri': 'sublime://schemas/package-json-eslint'}, {'fileMatch': ['/Preferences.sublime-settings', '/Preferences%20%28Linux%29.sublime-settings', '/Preferences%20%28OSX%29.sublime-settings', '/Preferences%20%28Windows%29.sublime-settings'], 'uri': 'sublime://schemas/preferences.sublime-settings'}, {'fileMatch': ['/sublime-package.json'], 'uri': 'sublime://schemas/sublime-package-schema'}, {'fileMatch': ['/tsconfig.json', '/tsconfig.*.json', '/tsconfig-*.json'], 'uri': 'sublime://schemas/tsconfig'}, {'fileMatch': ['/jsconfig.json', '/jsconfig.*.json'], 'uri': 'sublime://schemas/jsconfig'}, {'uri': 'sublime://schemas/json-with-comments'}, {'fileMatch': ['/.angular-cli.json', '/angular-cli.json'], 'uri': 'https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular/cli/lib/config/schema.json'}, {'fileMatch': ['/apple-app-site-association'], 'uri': 'https://json.schemastore.org/apple-app-site-association'}, {'fileMatch': ['/appsscript.json'], 'uri': 'https://json.schemastore.org/appsscript'}, {'fileMatch': ['/appsettings.json', '/appsettings.*.json'], 'uri': 'https://json.schemastore.org/appsettings'}, {'fileMatch': ['/arc.json'], 'uri': 'https://raw.githubusercontent.com/architect/parser/master/schema.json'}, {'fileMatch': ['/.avsc'], 'uri': 'https://json.schemastore.org/avro-avsc'}, {'fileMatch': ['/deployment.template.json', '/deployment.*.template.json'], 'uri': 'https://json.schemastore.org/azure-iot-edge-deployment-template-2.0'}, {'fileMatch': ['/manifest.json'], 'uri': 'https://json.schemastore.org/foxx-manifest'}, {'fileMatch': ['/*.asmdef'], 'uri': 'https://json.schemastore.org/asmdef'}, {'fileMatch': ['/.babelrc', '/babel.config.json'], 'uri': 'https://json.schemastore.org/babelrc'}, {'fileMatch': ['/.backportrc.json'], 'uri': 'https://json.schemastore.org/backportrc'}, {'fileMatch': ['/.bootstraprc'], 'uri': 'https://json.schemastore.org/bootstraprc'}, {'fileMatch': ['/bower.json', '/.bower.json'], 'uri': 'https://json.schemastore.org/bower'}, {'fileMatch': ['/.bowerrc'], 'uri': 'https://json.schemastore.org/bowerrc'}, {'fileMatch': ['/.suite.json', '/.xsuite.json'], 'uri': 'https://json.schemastore.org/bozr'}, {'fileMatch': ['/bsconfig.json'], 'uri': 'https://bucklescript.github.io/bucklescript/docson/build-schema.json'}, {'fileMatch': ['/buildkite.json', '/buildkite.*.json', '/.buildkite/pipeline.json', '/.buildkite/pipeline.*.json'], 'uri': 'https://raw.githubusercontent.com/buildkite/pipeline-schema/master/schema.json'}, {'fileMatch': ['/bundleconfig.json'], 'uri': 'https://json.schemastore.org/bundleconfig'}, {'fileMatch': ['/.clasp.json'], 'uri': 'https://json.schemastore.org/clasp'}, {'fileMatch': ['/compilerconfig.json'], 'uri': 'https://json.schemastore.org/compilerconfig'}, {'fileMatch': ['/compile_commands.json'], 'uri': 'https://json.schemastore.org/compile-commands'}, {'fileMatch': ['/commands.json'], 'uri': 'https://json.schemastore.org/commands'}, {'fileMatch': ['/cosmos.config.json'], 'uri': 'https://json.schemastore.org/cosmos-config'}, {'fileMatch': ['/chutzpah.json'], 'uri': 'https://json.schemastore.org/chutzpah'}, {'fileMatch': ['/contentmanifest.json'], 'uri': 'https://json.schemastore.org/vsix-manifestinjection'}, {'fileMatch': ['/cloudbuild.json', '/*.cloudbuild.json'], 'uri': 'https://json.schemastore.org/cloudbuild'}, {'fileMatch': ['/*.cf.json', '/cloudformation.json'], 'uri': 'https://raw.githubusercontent.com/awslabs/goformation/master/schema/cloudformation.schema.json'}, {'fileMatch': ['/*.sam.json', '/sam.json'], 'uri': 'https://raw.githubusercontent.com/awslabs/goformation/master/schema/sam.schema.json'}, {'fileMatch': ['/coffeelint.json'], 'uri': 'https://json.schemastore.org/coffeelint'}, {'fileMatch': ['/composer.json'], 'uri': 'https://json.schemastore.org/composer'}, {'fileMatch': ['/component.json'], 'uri': 'https://json.schemastore.org/component'}, {'fileMatch': ['/config.json'], 'uri': 'https://json.schemastore.org/config'}, {'fileMatch': ['/contribute.json'], 'uri': 'https://json.schemastore.org/contribute'}, {'fileMatch': ['/cypress.json'], 'uri': 'https://raw.githubusercontent.com/cypress-io/cypress/develop/cli/schema/cypress.schema.json'}, {'fileMatch': ['/.creatomic'], 'uri': 'https://json.schemastore.org/creatomic'}, {'fileMatch': ['/.cspell.json', '/cspell.json', '/cSpell.json'], 'uri': 'https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json'}, {'fileMatch': ['/.csscomb.json'], 'uri': 'https://json.schemastore.org/csscomb'}, {'fileMatch': ['/.csslintrc'], 'uri': 'https://json.schemastore.org/csslintrc'}, {'fileMatch': ['/.dla.json'], 'uri': 'https://json.schemastore.org/datalogic-scan2deploy-android'}, {'fileMatch': ['/.dlc.json'], 'uri': 'https://json.schemastore.org/datalogic-scan2deploy-ce'}, {'fileMatch': ['/debugsettings.json'], 'uri': 'https://json.schemastore.org/debugsettings'}, {'fileMatch': ['/docfx.json'], 'uri': 'https://json.schemastore.org/docfx'}, {'fileMatch': ['/.dolittle/artifacts.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/DotNET.SDK/master/Schemas/Artifacts.Configuration/artifacts.json'}, {'fileMatch': ['/bounded-context.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Applications.Configuration/bounded-context.json'}, {'fileMatch': ['/.dolittle/event-horizons.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Events/event-horizons.json'}, {'fileMatch': ['/.dolittle/resources.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/DotNET.Fundamentals/master/Schemas/ResourceTypes.Configuration/resources.json'}, {'fileMatch': ['/.dolittle/server.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Server/server.json'}, {'fileMatch': ['/.dolittle/tenants.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Tenancy/tenants.json'}, {'fileMatch': ['/.dolittle/tenant-map.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/DotNET.Fundamentals/master/Schemas/Tenancy.Configuration/tenant-map.json'}, {'fileMatch': ['/.dolittle/topology.json'], 'uri': 'https://raw.githubusercontent.com/dolittle/DotNET.SDK/master/Schemas/Applications.Configuration/topology.json'}, {'fileMatch': ['/dotnetcli.host.json'], 'uri': 'https://json.schemastore.org/dotnetcli.host'}, {'fileMatch': ['/epr-manifest.json'], 'uri': 'https://json.schemastore.org/epr-manifest'}, {'fileMatch': ['/electron-builder.json'], 'uri': 'https://json.schemastore.org/electron-builder'}, {'fileMatch': ['/app.json'], 'uri': 'https://json.schemastore.org/expo-37.0.0.json'}, {'fileMatch': ['/.eslintrc', '/.eslintrc.json'], 'uri': 'https://json.schemastore.org/eslintrc'}, {'fileMatch': ['/fabric.mod.json'], 'uri': 'https://json.schemastore.org/fabric.mod.json'}, {'fileMatch': ['/fantomas-config.json'], 'uri': 'https://json.schemastore.org/fantomas'}, {'fileMatch': ['/function.json'], 'uri': 'https://json.schemastore.org/function'}, {'fileMatch': ['/gitversion.json'], 'uri': 'https://json.schemastore.org/gitversion'}, {'fileMatch': ['/global.json'], 'uri': 'https://json.schemastore.org/global'}, {'fileMatch': ['/.meshrc.json', '/.meshrc.js'], 'uri': 'https://raw.githubusercontent.com/Urigo/graphql-mesh/master/packages/types/src/config-schema.json'}, {'fileMatch': ['/graphql.config.json', '/graphql.config.js', '/.graphqlrc', '/.graphqlrc.json', '/.graphqlrc.js'], 'uri': 'https://raw.githubusercontent.com/kamilkisiela/graphql-config/master/config-schema.json'}, {'fileMatch': ['/codegen.json', '/codegen.js', '/.codegen.json', '/.codegen.js'], 'uri': 'https://raw.githubusercontent.com/dotansimha/graphql-code-generator/master/website/static/config.schema.json'}, {'fileMatch': ['/copy.json'], 'uri': 'https://json.schemastore.org/grunt-copy-task'}, {'fileMatch': ['/clean.json'], 'uri': 'https://json.schemastore.org/grunt-clean-task'}, {'fileMatch': ['/cssmin.json'], 'uri': 'https://json.schemastore.org/grunt-cssmin-task'}, {'fileMatch': ['/jshint.json'], 'uri': 'https://json.schemastore.org/grunt-jshint-task'}, {'fileMatch': ['/watch.json'], 'uri': 'https://json.schemastore.org/grunt-watch-task'}, {'fileMatch': ['/grunt/*.json', '/*-tasks.json'], 'uri': 'https://json.schemastore.org/grunt-task'}, {'fileMatch': ['/haxelib.json'], 'uri': 'https://json.schemastore.org/haxelib'}, {'fileMatch': ['/host.json'], 'uri': 'https://json.schemastore.org/host'}, {'fileMatch': ['/host-meta.json'], 'uri': 'https://json.schemastore.org/host-meta'}, {'fileMatch': ['/.htmlhintrc'], 'uri': 'https://json.schemastore.org/htmlhint'}, {'fileMatch': ['/imageoptimizer.json'], 'uri': 'https://json.schemastore.org/imageoptimizer'}, {'fileMatch': ['/.jsbeautifyrc'], 'uri': 'https://json.schemastore.org/jsbeautifyrc'}, {'fileMatch': ['/.jsbeautifyrc'], 'uri': 'https://json.schemastore.org/jsbeautifyrc-nested'}, {'fileMatch': ['/.jscsrc', '/jscsrc.json'], 'uri': 'https://json.schemastore.org/jscsrc'}, {'fileMatch': ['/.jshintrc'], 'uri': 'https://json.schemastore.org/jshintrc'}, {'fileMatch': ['/.jsinspectrc'], 'uri': 'https://json.schemastore.org/jsinspectrc'}, {'fileMatch': ['/*.schema.json'], 'uri': 'https://jsonapi.org/schema'}, {'fileMatch': ['/feed.json'], 'uri': 'https://json.schemastore.org/feed'}, {'fileMatch': ['/*.jsonld'], 'uri': 'https://json.schemastore.org/jsonld'}, {'fileMatch': ['/*.patch'], 'uri': 'https://json.schemastore.org/json-patch'}, {'fileMatch': ['/jsconfig.json'], 'uri': 'https://json.schemastore.org/jsconfig'}, {'fileMatch': ['/launchsettings.json'], 'uri': 'https://json.schemastore.org/launchsettings'}, {'fileMatch': ['/lerna.json'], 'uri': 'https://json.schemastore.org/lerna'}, {'fileMatch': ['/libman.json'], 'uri': 'https://json.schemastore.org/libman'}, {'fileMatch': ['/localazy.json'], 'uri': 'https://raw.githubusercontent.com/localazy/cli-schema/master/localazy.json'}, {'fileMatch': ['/*.lsdl.json'], 'uri': 'https://json.schemastore.org/lsdlschema'}, {'fileMatch': ['/mimetypes.json'], 'uri': 'https://json.schemastore.org/mimetypes'}, {'fileMatch': ['/.modernizrrc'], 'uri': 'https://json.schemastore.org/modernizrrc'}, {'fileMatch': ['/mycode.json'], 'uri': 'https://json.schemastore.org/mycode'}, {'fileMatch': ['/.nestcli.json', '/.nest-cli.json', '/nest-cli.json', '/nest.json'], 'uri': 'https://json.schemastore.org/nest-cli'}, {'fileMatch': ['/.nodehawkrc'], 'uri': 'https://json.schemastore.org/nodehawkrc'}, {'fileMatch': ['/nodemon.json'], 'uri': 'https://json.schemastore.org/nodemon'}, {'fileMatch': ['/.npmpackagejsonlintrc', '/npmpackagejsonlintrc.json', '/.npmpackagejsonlintrc.json'], 'uri': 'https://json.schemastore.org/npmpackagejsonlintrc'}, {'fileMatch': ['/nswag.json'], 'uri': 'https://json.schemastore.org/nswag'}, {'fileMatch': ['/ocelot.json'], 'uri': 'https://json.schemastore.org/ocelot'}, {'fileMatch': ['/omnisharp.json'], 'uri': 'https://json.schemastore.org/omnisharp'}, {'fileMatch': ['/openapi.json'], 'uri': 'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json'}, {'fileMatch': ['/kratos.json'], 'uri': 'https://raw.githubusercontent.com/ory/kratos/master/.schema/version.schema.json'}, {'fileMatch': ['/package.json'], 'uri': 'https://json.schemastore.org/package'}, {'fileMatch': ['/package.manifest'], 'uri': 'https://json.schemastore.org/package.manifest'}, {'fileMatch': ['/pattern.json'], 'uri': 'https://json.schemastore.org/pattern'}, {'fileMatch': ['/.prettierrc', '/.prettierrc.json'], 'uri': 'https://json.schemastore.org/prettierrc'}, {'fileMatch': ['/project.json'], 'uri': 'https://json.schemastore.org/project'}, {'fileMatch': ['/*.rules'], 'uri': 'https://json.schemastore.org/prometheus.rules'}, {'fileMatch': ['/proxies.json'], 'uri': 'https://json.schemastore.org/proxies'}, {'fileMatch': ['/pyrseas-0.8.json'], 'uri': 'https://json.schemastore.org/pyrseas-0.8'}, {'fileMatch': ['/*.resjson'], 'uri': 'https://json.schemastore.org/resjson'}, {'fileMatch': ['/resume.json'], 'uri': 'https://json.schemastore.org/resume'}, {'fileMatch': ['/renovate.json', '/renovate.json5', '/.github/renovate.json', '/.github/renovate.json5', '/.renovaterc', '/.renovaterc.json'], 'uri': 'https://docs.renovatebot.com/renovate-schema.json'}, {'fileMatch': ['/settings.job'], 'uri': 'https://json.schemastore.org/settings.job'}, {'fileMatch': ['/skyuxconfig.json', '/skyuxconfig.*.json'], 'uri': 'https://raw.githubusercontent.com/blackbaud/skyux-builder/master/skyuxconfig-schema.json'}, {'fileMatch': ['/.solidarity', '/.solidarity.json'], 'uri': 'https://json.schemastore.org/solidaritySchema'}, {'fileMatch': ['/*.map'], 'uri': 'https://json.schemastore.org/sourcemap-v3'}, {'fileMatch': ['/*.mixins.json'], 'uri': 'https://json.schemastore.org/sponge-mixins'}, {'fileMatch': ['/*.sprite'], 'uri': 'https://json.schemastore.org/sprite'}, {'fileMatch': ['/stryker.conf.json', '/stryker-*.conf.json'], 'uri': 'https://raw.githubusercontent.com/stryker-mutator/stryker/master/packages/api/schema/stryker-core.json'}, {'fileMatch': ['/stylecop.json'], 'uri': 'https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json'}, {'fileMatch': ['/.stylelintrc', '/stylelintrc.json', '/.stylelintrc.json'], 'uri': 'https://json.schemastore.org/stylelintrc'}, {'fileMatch': ['/swagger.json'], 'uri': 'https://json.schemastore.org/swagger-2.0'}, {'fileMatch': ['/.template.config/template.json'], 'uri': 'https://json.schemastore.org/template'}, {'fileMatch': ['/templatesources.json'], 'uri': 'https://json.schemastore.org/templatesources'}, {'fileMatch': ['/*.tmLanguage.json'], 'uri': 'https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json'}, {'fileMatch': ['/tsconfig.json'], 'uri': 'https://json.schemastore.org/tsconfig'}, {'fileMatch': ['/tsd.json'], 'uri': 'https://json.schemastore.org/tsd'}, {'fileMatch': ['/.tsdrc'], 'uri': 'https://json.schemastore.org/tsdrc'}, {'fileMatch': ['/ts-force-config.json'], 'uri': 'https://json.schemastore.org/ts-force-config'}, {'fileMatch': ['/tslint.json'], 'uri': 'https://json.schemastore.org/tslint'}, {'fileMatch': ['/typewiz.json'], 'uri': 'https://json.schemastore.org/typewiz'}, {'fileMatch': ['/typings.json'], 'uri': 'https://json.schemastore.org/typings'}, {'fileMatch': ['/.typingsrc'], 'uri': 'https://json.schemastore.org/typingsrc'}, {'fileMatch': ['/up.json'], 'uri': 'https://json.schemastore.org/up.json'}, {'fileMatch': ['/.manifest'], 'uri': 'https://json.schemastore.org/ui5-manifest'}, {'fileMatch': ['/webapp/manifest.json', '/src/main/webapp/manifest.json'], 'uri': 'https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json'}, {'fileMatch': ['/*.vg', '/*.vg.json'], 'uri': 'https://json.schemastore.org/vega'}, {'fileMatch': ['/*.vl', '/*.vl.json'], 'uri': 'https://json.schemastore.org/vega-lite'}, {'fileMatch': ['/version.json'], 'uri': 'https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json'}, {'fileMatch': ['/*vim*/addon-info.json'], 'uri': 'https://json.schemastore.org/vim-addon-info'}, {'fileMatch': ['/.vsls.json'], 'uri': 'https://json.schemastore.org/vsls'}, {'fileMatch': ['/vs-2017.3.host.json'], 'uri': 'https://json.schemastore.org/vs-2017.3.host'}, {'fileMatch': ['/*.filenesting.json', '/.filenesting.json'], 'uri': 'https://json.schemastore.org/vs-nesting'}, {'fileMatch': ['/*.vsconfig'], 'uri': 'https://json.schemastore.org/vsconfig'}, {'fileMatch': ['/*.vsext'], 'uri': 'https://json.schemastore.org/vsext'}, {'fileMatch': ['/vs-publish.json'], 'uri': 'https://json.schemastore.org/vsix-publish'}, {'fileMatch': ['/vss-extension.json'], 'uri': 'https://json.schemastore.org/vss-extension'}, {'fileMatch': ['/manifest.json'], 'uri': 'https://json.schemastore.org/webextension'}, {'fileMatch': ['/manifest.json', '/*.webmanifest'], 'uri': 'https://json.schemastore.org/web-manifest'}, {'fileMatch': ['/webjobs-list.json'], 'uri': 'https://json.schemastore.org/webjobs-list'}, {'fileMatch': ['/webjobpublishsettings.json'], 'uri': 'https://json.schemastore.org/webjob-publish-settings'}, {'fileMatch': ['/web-types.json', '/*.web-types.json'], 'uri': 'https://json.schemastore.org/web-types'}, {'fileMatch': ['/*.version'], 'uri': 'https://raw.githubusercontent.com/linuxgurugamer/KSPAddonVersionChecker/master/KSP-AVC.schema.json'}, {'fileMatch': ['/*.ckan'], 'uri': 'https://raw.githubusercontent.com/KSP-CKAN/CKAN/master/CKAN.schema'}, {'fileMatch': ['/xunit.runner.json'], 'uri': 'https://json.schemastore.org/xunit.runner.schema'}, {'fileMatch': ['/*.servicehub.service.json'], 'uri': 'https://json.schemastore.org/servicehub.service.schema'}, {'fileMatch': ['/servicehub.config.json'], 'uri': 'https://json.schemastore.org/servicehub.config.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj.52.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj.53.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj.54.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj.55.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj.dev.schema'}, {'fileMatch': ['/*.cryproj'], 'uri': 'https://json.schemastore.org/cryproj'}, {'fileMatch': ['/typedoc.json'], 'uri': 'https://json.schemastore.org/typedoc'}, {'fileMatch': ['/.huskyrc', '/.huskyrc.json'], 'uri': 'https://json.schemastore.org/huskyrc'}, {'fileMatch': ['/.lintstagedrc', '/.lintstagedrc.json'], 'uri': 'https://json.schemastore.org/lintstagedrc.schema'}, {'fileMatch': ['/*.mtaext'], 'uri': 'https://json.schemastore.org/mtaext'}, {'fileMatch': ['/xs-app.json'], 'uri': 'https://json.schemastore.org/xs-app.json'}, {'fileMatch': ['/hemtt.json', '/hemtt.toml'], 'uri': 'https://json.schemastore.org/hemtt-0.6.2'}, {'fileMatch': ['/now.json'], 'uri': 'https://json.schemastore.org/now'}, {'fileMatch': ['/BizTalkServerInventory.json'], 'uri': 'https://json.schemastore.org/BizTalkServerApplicationSchema'}, {'fileMatch': ['/.httpmockrc', '/.httpmock.json'], 'uri': 'https://json.schemastore.org/httpmockrc'}, {'fileMatch': ['/.nl.json', '/.neoload.json'], 'uri': 'https://raw.githubusercontent.com/Neotys-Labs/neoload-cli/master/resources/as-code.latest.schema.json'}, {'fileMatch': ['/*.har'], 'uri': 'https://raw.githubusercontent.com/ahmadnassri/har-schema/master/lib/har.json'}, {'fileMatch': ['/conf.js*', '/jsdoc.js*'], 'uri': 'https://json.schemastore.org/jsdoc-1.0.0'}, {'fileMatch': ['/.commitlintrc', '/.commitlintrc.json'], 'uri': 'https://json.schemastore.org/commitlintrc'}, {'fileMatch': ['/*.tokenlist.json'], 'uri': 'https://uniswap.org/tokenlist.schema.json'}, {'fileMatch': ['/**/*devinit*.json'], 'uri': 'https://json.schemastore.org/devinit.schema-1.0'}, {'fileMatch': ['/LSP-json.sublime-settings'], 'uri': 'sublime://settings/0'}, {'url': 'https://raw.githubusercontent.com/microsoft/pyright/master/client/schemas/pyrightconfig.schema.json', 'fileMatch': ['pyrightconfig.json']}] lsp-json: C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\out\jsonServer.js:51 lsp-json: const protocol = uri.substr(0, uri.indexOf(':')); lsp-json: ^ lsp-json: lsp-json: TypeError: Cannot read property 'substr' of undefined lsp-json: at JSONSchemaService.requestService (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\out\jsonServer.js:51:34) lsp-json: at JSONSchemaService.loadSchema (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\node_modules\vscode-json-languageservice\lib\umd\services\jsonSchemaService.js:268:25) lsp-json: at SchemaHandle.getUnresolvedSchema (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\node_modules\vscode-json-languageservice\lib\umd\services\jsonSchemaService.js:71:54) lsp-json: at SchemaHandle.getResolvedSchema (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\node_modules\vscode-json-languageservice\lib\umd\services\jsonSchemaService.js:78:44) lsp-json: at JSONSchemaService.getSchemaForResource (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\node_modules\vscode-json-languageservice\lib\umd\services\jsonSchemaService.js:471:100) lsp-json: at JSONValidation.doValidation (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\node_modules\vscode-json-languageservice\lib\umd\services\jsonValidation.js:102:43) lsp-json: at validateTextDocument (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\out\jsonServer.js:286:25) lsp-json: at Timeout._onTimeout (C:\Users\Lehdhili\AppData\Local\Sublime Text 3\Cache\LSP-json\language-server\out\jsonServer.js:269:13) lsp-json: at listOnTimeout (internal/timers.js:551:17) lsp-json: at processTimers (internal/timers.js:494:7) ```

ST: 3211

rchl commented 4 years ago

How would you expect this to be handled?

Crash is maybe better than silently ignoring the problem?

AmjadHD commented 4 years ago

After thinking about it, yeah probably you're right.

rchl commented 4 years ago

Also, since LSP-json includes schema for its settings file, using a wrong property name will give a warning in the editor so I think that this should be enough.