coc-discord-rpc icon indicating copy to clipboard operation
coc-discord-rpc copied to clipboard

Cannot read properties of null reading "write"

Open JotaroKujo0525 opened this issue 2 years ago • 17 comments

Been coding on nvim and I installed this Plugin until encountered this error

Screenshot_20211119_165633

JotaroKujo0525 avatar Nov 19 '21 08:11 JotaroKujo0525

I'm having the same issue. Did you ever figure it out?

Nuddel69 avatar Feb 24 '22 21:02 Nuddel69

This error occurs when the rpc doesn't find the discord client (it is not started or rpc doesn't have permissions).

leonardssh avatar Feb 24 '22 23:02 leonardssh

I've been getting this issue lately - but it only seems to happen when I use my window manager (Awesome) instead of my usual desktop environment (KDE). So it's probably not an issue with the plugin (for me), but does anyone know what might cause this in my situation?

Magicrafter13 avatar Mar 05 '22 05:03 Magicrafter13

I'm getting the same error. Is there any configuration I need to setup to make it work?

AucaCoyan avatar Mar 23 '22 00:03 AucaCoyan

@LeonardSSH Uhm, facing the same bizzare issue? Would you mind helping us?

knaeve avatar Mar 25 '22 06:03 knaeve

Seems like all issues are dead.

knaeve avatar Mar 28 '22 15:03 knaeve

can't get this to work either

ken-soares avatar Apr 10 '22 12:04 ken-soares

sadge :(

knaeve avatar Apr 11 '22 03:04 knaeve

same here

b3z avatar Apr 15 '22 14:04 b3z

I see, Maintainers aren't responding 😐

knaeve avatar Apr 15 '22 15:04 knaeve

@leonardssh

knaeve avatar May 19 '22 11:05 knaeve

I have the same issue. As well as: [coc.nvim] RPC: TypeError: e.forEach is not a function

Paxxous avatar Jun 18 '22 17:06 Paxxous

This is also happening for me on Zorin (Ubuntu 20.04).

Here's the log from COC:

2022-06-22T10:34:20.970 ERROR (pid:574489) [coc-discord-rpc] - Error: Could not connect
    at Socket.o (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:14782)
    at Object.onceWrapper (node:events:642:26)
    at Socket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
2022-06-22T10:34:20.971 ERROR (pid:574489) [extensions] - Error on active extension coc-discord-rpc: Cannot read properties of null (reading 'write') TypeError: Cannot read properties of null (reading 'write')
    at e.exports.send (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16144)
    at /home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16222
    at new Promise (<anonymous>)
    at e.exports.close (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16179)
    at e.exports.destroy (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:10989)
    at Function.login (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:39568)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.t.activate (/home/felipe/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:44242)

FelipeSharkao avatar Jun 22 '22 13:06 FelipeSharkao

Same thing is happening to me

2022-07-10T18:53:42.466 ERROR (pid:47991) [server] - unhandledRejection  Promise {
  <rejected> TypeError: Cannot read properties of null (reading 'write')
      at e.exports.send (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16144)
      at /home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16222
      at new Promise (<anonymous>)
      at e.exports.close (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16179)
      at e.exports.destroy (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:10989)
      at u.handleDisconnected (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:40034)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
} TypeError: Cannot read properties of null (reading 'write')
    at e.exports.send (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16144)
    at /home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16222
    at new Promise (<anonymous>)
    at e.exports.close (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:16179)
    at e.exports.destroy (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:10989)
    at u.handleDisconnected (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:40034)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-07-10T18:53:42.644 INFO (pid:47991) [coc-discord-rpc] - Connected to Discord Gateway
2022-07-10T18:53:42.646 ERROR (pid:47991) [server] - unhandledRejection  Promise {
  <rejected> TypeError: e.forEach is not a function
      at l (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:35508)
      at f.sendActivity (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:35689)
      at u.handleLogin (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:39783)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
} TypeError: e.forEach is not a function
    at l (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:35508)
    at f.sendActivity (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:35689)
    at u.handleLogin (/home/tudbut/.config/coc/extensions/node_modules/coc-discord-rpc/dist/index.js:2:39783)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-07-10T18:53:52.787 INFO (pid:47991) [attach] - receive notification: showInfo []

TudbuT avatar Jul 10 '22 16:07 TudbuT

@leonardssh this issue is 3/4 of a year old and fatal.

TudbuT avatar Jul 10 '22 17:07 TudbuT

@TudbuT I know about this issue, I tried to solve it, but to no avail. At the moment I don't have the time and environment to start try solving it again.

leonardssh avatar Jul 11 '22 12:07 leonardssh

Uh, this sucks! :(

knaeve avatar Sep 14 '22 05:09 knaeve

Can you guys try installing leonardssh/coc-discord-rpc#build-dev version of the extenstion? It should fix this bug, if it did then i will publish it.

Windows: %appdata%\..\Local\coc\extensions

macOS: ~/.config/coc/extensions

Linux: ~/.config/coc/extensions

xhayper avatar Oct 07 '22 14:10 xhayper