CSGO---Discord-RichPresence icon indicating copy to clipboard operation
CSGO---Discord-RichPresence copied to clipboard

[bug] - Client keeps timing out

Open Zyad-O opened this issue 5 years ago • 16 comments

I followed the setup instructions to the dot and after doing node index the console waits for a little bit and spits out an error that looks like this:

Error: RPC_CONNECTION_TIMEOUT
at Timeout._onTimeout (D:\Documents\CSGO---Discord-RichPresence-master\node_modules\discord-rpc\src\Client.js:99:47)    
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

I can't think of anything I did wrong. I have the correct steam API key, AuthToken, and Client ID.

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

From what I can tell this is caused if you run Discord as Admin but not the script.

If this is the case here, try to run Discord either as non-admin or launch the command prompt as admin.

BeepIsla avatar Sep 26 '19 18:09 BeepIsla

Yeah, I tried to do that, but still coming up with the same error.

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

What is your NodeJS version? node -v

BeepIsla avatar Sep 26 '19 18:09 BeepIsla

v12.6.0

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

Discord Canary, PTB or Stable?

BeepIsla avatar Sep 26 '19 18:09 BeepIsla

Discord console says Stable

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

Try upgrading the discord-rpc module using npm i discord-rpc, then simply retry.

BeepIsla avatar Sep 26 '19 18:09 BeepIsla

Ok, so I did that, but along with the previous error it gave me this below it too:

(node:7720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm not good at node, so I'm not entirely sure what that means

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

Go into the index.js file and at the very very bottom add a new line with process.on("unhandledRejection", console.log);

It should output a more detailed error.

BeepIsla avatar Sep 26 '19 18:09 BeepIsla

Still the same error as before

Zyad-O avatar Sep 26 '19 18:09 Zyad-O

I sadly have no idea what the cause of this could be. I will upgrade the discord-rpc module to the latest version at some point in the future and hope your issue will vanish then.

Until then leave this issue open.

BeepIsla avatar Sep 26 '19 19:09 BeepIsla

Alright, thanks for your time; will be sure to watch for new commits soon

Zyad-O avatar Sep 26 '19 19:09 Zyad-O

The "some point in the future" turned into an hour instead. f2f9ccf9b26f97446343830cfe2ba5e04b84e025

Try deleting the entire previous version, redownloading it and running it now. I have little hope that this fixed your problem but maybe?

BeepIsla avatar Sep 26 '19 20:09 BeepIsla

So I downloaded the new commit and tried just about everything I could think of as to why Discord would time out; Added firewall rules to allow the connection, changed my network type, tried Ethernet instead of WiFi. But it still refuses to work, returning the same error at the same line of code :/

Zyad-O avatar Sep 27 '19 07:09 Zyad-O

I have no idea what the problem could be in this case. The error seems to be rare so there is little information about it.

BeepIsla avatar Sep 27 '19 07:09 BeepIsla

This is just a warning, not an actual error.

kuttim avatar Oct 05 '19 18:10 kuttim