neoclide/coc.nvim · error
extension ${id} not registered
Error message
extension ${id} not registered What it means
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.
Source
Thrown at src/extension/manager.ts:360
}
disposeExtension(id)
}
public async reloadExtension(id: string): Promise<void> {
let item = this.extensions.get(id)
if (!item || item.type == ExtensionType.Internal) {
throw new Error(`Extension ${id} not registered`)
}
if (item.type == ExtensionType.SingleFile) {
await this.loadExtensionFile(item.filepath)
} else {
await this.loadExtension(item.directory)
}
}
public async call(id: string, method: string, args: any[]): Promise<any> {
let item = this.extensions.get(id)
if (!item) throw new Error(`extension ${id} not registered`)
let { extension } = item
if (!extension.isActive) {
await this.activate(id)
}
let { exports } = extension
if (!exports || typeof exports[method] !== 'function') {
throw new Error(`method ${method} not found on extension ${id}`)
}
return await Promise.resolve(exports[method].apply(null, args))
}
public registContribution(id: string, packageJSON: any, directory: string, filepath?: string): void {
let { contributes, activationEvents } = packageJSON
let { configuration, rootPatterns, commands } = contributes ?? {}
let definitions: IStringDictionary<IJSONSchema> | undefined
let props = getProperties(configuration ?? {})
if (!isEmpty(props)) {
// /configurationView on GitHub (pinned to 50e974d969)
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
Example fix
// before
await manager.call('coc-myext', 'run', [])
// after
if (!manager.getExtension('coc-myext')) {
await manager.loadExtension(dir)
}
await manager.call('coc-myext', 'run', []) Defensive patterns
Strategy: validation
Validate before calling
if (!manager.getExtension(id)) {
throw new Error(`extension ${id} must be loaded before call()`)
} Try / catch
try {
return await manager.call(id, method, args)
} catch (e) {
if (e.message === `extension ${id} not registered`) {
return undefined // feature optional
}
throw e
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Command: ${command} not found
- ${this.def} has no release older than ${releaseAge} days.
- ${this.def} is not older than ${releaseAge} days.
- Extension ${id} not registered!
- method ${method} not found on extension ${id}
AI-assisted analysis of neoclide/coc.nvim@50e974d969 (2026-08-31).
Data as JSON: /api/errors/dab56eadebc2f7ac.
Report an issue: GitHub.