Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't connect to Discord via RPC: Error: Could not connect #85

Closed
power opened this issue Aug 28, 2018 · 84 comments
Closed

Couldn't connect to Discord via RPC: Error: Could not connect #85

power opened this issue Aug 28, 2018 · 84 comments

Comments

@power
Copy link

power commented Aug 28, 2018

Seem to be getting this error on both clients, canary and stable.

@iCrawl
Copy link
Owner

iCrawl commented Aug 28, 2018

What OS?
VSCode version?
More than one discord client open?

@power
Copy link
Author

power commented Aug 28, 2018

Windows 10
1.26.1
Only Discord client open

@power
Copy link
Author

power commented Aug 28, 2018

Just after writing this issue seemed to fix, no idea what the issue was. Sorry for wasting your time 👍

@power power closed this as completed Aug 28, 2018
@sametgirginer
Copy link

sametgirginer commented Sep 2, 2018

This problem happened to me. The solution is as follows:
If you are running Discord as an administrator, you must close it in the program settings.
Ex: https://imgur.com/a/vlNITQ2

@voloshink
Copy link

@smt287 your link is broken

@sametgirginer
Copy link

@voloshink updated.

@secato
Copy link

secato commented Nov 6, 2018

@smt287 it is broken again 😢

@sametgirginer
Copy link

@smt287 it is broken again 😢

updated again :)

@Tu4nNguyen
Copy link

Run Vs Code with administrator.

@Nullcano
Copy link

Run Vs Code with administrator.

This worked for me

@fivemoreminix
Copy link

I'm getting this error on Linux Manjaro, Code doesn't take running as the super user very well. What is the solution?

@matthew119427
Copy link

@asmoaesl Having the same exact issue on Manjaro, I installed it via Snap, AUR, and finally a TAR file and it's still refusing to cooperate. Fun!

@fivemoreminix
Copy link

@dutchvanderlinde I know this is totally off-topic, but I used manjaro for a couple years and tried MX Linux recently, and it is the best distro I've ever used. I say do give it a live try if you're not using Manjaro for any special reason

@isakal
Copy link

isakal commented Dec 7, 2019

I got this error on elementaryOS version 5.1 Hera.
I installed vscode and discord both through Flatpak and it gave me RPC eror.
So I installed both .deb files from their official sites (vscode, discord).
After unpacking both files, I started them both and it worked.

TL;DR: Install both vscode and discord form their official sites to fix it.

@CarlosDanielDev
Copy link

I got this error on elementaryOS version 5.1 Hera.
I installed vscode and discord both through Flatpak and it gave me RPC eror.
So I installed both .deb files from their official sites (vscode, discord).
After unpacking both files, I started them both and it worked.

TL;DR: Install both vscode and discord form their official sites to fix it.

I got this error on Elementary OS5.1 hera too, and this worked to me Thaks!!

@FrenzyExists
Copy link

I'm using KDE Neon and for some reason I have this error no matter what I do. I installed discord and vscode from the official sites, yet the error persists, anyone else had this issue with KDE too?

@DiZiNnEs
Copy link

I use Ubuntu 19.10 and I also have this error, downloaded from the off site well it didn’t help

@jaocarli
Copy link

I use in Windows 10 (but in my secondary account) and not working... even running as Administrator

@afcjunior
Copy link

I'm having this issue on macOS catalina. Any idea on how to fix it?

@RiccardoCafa
Copy link

RiccardoCafa commented Mar 26, 2020

Same bug here.

Windows 10
VSCode v1.43.2

Just installed Discord Presence and didn't worked.
Tried to run VSCode as administrator and still not working. Any solution?

@isakal
Copy link

isakal commented Mar 31, 2020

@RiccardoCafa After some time i had the same issue.

Solved it by reinstalling Discord Rich Presence in VSCode. From what i understand, Discord is pushing out a lot of internal and UI changes and that usually messes stuff up.

@zidny123
Copy link

Run Vs Code with administrator.

thx

@feelan03
Copy link

Same bug her
Ubuntu 20.04
VsCode 1.44.2

Just installed Discord Presence and didn't worked.

@Delusi0n4l
Copy link

Same i tried to run it as admin

@danmalloc
Copy link

Same bug her
Ubuntu 20.04
VsCode 1.44.2

Just installed Discord Presence and didn't worked.

Same for me

@markkkkas
Copy link

Same bug her
Ubuntu 20.04
VsCode 1.44.2

Just installed Discord Presence and didn't worked.

install vscode and discord from them original websites

@icarusgk
Copy link

icarusgk commented Apr 7, 2021

I solved it by opening up Discord again

@lxwulf
Copy link

lxwulf commented Apr 9, 2021

@Maritsu yeah it could be I had the same "error". I agree to give the users a tip in the README. 🤔

@EugeneGohh
Copy link

@EugeneGohh Bruh, was it rly that simple? That should be pinned or mentioned in README

Are you having the same issue when you downloaded Discord Presence?

