{"record":{"id":"9e63f5fdc376aee1","repo":"neoclide/coc.nvim","slug":"url-is-not-supported-coc-nvim-support-github","errorCode":null,"errorMessage":"\"${url}\" is not supported, coc.nvim support github.com only","messagePattern":"\"(.+?)\" is not supported, coc\\.nvim support github\\.com only","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/extension/installer.ts","lineNumber":252,"sourceCode":"    if (!obj) throw new Error(`${this.def} doesn't exists in ${registry}.`)\n    let requiredVersion = obj['engines'] && obj['engines']['coc']\n    if (!requiredVersion) throw new Error(`${this.def} is not a valid coc extension, \"engines\" field with coc property required.`)\n    extensionPath(this.root, res.name)\n    return {\n      'dist.tarball': obj['dist']['tarball'],\n      'engines.coc': requiredVersion,\n      version: obj['version'],\n      name: res.name\n    } as Info\n  }\n\n  public async getInfoFromUri(): Promise<Info> {\n    let { url } = this\n    let repository: URL\n    try {\n      repository = new URL(url)\n    } catch (_e) {\n      throw new Error(`\"${url}\" is not supported, coc.nvim support github.com only`)\n    }\n    if (repository.protocol !== 'https:' || repository.hostname !== 'github.com') {\n      throw new Error(`\"${url}\" is not supported, coc.nvim support github.com only`)\n    }\n    url = url.replace(/\\/$/, '')\n    let branch = 'master'\n    if (url.includes('@')) {\n      // https://github.com/sdras/vue-vscode-snippets@main\n      let idx = url.indexOf('@')\n      branch = url.substring(idx + 1)\n      url = url.substring(0, idx)\n    }\n    let fileUrl = url.replace('github.com', 'raw.githubusercontent.com') + `/${branch}/package.json`\n    this.log(`Get info from ${fileUrl}`)\n    let content = await this.fetch(fileUrl, { timeout: 10000 })\n    let obj = typeof content == 'string' ? JSON.parse(content) : content\n    extensionPath(this.root, obj.name)\n    this.name = obj.name","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/extension/installer.ts#L234-L270","documentation":" thrown by getInfoFromUri when the extension URL cannot be parsed as a URL at all (new URL(url) throws). coc.nvim's GitHub-based installer only accepts well-formed https://github.com URLs, so malformed input is rejected immediately.","triggerScenarios":"Calling install/update with a shorthand like 'user/repo' with a scheme that URL() can't parse, a typo'd URL (spaces, missing scheme like 'github.com/user/repo'), or garbage input.","commonSituations":"Users paste git@github.com:... SSH URLs or bare repo paths into coc extensions config; config file has a URL without the https:// prefix.","solutions":["Use a full https URL: https://github.com/<user>/<repo>.","Remove the trailing '@branch' shorthand errors — the format is https://github.com/user/repo@branch.","Convert SSH (git@github.com:owner/repo) to HTTPS form.","Validate the URL string in your config before passing it to the installer."],"exampleFix":"// before\nurl: 'github.com/chemzqm/ws'\n// after\nurl: 'https://github.com/chemzqm/ws'","handlingStrategy":"validation","validationCode":"function isParseableUrl(u) { try { new URL(u); return true } catch { return false } }\nif (!isParseableUrl(url)) throw new Error(`malformed extension url: ${url}`)","typeGuard":"function isAbsoluteHttpsUrl(u) { try { const x = new URL(u); return x.protocol === 'https:' && !!x.hostname } catch { return false } }","tryCatchPattern":"try { await installer.install() } catch (e) { if (e.message.includes('is not supported, coc.nvim support github.com only')) { /* fix url in config */ } else { throw e } }","preventionTips":["Always use fully-qualified https:// URLs in extension configs","Convert SSH (git@github.com:) URLs to https form","Lint extension url fields in coc-settings.json"],"tags":["url-validation","github","extension-install"],"backgroundTag":"unsupported-url-format","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}