Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to discord after installation #21

Closed
Ngomana opened this issue Mar 21, 2021 · 26 comments
Closed

Unable to connect to discord after installation #21

Ngomana opened this issue Mar 21, 2021 · 26 comments
Labels
bug Something isn't working

Comments

@Ngomana
Copy link

Ngomana commented Mar 21, 2021

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

@AlexWillCode
Copy link

AlexWillCode commented Mar 24, 2021

I just installed coc-discord-rpc for the first time and can reproduce this bug. (MacOS 11.2.3)

@Ngomana
Copy link
Author

Ngomana commented Mar 24, 2021

I just installed coc-discord-rpc for the first time and can reproduce this bug.

So you were able to connect to discord?

@AlexWillCode
Copy link

I wasn't able to connect to Discord.

@Ngomana
Copy link
Author

Ngomana commented May 8, 2021

I wasn't able to connect to Discord.

use coc-discord-presence

@tomadojuice
Copy link

tomadojuice commented May 11, 2021

Same error for me... I'm on MacOS maybe that could be a problem.

@stevenhansel
Copy link

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.

@Ngomana
Copy link
Author

Ngomana commented May 21, 2021

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.

Still doesn't work

@leonardssh
Copy link
Owner

Please update the extension and let me know if the problem is solved.

@Ngomana
Copy link
Author

Ngomana commented Aug 20, 2021

This is what I'm getting.
[coc.nvim]: Error on notification "runCommand": Cannot read property 'write' of null

@Ngomana Ngomana closed this as completed Aug 20, 2021
@Ngomana Ngomana reopened this Aug 20, 2021
@leonardssh
Copy link
Owner

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

@Ngomana
Copy link
Author

Ngomana commented Aug 20, 2021

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

CocInstall coc-discord-rpc

@stephfh
Copy link

stephfh commented Aug 20, 2021

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.

@leonardssh
Copy link
Owner

leonardssh commented Aug 20, 2021

If you are using VSCode, please test the https://github.com/LeonardSSH/vscord extension, it is made with the same discord rpc, and let me know if it works.

@stephfh
Copy link

stephfh commented Aug 20, 2021

Just installed your extension for VSCode. Yes, that one is able to connect to Discord, the second it finished installing the extension.

@leonardssh
Copy link
Owner

@stephfh please see #45 #18 #15

@Ngomana
Copy link
Author

Ngomana commented Aug 21, 2021

unfortunately I only use Neo vim

@lewisblackburn
Copy link

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.

Still doesn't work

Screenshot 2021-08-30 at 15 34 38

Does anyone know why I don't have a lib folder?

@leonardssh
Copy link
Owner

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

@Ngomana
Copy link
Author

Ngomana commented Aug 30, 2021

Screenshot 2021-08-30 at 20 12 04

@lewisblackburn
Copy link

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

Thanks! 😄

@Ngomana
Copy link
Author

Ngomana commented Aug 31, 2021

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

Thanks! 😄

did it work?

@lewisblackburn
Copy link

unfortunatley not

@leonardssh leonardssh added the bug Something isn't working label Sep 1, 2021
@RayCurse
Copy link

RayCurse commented Sep 1, 2021

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.

@Ngomana
Copy link
Author

Ngomana commented Sep 1, 2021

it worked!!!
could some please submit a pull request

@carandev
Copy link

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.

Hi, I have the same error but with Debian in WSL2

@leonardssh
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants