GithubHelp home page GithubHelp logo

Comments (27)

jfun avatar jfun commented on September 1, 2024 2

See that's what makes no sense, you say it doesn't support Mac OSX. I would say otherwise, because discord-vscode, which works perfectly on my machine, relies on discordjs/RPC as well, meaning it must support Mac OSX. That would mean it is something that you need to fix in the extension.

I have the same issue, discord-vscode works as is, but not coc-discord-rpc.

I edited the error message to print the id and path of getRPC

coc-nvivm.log:

2021-02-01T16:09:43.894 INFO (pid:44049) [coc-discord-rpc] - === Extension activated ===
2021-02-01T16:09:43.895 INFO (pid:44049) [coc-discord-rpc] - Extension Name: leonardssh.coc-discord-rpc.
2021-02-01T16:09:43.896 INFO (pid:44049) [coc-discord-rpc] - Extension Version: 4.0.0-38e0d4d6.
2021-02-01T16:09:43.900 ERROR (pid:44049) [coc-discord-rpc] - Error: Could not connect id: 10 path: /var/folders/gh/55y8x3qd72l3w9ph4c5knj3c0000gn/T/nvimRKrfDj/discord-ipc-10
    at Socket.onerror (/Users/john/.config/coc/extensions/node_modules/coc-discord-rpc/lib/index.js:3056:16)
    at Object.onceWrapper (node:events:483:26)
    at Socket.emit (node:events:376:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:80:21)

The discord-ipc path on my machine is different:

$ find /private/var/folders -name "*discord-ipc*" 2> /dev/null
/private/var/folders/gh/55y8x3qd72l3w9ph4c5knj3c0000gn/T/discord-ipc-0

macOS 11.1 (Big Sur)
NVIM v0.5.0-dev+1059-g55add1c1c
coc-discord-rpc 4.0.0

from coc-discord-rpc.

Vaansh avatar Vaansh commented on September 1, 2024 2

For anyone else searching, I went into /.config/coc/extensions/node_modules/coc-discord-rpc/lib/index.js and changed line 3046 from return ${prefix.replace(/\/$/, '')}/discord-ipc-${id}; to return /var/folders/g3/znz8yyl55ls27thh9l56x6rr0000gn/T/discord-ipc-${id};which was what it returned when I typed $ find /private/var/folders -name "*discord-ipc*" 2> /dev/null.

from coc-discord-rpc.

byt3rr avatar byt3rr commented on September 1, 2024 1

I'm guessing @MrDogeBro is running WSL, because I stumbled upon this issue myself too.
There seems to be an issue connecting to the named pipe in \?\pipe\discord-ipc-0, I'm getting an ECONNREFUSED when attempting to connect on my own. I'll try and figure that out.

In the meantime, one should also put up a pull request on Discord's RPC implementation, right here to check for WSL as well (it is as simple as checking if the string 'microsoft' is inside the platform info).

The last issue is the fact that you dispose the client on error:

		try {
			await client.connect();
		} catch (error) {
			log(error, LogLevel.Err);
			void client.dispose();
		}

And that calls the rpc.destroy function, which attempts to write on the uninitialized socket and throws the original error ๐Ÿ˜„

from coc-discord-rpc.

byt3rr avatar byt3rr commented on September 1, 2024 1

Welp, nvm then. Also it seems named pipes in windows aren't communicable through WSL, so this wont work plugin wont work on WSL. Anyway, for better error handling you should fix the dispose function ๐Ÿ˜ƒ

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024 1

See that's what makes no sense, you say it doesn't support Mac OSX. I would say otherwise, because discord-vscode, which works perfectly on my machine, relies on discordjs/RPC as well, meaning it must support Mac OSX. That would mean it is something that you need to fix in the extension.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024 1

Ok, sounds good. Hopefully it works. Well see I guess.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

Hi ๐Ÿ‘‹

It seems to be a problem from coc.nvim. ๐Ÿค”

Answer me a few questions:

  1. What operating system are you runningโ“
  2. Did you try to reinstall the extensionโ“
  3. Did you install the coc.nvim wellโ“ Did you try to reinstall itโ“

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

@leonardssh

  • I am running Mac OSX 10.11.6
  • I tried re-installing, didn't work.
  • What do you mean by install the coc.nvim as well? If you are talking about coc for nivm, yes, otherwise I couldn't install this.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

@MrDogeBro have you tried other extensions? such as: coc-cord? I want to see if it's from my extension or from discordjs/RPC.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

@leonardssh coc-cord doesn't work, but it just says it couldn't connect. None of the commands for coc-cord register either. Plus, on the GitHub for coc-cord, it says that you should use this plugin instead of coc-cord, as well as the fact that coc-cord is literally archived by its owner. Coc-cord doesn't give the cant read write of null error though, which means it is most likely your extension.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

About the error, "could not connect", it is from discordjs/RPC, it does not have support for Mac OSX. Tou can take a look at this, it seems to be the solution: iCrawl/discord-vscode#66 (comment)

In the meantime, I'm going to fix the shit error.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

@leonardssh Why did you close the issue? It is not resolved.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

I'm a begginner with "issues". I have a script that I am now learning how to work with on the issues side.

Let's put this aside, we solved the problem with:

[coc.nvim]: UnhandledRejection: TypeError: Cannot read property 'write' of null
UnhandledRejection: TypeError: Cannot read propery 'write' of null

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

We didn't solve the issue though....

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

Give me a few moments to upload the solved version so you can test. :)

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

Okay, you can update the extension using: :CocUpdate. It should be updated to v3.0.9. If it doesn't update right away, wait a few more moments, and try again. ๐Ÿ˜ƒ

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

Ok, on NPM its still at 3.0.8 so should I wait for that to update?

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

The npmjs updates the versions very slowly. You can try the command :CocUpdate and see that's happen.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

Ok, if that doesn't work I'll just wait for NPM to update. Didn't know NPM was slow on updates though because I use python a lot and PyPi updates literally in like a few seconds so I'm kinda used to that.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

When I post a new version of the extension, it always takes some time to update on the site, but if I use the :CocUpdate command, it updates to the new version, even if the previous version is on the website.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

So I got the updated version and thats working but I'm not getting the following error:

RPC: Error: Could not connect

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

So I got the updated version and thats working but I'm not getting the following error:

RPC: Error: Could not connect

Yeah, this error is from discordjs/RPC. It does not find the discord IPC in the default path.

right here

But you said that the vscode extension works, even though I use the same library.

Quite strange. ๐Ÿค”

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

Thats what confusing. Never had any issues with vscode extension that uses discordjs/RPC but this is having issues.....very strange....

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

I really don't know how I can help you, you can try running the example in the discordjs/RPC repository and see if that works, if not do some debugging and open an issue over there.

from coc-discord-rpc.

MrDogeBro avatar MrDogeBro commented on September 1, 2024

Running the example from discordjs/RPC works perfectly fine. This means it is a problem with your extension, not theirs, or there is some greater issue with coc and nvim.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

lol... yeah, most likely to be the problem from neovim or coc.nvim.

from coc-discord-rpc.

leonardssh avatar leonardssh commented on September 1, 2024

@MrDogeBro can you upgrade the extension to the new version 4.0.0? I want to know if there are any problems. Thanks!

from coc-discord-rpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.