{"record":{"id":"dab56eadebc2f7ac","repo":"neoclide/coc.nvim","slug":"extension-id-not-registered-dab56e","errorCode":null,"errorMessage":"extension ${id} not registered","messagePattern":"extension (.+?) not registered","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/extension/manager.ts","lineNumber":360,"sourceCode":"    }\n    disposeExtension(id)\n  }\n\n  public async reloadExtension(id: string): Promise<void> {\n    let item = this.extensions.get(id)\n    if (!item || item.type == ExtensionType.Internal) {\n      throw new Error(`Extension ${id} not registered`)\n    }\n    if (item.type == ExtensionType.SingleFile) {\n      await this.loadExtensionFile(item.filepath)\n    } else {\n      await this.loadExtension(item.directory)\n    }\n  }\n\n  public async call(id: string, method: string, args: any[]): Promise<any> {\n    let item = this.extensions.get(id)\n    if (!item) throw new Error(`extension ${id} not registered`)\n    let { extension } = item\n    if (!extension.isActive) {\n      await this.activate(id)\n    }\n    let { exports } = extension\n    if (!exports || typeof exports[method] !== 'function') {\n      throw new Error(`method ${method} not found on extension ${id}`)\n    }\n    return await Promise.resolve(exports[method].apply(null, args))\n  }\n\n  public registContribution(id: string, packageJSON: any, directory: string, filepath?: string): void {\n    let { contributes, activationEvents } = packageJSON\n    let { configuration, rootPatterns, commands } = contributes ?? {}\n    let definitions: IStringDictionary<IJSONSchema> | undefined\n    let props = getProperties(configuration ?? {})\n    if (!isEmpty(props)) {\n      // /configuration","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/extension/manager.ts#L342-L378","documentation":"ExtensionManager.call(id, method, args) performs remote-style invocation of an exported function on an extension. It throws `extension <id> not registered` when no extension with that id exists in the manager. Unlike activate(), call() requires the extension to be present before it can lazily activate it and look up the method on exports.","triggerScenarios":"Calling manager.call('coc-x', 'someMethod', args) where the id was never loaded, was unloaded, or is misspelled; also any RPC path (e.g. coc extension API call) targeting an unregistered id.","commonSituations":"Client code referencing an extension that failed to install; id changed between extension versions; calling from an autocmd/binding after the extension was disabled in configuration.","solutions":["Verify the exact extension id against the installed extension's package.json `name`","Load the extension first (loadExtension/loadExtensionFile) so it is registered before calling","Check coc.extensions configuration — a disabled extension is not loaded and thus not registered","Guard the call with getExtension(id) and handle the missing case gracefully"],"exampleFix":"// before\nawait manager.call('coc-myext', 'run', [])\n// after\nif (!manager.getExtension('coc-myext')) {\n  await manager.loadExtension(dir)\n}\nawait manager.call('coc-myext', 'run', [])","handlingStrategy":"validation","validationCode":"if (!manager.getExtension(id)) {\n  throw new Error(`extension ${id} must be loaded before call()`)\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await manager.call(id, method, args)\n} catch (e) {\n  if (e.message === `extension ${id} not registered`) {\n    return undefined // feature optional\n  }\n  throw e\n}","preventionTips":["Keep a single source of truth for extension ids shared between loader and callers","Load extensions before invoking their API over RPC","Re-validate registration after config changes that disable extensions","Treat optional extension calls with a soft-fail guard"],"tags":["extension-api","registry","rpc"],"backgroundTag":"extension-not-registered","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}