@Maritsu
Copy link

Maritsu commented Apr 9, 2021

@EugeneGohh Bruh, was it rly that simple? That should be pinned or mentioned in README

Are you having the same issue when you downloaded Discord Presence?

@EugeneGohh I just didn't notice that Game Activity was turned off

@jlalmes jlalmes mentioned this issue Apr 21, 2021
@Rhydium
Copy link

Rhydium commented May 1, 2021

I solved this problem on Windows 10 Pro 20H2 by closing my Discord and running the DiscordSetup.exe again.
(Fixed this specific error for me and being stuck on "Connecting to Discord")

@thnhmai38
Copy link

Run Vs Code with administrator.

worked for me
VSCode : Admin
Discord : Without Admin

@AbdulHafidh-AI
Copy link

Thank you very much it worked 😁😁

@Ryan-M-Smith
Copy link

@RiccardoCafa After some time i had the same issue.

Solved it by reinstalling Discord Rich Presence in VSCode. From what i understand, Discord is pushing out a lot of internal and UI changes and that usually messes stuff up.

This worked for me, thanks!

@igotdrugsidontneedanyfriends

Run Vs Code with administrator.

worked for me VSCode : Admin Discord : Without Admin

question. What if you can't run VSCode as an Admin?

@ksteflovic
Copy link

Run Vs Code with administrator.

This helped me. Thank you

@bruhman-del
Copy link

What OS? VSCode version? More than one discord client open?

what to do if i am on linux 😢

@lxwulf
Copy link

lxwulf commented Mar 14, 2022

What OS? VSCode version? More than one discord client open?

what to do if i am on linux 😢

Yes, still need to know which version or OS you have installed and also from which source -> packet manager? flatpak? snap?

Greets LxWulf

@bschaatsbergen
Copy link

bschaatsbergen commented Apr 26, 2022

Running into this every other day, I am sometimes able to fix it by reinstalling the plugin and restarting the vscode process.

image

bruno@pop-os ~> which discord
/snap/bin/discord
bruno@pop-os ~> snap info discord 
name:      discord
summary:   All-in-one voice and text chat for gamers
publisher: Snapcrafters
store-url: https://snapcraft.io/discord
contact:   https://github.com/snapcrafters/discord/issues
license:   unset
description: |
  All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and
  phone.
  
  Snaps are confined, as such Discord may be unable to perform some of the tasks it typically does
  when unconfined. This may result in the system log getting spammed with apparmor errors. Granting
  access to the system-observe interface when in the snap will enable the features, and thus reduce
  the logging.
  
      snap connect discord:system-observe
  
  
  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - discord
snap-id:      qHVefGEBezeuCeSfTND40uoUD6GRw8BO
tracking:     latest/stable
refresh-date: today at 09:41 CEST
channels:
  latest/stable:    0.0.17 2022-02-18 (132) 86MB -
  latest/candidate: ↑                            
  latest/beta:      0.0.17 2022-02-18 (132) 86MB -
  latest/edge:      0.0.17 2022-04-09 (133) 86MB -
installed:          0.0.17            (132) 86MB -
bruno@pop-os ~> uname -a                                                                                                                                                                                                                                                                                                                                                                                                          
Linux pop-os 5.16.19-76051619-generic #202204081339~1649696161~22.04~091f44b SMP PREEMPT Mon Apr 11 17 x86_64 x86_64 x86_64 GNU/Linux

@PurplProto
Copy link

I get this issue on Windows sometimes. What works for me (no, not run as admin, you don't and shouldn't need that), was:

  1. Open Discord user settings
  2. Click Activity Status
  3. Ensure "Display current activity as a status message" is enabled
  4. Right-click Discord in the system tray
  5. Click quit
  6. Open task manager
  7. Select the "Details" tab
  8. Search for any remaining Discord processes
  9. Right-click each and click "End process tree"
  10. Start Discord
  11. Disable the Discord presence extension in VSCode
  12. Reload VSCode when it requests it
  13. Re-enable the Discord presence extension
  14. Observe no error appearing anymore 🙌

Hope that helps 😊

@debanath
Copy link

I get this issue on Windows sometimes. What works for me (no, not run as admin, you don't and shouldn't need that), was:

  1. Open Discord user settings
  2. Click Activity Status
  3. Ensure "Display current activity as a status message" is enabled
  4. Right-click Discord in the system tray
  5. Click quit
  6. Open task manager
  7. Select the "Details" tab
  8. Search for any remaining Discord processes
  9. Right-click each and click "End process tree"
  10. Start Discord
  11. Disable the Discord presence extension in VSCode
  12. Reload VSCode when it requests it
  13. Re-enable the Discord presence extension
  14. Observe no error appearing anymore 🙌

Hope that helps 😊

It did help. "The Ultimate guide to fix the issue"

@kiosion
Copy link

kiosion commented Aug 18, 2022

