discordjs / RPC

A simple RPC client for Discord
MIT License
474 stars 192 forks source link

Socket error #175

Open kernelwernel opened 1 year ago

kernelwernel commented 1 year ago

For some reason, the code works on my host machine but when I try to make it into a docker container, it gives me this error:

Error: Could not connect
    at Socket.onerror (/root/trollge/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (events.js:421:26)
    at Socket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

I tried to run this on my VPS and the same thing happened. Any help?

CarlosNunezMX commented 8 months ago

Same error but trying in Bun

import {register, Client} from "discord-rpc"
register(':D');
const rpc = new Client({transport: 'ipc'});
rpc.on('ready', () => {
    console.log('Client is ready');
})
rpc.login({clientId: ":D});

Enviroment Details

DiscordRPC ^4.0.1 Bun 1.0.22 Discord installed with snap Running in KDE Neon (Ubuntu)