{"record":{"id":"025e3c261d47d2a4","repo":"neoclide/coc.nvim","slug":"action-method-does-not-exist","errorCode":null,"errorMessage":"Action \"${method}\" does not exist","messagePattern":"Action \"(.+?)\" does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugin.ts","lineNumber":287,"sourceCode":"    nvim.resumeNotification(false, true)\n    void mcp.init(mcpStarted)\n    const duration = typeof global.__starttime === 'number' ? Date.now() - global.__starttime : 0\n    logger.info(`coc.nvim initialized with node: ${process.version} after`, duration)\n    this.ready = true\n    await events.fire('ready', [])\n  }\n\n  public get isReady(): boolean {\n    return this.ready\n  }\n\n  public hasAction(method: string): boolean {\n    return this.actions.has(method)\n  }\n\n  public async cocAction(method: string, ...args: any[]): Promise<any> {\n    let fn = this.actions.get(method)\n    if (!fn) throw new Error(`Action \"${method}\" does not exist`)\n    return await Promise.resolve(fn.apply(null, args))\n  }\n\n  public getHandler(): Handler {\n    return this.handler\n  }\n\n  public dispose(): void {\n    disposeAll(this.disposables)\n    extensions.dispose()\n    listManager.dispose()\n    workspace.dispose()\n    window.dispose()\n    sources.dispose()\n    services.dispose()\n    snippetManager.dispose()\n    commandManager.dispose()\n    completion.dispose()","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/plugin.ts#L269-L305","documentation":"cocAction() dispatches Vim-originated action requests by looking up the method name in the actions Map. If the name is not registered, it throws this error, meaning Vim called an action the plugin does not provide.","triggerScenarios":"Calling :call coc#client#request or CocAction('methodName') / CocActionAsync with a name never registered via addAction — including typos, actions from a disabled/unloaded extension, or actions removed in a coc.nvim version upgrade.","commonSituations":"Old vimrc/plugin configs calling renamed actions after upgrading coc.nvim; invoking an action provided only by an extension that failed to activate; typo'd action names in mappings like nmap <silent> gd :call CocAction('jumpDefinition2').","solutions":["Verify the action name against current docs (:h coc-actions) and fix typos","Ensure the extension providing the action is installed and activated before calling it","Guard in Vim script with coc#client#has_action or check via try/catch around CocAction","Update mappings/config that reference actions renamed or removed in newer coc.nvim versions"],"exampleFix":"\" before\nnoremap <silent> gx :call CocAction('doAction2')<CR>\n\" after\nnoremap <silent> gx :call CocAction('doAction')<CR>","handlingStrategy":"try-catch","validationCode":"\" Vim script guard\nif coc#client#has_action('myAction')\n  call CocAction('myAction')\nendif","typeGuard":null,"tryCatchPattern":"try {\n  await plugin.cocAction('myAction', arg)\n} catch (e) {\n  if (e.message.includes('does not exist')) {\n    window.showErrorMessage(`Action not available: ${e.message}`)\n  }\n}","preventionTips":["Verify action names against :h coc-actions for your coc.nvim version","Ensure the providing extension is installed and activated","Use hasAction checks before dispatching dynamic action names","Keep vimrc mappings updated when upgrading coc.nvim"],"tags":["plugin","action-dispatch","api-misuse"],"backgroundTag":"unknown-action-name","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}