I get this issue on Windows sometimes. What works for me (no, not run as admin, you don't and shouldn't need that), was:

  1. Open Discord user settings
  2. Click Activity Status
  3. Ensure "Display current activity as a status message" is enabled
  4. Right-click Discord in the system tray
  5. Click quit
  6. Open task manager
  7. Select the "Details" tab
  8. Search for any remaining Discord processes
  9. Right-click each and click "End process tree"
  10. Start Discord
  11. Disable the Discord presence extension in VSCode
  12. Reload VSCode when it requests it
  13. Re-enable the Discord presence extension
  14. Observe no error appearing anymore raised_hands

Hope that helps blush

Didn't think to check for Discord processes after closing it, but can confirm this worked, there were about 10 dead Discord-related processes still open! And just to chime in as well, you absolutely shouldn't run Discord or VSCode as admin/root as a troubleshooting step

@sharpsailor
Copy link

I get this issue on Windows sometimes. What works for me (no, not run as admin, you don't and shouldn't need that), was:

  1. Open Discord user settings
  2. Click Activity Status
  3. Ensure "Display current activity as a status message" is enabled
  4. Right-click Discord in the system tray
  5. Click quit
  6. Open task manager
  7. Select the "Details" tab
  8. Search for any remaining Discord processes
  9. Right-click each and click "End process tree"
  10. Start Discord
  11. Disable the Discord presence extension in VSCode
  12. Reload VSCode when it requests it
  13. Re-enable the Discord presence extension
  14. Observe no error appearing anymore raised_hands

Hope that helps blush

Didn't think to check for Discord processes after closing it, but can confirm this worked, there were about 10 dead Discord-related processes still open! And just to chime in as well, you absolutely shouldn't run Discord or VSCode as admin/root as a troubleshooting step

I did try using above steps but no changes ,it still shows the error
currently I am on Ubuntu 22.04.1 LTS x86_64.

@cjrobbertse
Copy link

It would also seem that you need to have the discord app installed locally, but no one mentioned that... 😅

@devluisg
Copy link

devluisg commented May 4, 2023

This problem happened to me. The solution is as follows: If you are running Discord as an administrator, you must close it in the program settings. Ex: https://imgur.com/a/vlNITQ2

Okay, I'm just dropping by to give my report. It may help someone.

The same thing was happening to me - the extension only worked when I installed it, but the next day it would stop working even though nothing had changed in the system. However, when I came to look for a solution, I saw the comment from @sametgirginer and I tested it and it worked. However, I was intrigued that both the extension description and other comments were saying that this step wasn't necessary. Seeing this, I was sure that the problem was with VSCode, so I decided to do some research and found out that VSCode has two installers: the User Installer and the System Installer. It turns out that when you use the main button to install, it ends up downloading the User version. I uninstalled my VSCode and decided to download and install the System version instead, and I haven't had the problem for three days now. I hope this report can help more people.

In short, try installing the System Version instead of the User Version of VScode.

@MrS4w
Copy link

MrS4w commented May 17, 2023

I just opened VS Code as administrator and it fixed to me

@alanPaivaaspOctos
Copy link

What worked for me(Ubuntu 22.04.2 LTS):
1 - Go to the gear icon
2 - Activity Privacy on sidebar
3 - Enable the "Display current activity as a status message".

Installed vscode via snap
image

@RH203
Copy link

RH203 commented Aug 11, 2023

Windows

It did help. I use windows OS ✌️

@TheWilRD
Copy link

Este problema me pasó a mí. La solución es la siguiente: si estás ejecutando Discord como administrador, debes cerrarlo en la configuración del programa. Ej: https://imgur.com/a/vlNITQ2

Hey Thank's

@aidan959
Copy link

Also worth checking that you dont have rich presence disabled in vscode:
image

@Akronae
Copy link

Akronae commented Feb 10, 2024

For my case I had several instances of Discord running without knowing it (nothing showing in the icon tray when quitting).
I had to end all Discord processes in Task Manager, open discord again, and reconnect from VSCode.

@blackdragoon26
Copy link

I get this issue on Windows sometimes. What works for me (no, not run as admin, you don't and shouldn't need that), was:

  1. Open Discord user settings
  2. Click Activity Status
  3. Ensure "Display current activity as a status message" is enabled
  4. Right-click Discord in the system tray
  5. Click quit
  6. Open task manager
  7. Select the "Details" tab
  8. Search for any remaining Discord processes
  9. Right-click each and click "End process tree"
  10. Start Discord
  11. Disable the Discord presence extension in VSCode
  12. Reload VSCode when it requests it
  13. Re-enable the Discord presence extension
  14. Observe no error appearing anymore 🙌

Hope that helps 😊

Thanx alot, so main problem was that unnecessary service of dc running in bg.....

@timpo14
Copy link

timpo14 commented Aug 8, 2024

Also worth checking that you dont have rich presence disabled in vscode: image

Why my Discord missing this? I dont know, maybe i'm blind, but i'm don't see it
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests