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

Doesn't work on MacOS #15

Closed
K-NRS opened this issue Feb 2, 2021 · 8 comments
Closed

Doesn't work on MacOS #15

K-NRS opened this issue Feb 2, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@K-NRS
Copy link

K-NRS commented Feb 2, 2021

The extension works properly on my Linux devices. However, it could not connect to Discord RPC on MacOS.

Need a permission or setting? Or, is it a problem about the extension?
I've checked it in privacy settings but no missing or incorrect thing appears.

image

@Vaansh
Copy link

Vaansh commented Feb 21, 2021

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.

@K-NRS
Copy link
Author

K-NRS commented Feb 21, 2021

It worked for me too, thank you. Should be fixed in the project also.

@leonardssh
Copy link
Owner

@Vaansh znz8yyl55ls27thh9l56x6rr0000gn is this value static? If so, then I can modify the RPC library to detect whether it is running on macOS or not.

@K-NRS
Copy link
Author

K-NRS commented Feb 21, 2021

@Vaansh znz8yyl55ls27thh9l56x6rr0000gn is this value static? If so, then I can modify the RPC library to detect whether it is running on macOS or not.

The value is not static. Mine was different.

@Vaansh
Copy link

Vaansh commented Feb 21, 2021

@leonardssh No, I do not think it is static since it’s different from someone’s path in another issue.

@leonardssh
Copy link
Owner

Hmm, then, there is another solution, we could execute find /private/var/folders -name "*discord-ipc*" 2> /dev/null using child_process, and that's how we find the path where the discord-ipc is. But I'm going to need one of you for tests if you want to help me. 😊

@leonardssh
Copy link
Owner

It seems that there is already a PR with a solution to this problem: discordjs/RPC#113

@giovankes
Copy link

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.

i love u man it works

@xhayper xhayper added the bug Something isn't working label Oct 9, 2022
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

5 participants