coc-discord-rpc: Unable to connect to discord after installation

I was unable to connect I installed it and when I opened up NeoVim it printed out: [coc.nvim] RPC: Could not connect I also tried to enable with [coc.nvim]: Error on notification "runCommand": Could not connect And reconnect as well [coc.nvim] RPC: Could not connect

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 26 (6 by maintainers)

Most upvoted comments

I wasn’t able to connect to Discord.

Refer to this issue that happened before.

It seems that this is an issue specific to macOS. Luckily, there is a fix posted by @Vaansh

If you haven’t figured it out, here is what worked for me:

  1. $ find /private/var/folders -name "*discord-ipc*" 2> /dev/null in my case it returned: /private/var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-0
  2. Go into /.config/coc/extensions/node_modules/coc-discord-rpc/lib and open index.js.
  3. Change line 3046 from return ${prefix.replace(/\/$/, '')}/discord-ipc-${id}; to return /var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-${id};

Configure 3. to return your discord pic path accordingly, and put both the returns in backticks.

This fix worked for me but the index.js file was different. I did a ctrl-f for “discord-ipc” to find the return statement that was mentioned, and following the steps from there fixed the issue for me.

Also getting that error with the most recent release of the package.

[coc.nvim] Error on activate extension coc-discord-rpc: Cannot read property ‘write’ of null

Versions:

Big Sur 11.5 nvim 0.5 Discord: 0.0.263

Can you tell me what source you installed the discord from?

Standard .dmg from the website, not via brew or any other package manager.

@lewisblackburn 'Cause in the new version, the lib folder has been changed to dist. I forgot to mention this in the release. 😅

Thanks! 😄

@lewisblackburn 'Cause in the new version, the lib folder has been changed to dist. I forgot to mention this in the release. 😅