vscord icon indicating copy to clipboard operation
vscord copied to clipboard

Couldn't connect to Discord via RPC:

Open KuezyIT opened this issue 3 years ago • 58 comments

I tried to use vscord but when trying to edit code it says: Couldn't connect to Discord via RPC: RPC_CONNECTION_TIMEOUT: Connection timed out

I do have the necessary settings enabled in discord: image

Heres the exact error log:

[6:23:15 PM] [INFO] Discord Rich Presence for VS Code activated.
[6:23:15 PM] [INFO] Registered Discord Rich Presence commands
[6:23:25 PM] [ERROR] Encountered following error while trying to login: RPC_CONNECTION_TIMEOUT: Connection timed out
    at Ma.login (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.10\node_modules\@xhayper\discord-rpc\dist\Client.js:250:20)
    at new Qi (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.10\src\controller.ts:34:14)
    at Object.<anonymous> (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.10\src\extension.ts:10:20)
    at Module.u._compile (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:1313)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
    at Module.load (node:internal/modules/cjs/loader:1035:32)
    at Module._load (node:internal/modules/cjs/loader:876:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Function.r._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:120:13363)
    at Function.w._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:61309)
    at Function.v._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:60713)
    at Module.require (node:internal/modules/cjs/loader:1059:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Function.r [as __$__nodeRequire] (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:5:101)
    at d.rb (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:62572)
    at async Promise.all (index 0)
[6:23:25 PM] [INFO] [002] Destroyed Discord RPC client
[6:23:25 PM] [INFO] Successfully logged in to Discord with client ID 782685898163617802

When looking at the discord client ID it says 782685898163617802 which is not my client id...

KuezyIT avatar Nov 19 '22 17:11 KuezyIT

Client ID is the id that VSCord use, not user id.

xhayper avatar Nov 19 '22 23:11 xhayper

Can you enable debug mode and send me the log?

xhayper avatar Nov 19 '22 23:11 xhayper

Alright i am getting this bug too

xhayper avatar Nov 20 '22 06:11 xhayper

alright you can try reconnecting it if it fix it

xhayper avatar Nov 20 '22 06:11 xhayper

And how can I reconnect the extension in VS code?

KuezyIT avatar Nov 20 '22 14:11 KuezyIT

ctrl + sift + p and there should be a reconmect command

xhayper avatar Nov 20 '22 14:11 xhayper

image

Just tried to reconnect, still doesnt work.. :(

KuezyIT avatar Nov 20 '22 14:11 KuezyIT

restart you discord then reconnect, see id it work

xhayper avatar Nov 20 '22 14:11 xhayper

image After restarting discord and then reconnecting via STRG + SHIFT + P and then selecting reconnecting to discord gateway I get the same error message..

KuezyIT avatar Nov 20 '22 15:11 KuezyIT

what the hell... this is so weird, another weird bug to the list, you can try debug mode to see if anything good come up in output

xhayper avatar Nov 20 '22 15:11 xhayper

Uhh, if I just would know how to debug extensions xddd

KuezyIT avatar Nov 20 '22 15:11 KuezyIT

its in settings

xhayper avatar Nov 20 '22 23:11 xhayper

Yep, got it. Here you go:

[6:19:34 PM] [INFO] [data.ts] ext(): Extension
[6:19:34 PM] [INFO] [data.ts] ext(): Changed to Extension
[6:19:34 PM] [INFO] [data.ts] [data.ts] ext(): Git extension is active
[6:19:34 PM] [INFO] [data.ts] api(): true
[6:19:34 PM] [INFO] [data.ts] api(): gitApi
[6:19:34 PM] [INFO] [data.ts] updateGit()
[6:19:34 PM] [INFO] [data.ts] gitRepoPath(): 
[6:19:34 PM] [INFO] [data.ts] updateGit(): repo 
[6:19:34 PM] [INFO] [data.ts] api(): true
[6:19:34 PM] [INFO] [data.ts] api(): gitApi
[6:19:34 PM] [INFO] [data.ts] updateGit()
[6:19:34 PM] [INFO] [data.ts] gitRepoPath(): 
[6:19:34 PM] [INFO] [data.ts] updateGit(): repo 
[6:19:34 PM] [INFO] Discord Rich Presence for VS Code activated.
[6:19:34 PM] [INFO] Registered Discord Rich Presence commands
[6:19:34 PM] [INFO] [data.ts] listeners(): Open Repo CUDA-Systembot
[6:19:34 PM] [INFO] [data.ts] updateGit()
[6:19:34 PM] [INFO] [data.ts] gitRepoPath(): d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:34 PM] [INFO] [data.ts] updateGit(): repo d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:34 PM] [INFO] [data.ts] listeners(): Open Repo CUDA-Systembot
[6:19:34 PM] [INFO] [data.ts] updateGit()
[6:19:34 PM] [INFO] [data.ts] gitRepoPath(): d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:34 PM] [INFO] [data.ts] updateGit(): repo d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:35 PM] [INFO] [data.ts] listeners(): Change State initialized
[6:19:35 PM] [INFO] [data.ts] updateGit()
[6:19:35 PM] [INFO] [data.ts] gitRepoPath(): d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:35 PM] [INFO] [data.ts] updateGit(): repo d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:35 PM] [INFO] [data.ts] listeners(): Change State initialized
[6:19:35 PM] [INFO] [data.ts] updateGit()
[6:19:35 PM] [INFO] [data.ts] gitRepoPath(): d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:35 PM] [INFO] [data.ts] updateGit(): repo d:\Users\Kuezy\04 Projects\[CUDA - DEVELOPMENT]\10 Develoment\00 System Builds\CUDA-Systembot
[6:19:44 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:19:44 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:19:44 PM] [ERROR] Encountered following error while trying to login: RPC_CONNECTION_TIMEOUT: Connection timed out
    at za.login (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.11\node_modules\@xhayper\discord-rpc\dist\Client.js:250:20)
    at new en (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.11\src\controller.ts:34:14)
    at Object.<anonymous> (c:\Users\kuezy\.vscode-insiders\extensions\leonardssh.vscord-5.0.11\src\extension.ts:10:20)
    at Module.u._compile (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:4:1313)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
    at Module.load (node:internal/modules/cjs/loader:1035:32)
    at Module._load (node:internal/modules/cjs/loader:876:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Function.r._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:120:13370)
    at Function.w._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:61374)
    at Function.v._load (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:60776)
    at Module.require (node:internal/modules/cjs/loader:1059:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Function.r [as __$__nodeRequire] (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js:5:101)
    at d.rb (e:\Users\Kuezy\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:115:62638)
    at async Promise.all (index 0)
[6:19:44 PM] [INFO] [002] Destroyed Discord RPC client
[6:19:44 PM] [INFO] Successfully logged in to Discord with client ID 782685898163617802
[6:19:57 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:19:57 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:19:59 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:19:59 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:20:00 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:20:00 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:20:13 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:20:13 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:21:49 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:21:49 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor: got unallowed scheme, got 'output'
[6:21:49 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:21:51 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor
[6:21:51 PM] [INFO] [data.ts] root(): window.onDidChangeActiveTextEditor: got unallowed scheme, got 'output'

KuezyIT avatar Nov 21 '22 17:11 KuezyIT

I have different bug, for me it was saying about not finding a command or sum when i tried to connect to the discord with command in vsc(similiar error what Kuezy got, but with not finding a command), even after restarting vsc or dc it doesnt really matter also the img at the bottom wasnt visible at all, smth is going wrong with this extension recently, so i switched back to crawl one, this one isnt useful at all atm, and i was using it cause of astro files

This is the error: image It happens to every command from vscord No matter which of these etc i will use it the same, and same goes for restarting vsc or discord image I have hope you will fix it somehow, its so annoying i havent had so many problems with any extension so far ;-;

getlaurekt avatar Nov 23 '22 03:11 getlaurekt

i know that it's super annoying and stuff, but i can't get it to re-produce it on my mac machine WHICH is really a bad sign on fixing this bug, i really can't figure out what cause it it all, i also use astro on my project and the same bug didn't happened.

I think this extension is haunted.

xhayper avatar Nov 23 '22 04:11 xhayper

same on my windows machine, everything just works, it's really weird.

xhayper avatar Nov 23 '22 04:11 xhayper

i know that it's super annoying and stuff, but i can't get it to re-produce it on my mac machine WHICH is really a bad sign on fixing this bug, i really can't figure out what cause it it all, i also use astro on my project and the same bug didn't happened.

I think this extension is haunted.

The funniest part is that it did start to happen after one of updates, it's not like problem on my side that's the funniest part and I have no idea what does it happens. I also managed like 2 times to make it work, like the extension was running somehow, BUT after disconnecting it of discord etc i couldnt reconnect it no matter what cause I was getting the error that I did show you in my previous comment.

Ye, this extension has hard time ngl. I started to use it cause of Astro files, but welp I can't even use it anymore hah.

getlaurekt avatar Nov 25 '22 00:11 getlaurekt

same on my windows machine, everything just works, it's really weird.

Stranger things I'd say then hah, it's so weird.

getlaurekt avatar Nov 25 '22 00:11 getlaurekt

I also have no idea on my side either

xhayper avatar Nov 25 '22 00:11 xhayper

Can use send your exact windows version and also the exact vscode / vscodium / vsinsider build numbers

you can get windows version by doing win + r -> winver to get vscode version go to the toolbar click help and then about.

Idk if I can recreate it by going to your version of things. But working fine for me on windows so semi confused why this is happening

nick22985 avatar Nov 25 '22 03:11 nick22985

@xhayper to hackly recreate this you can just spam the hell outta disconnecting and reconnecting eventually you will get a error for disconnecting when going to reconnect it wont fully reconnect. It got something to do with the client not fully destorying the rpc when it errors. Making it stuck in a loop where it can send presence or reconnect because it is disabeld.

Tryied to see if the this.client.isConnected but it is still true even after erroring.

A check could be added to root(): window.onDidChangeActiveTextEditor checking if any errors have occurred if so enable the extension again but have to make sure it doesn't actually do it when it is not meant to.

nick22985 avatar Nov 25 '22 13:11 nick22985

when an error happened the whole discord rpc lib would die... right?

xhayper avatar Nov 25 '22 14:11 xhayper

Yes but no not when the timeout happens. It somehow doesn't. For some reason it just like nope and is still active but not active

nick22985 avatar Nov 25 '22 14:11 nick22985

Im now getting this now sometimes as well interesting

2022-11-26 11:57:27.221 [info] [perf] Render performance baseline is 27ms
2022-11-26 11:57:27.817 [info] UNRESPONSIVE extension host: starting to profile NOW
2022-11-26 11:57:38.285 [info] UNRESPONSIVE extension host: starting to profile NOW
2022-11-26 11:57:39.038 [info] UNRESPONSIVE extension host: received responsive event and cancelling profiling session
2022-11-26 11:57:39.227 [warning] UNRESPONSIVE extension host: 'leonardssh.vscord' took 39.19048481778833% of 296.351ms, saved PROFILE here: 'file:///c%3A/Users/nick/AppData/Local/Temp/exthost-b8983f.cpuprofile'

will send the log file to you @xhayper on discord as it doesn't wanna on here

Maybe relatated maybe not.

also #111 I think the same bug

nick22985 avatar Nov 26 '22 04:11 nick22985

This is weird...

xhayper avatar Nov 27 '22 04:11 xhayper

After update on 27th the extension started to work again for me(i was surprised) but update on 29th fcked up it again, i have no idea whats going on, im getting the same error again, im hopeless for this extension xD

getlaurekt avatar Dec 01 '22 20:12 getlaurekt

GAAAAAHHHHHH!!!!! THIS BUG HAUNTED ME EVERYDAY!!!

xhayper avatar Dec 02 '22 00:12 xhayper

😢

nick22985 avatar Dec 02 '22 02:12 nick22985

After update on 27th the extension started to work again for me(i was surprised) but update on 29th fcked up it again, i have no idea whats going on, im getting the same error again, im hopeless for this extension xD

All the time rlly? I wish I could recreate this with that consistently.

How I was recreating this I have fixed and no longer does it so I have no way of reproducing this

nick22985 avatar Dec 02 '22 02:12 nick22985

Hey guys, just checkin' up on this issue. Any way to fix it so far?

KuezyIT avatar Dec 02 '22 13:12 KuezyIT