eclipse-discord-integration
eclipse-discord-integration copied to clipboard
Does not work with snap version of eclipse
Bug description
Does not work with snap version of eclipse. Tried my own API key, along with adding eclipse manually. Doesn't show the rich presence
Expected behavior
It works
How to reproduce
Steps to reproduce the behavior:
- Open Eclipse
- Check Discord
- Witness the error
Additional context
- Plug-in version: 1.1.1 (didn't work in earlier versions either)
- Eclipse IDE version: 2019-03 (4.11.0)
I just tested the plug-in on the 2019-03 package for Java developers and it works as expected on my side. A few questions to investigate the issue:
- When you say that it doesn't show the rich presence, do you mean that Discord shows nothing at all, not even the following?
![](https://user-images.githubusercontent.com/25926433/66129167-a9c95800-e5ef-11e9-94fb-0a07b988d026.png)
-
By "adding Eclipse manually", you mean that you registered Eclipse IDE in Discord through
User Settings > Game Activity
as specified in the documentation? -
Could you check Eclipse's Error Log view (
Window > Show View > Error Log
) and tell me whether you find a log that seems related to the plug-in? -
Could you check that the plug-in is activated on startup?
-
Window > Preferences > General > Startup and Shutdown
- Discord Rich Presence for Eclipse IDE should be checked:
-
![](https://user-images.githubusercontent.com/25926433/66130291-c5356280-e5f1-11e9-9ab3-e0a23deac7d7.png)
-
You specified "snap version", I will assume you refer to an Eclipse IDE installed through snapcraft. As I work on Windows I cannot test it right now; did you try with an Eclipse package installed from the official website?
-
You said that the plug-in wasn't working earlier, so you tried the
1.0.3
release?
Can confirm on Zorin OS 15 (based on Ubuntu 18.04) with Eclipse 2019-03 (latest stable snap release) and Discord Rich Presence 1.0.3.
To respond to the 6 points above:
- Eclipse shows up like this:
- I added
eclipse
manually to Discord usingSettings > Game Activity
. - No logs related to the plug-in at first glance. Some errors in
org.eclipse.ui
,org.eclipse.jdt
and sonarlint. - Discord Rich Presence is checked in
Startup and Shutdown
. I've also double-checked that it's enabled for the open project. - I'm using the version from snapcraft. Haven't tested another one (yet).
-
Eclipse shows up with a lowercase e, like @Komposten showed.
-
Yes, and I also tried without
-
Nothing of relevance.
eclipse.log
-
-
I installed eclipse with
snap install eclipse --classic
I am unable to build the dependencies to install this with the official website, but I can try later as long as I figure out how to keep all my settings and stuff. -
Yes
I just tried installing Eclipse for Java Developers 2019-09 from the website and run that with Discord Rich Presence 1.1.0. Still having the same issue.
About adding Eclipse manually to Discord, I actually have two options:
-
eclipse
: Maps to the Eclipse executable (currently/home/komposten/Desktop/eclipse/eclipse
for the 2019-09 test install). If I run Eclipse from the terminal this may have a different name (e.g../eclipse
instead). -
Eclipse - [current file name] - Eclipse IDE
: Maps to the Java executable (/usr/bin/java
).
If I add either of those to Discord it will simply show the name and the uptime. No icon or anything like that, just like in my previous screenshot. If I don't add either of them manually, Discord shows nothing.
Thank you both for your time. By default when Discord doesn't know the application it shows the name of the executable; that also means that it receives no message from my plug-in.
At this point I have two hypothesis:
- either there is a bug in my code, in which case I should be able to fix it quickly,
- or the library I use to communicate with Discord does not support your OS, in which case I don't know if I will be able to fix the issue.
I'm going to run some tests in a VM and I'll keep you updated.
@S-B99 could you tell me which OS you are using?
I am running KDE Neon 5.16
Operating System: KDE neon 5.16
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.3
Kernel Version: 5.0.0-29-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6300HQ CPU @ 2.30GHz
Memory: 7.6 GiB of RAM
Linux is indeed supported but issues have already been reported on some distributions. #39 reported an issue on Ubuntu 18.04.
I know that under the hood the library embeds platform-specific binaries of the Discord SDK (see discord-rpc-release) and they might not work as expected on some distributions.
I managed to reproduce the issue on a Zorin OS 15 VM; I'll debug it tomorrow.
I did some research, and sadly it seems that Discord RPC does not behave well with snap, see: https://github.com/discordapp/discord-rpc/issues/213#issuecomment-410631101
I can confirm that the plug-in works as expected on Zorin OS 15 when both Discord and Eclipse IDE are installed manually.
It looks like some people managed to fix the issue by adapting some paths but that looks pretty low level so I don't know whether it's possible for me to do it. I'll see what I can do.
I may have Discord installed through snap, which could explain why it didn't work even with a manually installed Eclipse. Will double-check this later.
What do you mean by manually with snap? And it doesn't work on KDE Neon 5.16 Oh I actually reacted to that issue before, I guess it slipped my mind. Thank you!
What do you mean by manually with snap?
My bad, I meant "when both Discord and Eclipse IDE are installed manually". I fixed the typo.
@S-B99 could you try to install the software manually to check whether it works? You said previously that you had to "build the dependencies to install from the official website"; I am not used to KDE Neon but since it's based on Ubuntu can't you download the official Linux package?
Yes, this solution looks interesting but seems to be relevant for users of the Discord VS Code plug-in only. It works for this plug-in because the author(s) — as far as I can see — ported the Discord RichPresence SDK to JavaScript. As they rewrite it they have full control on how they send information to the Discord application.
For my part, I rely on java-discord-rpc which binds the official Discord SDK to a Java API. In other words, we do not have any control on how information are sent to the Discord application. As a result, I don't think that this solution is applicable here.
Oh alright. The official linux packages should work now, I fixed JDK last night. That's unfortunate. I'll try the non snap Eclipse package. My discord is using the deb. Also, Zorin seems to be based on Ubuntu along with KDE Neon
Leaving this here so someone can pin it on me for not replying tomorrow. Sorry, I've been busy outside the country the past week.
"Installed" the full eclipse version, it works, thanks. So this is a containering bug.
Any word on getting this to work with snap?
Hi, sorry for not answering earlier: I was not at home past week.
In order to fix the issue I need a Java implementation of Discord SDK and the only one I found is neither mature nor maintained. I however cannot afford the time to update the library so, since an alternative is available (i.e. installing both Eclipse IDE and Discord by hand) I do not plan to work on this soon.
I am deeply sorry about that; anyone willing to help is of course more than welcome to take over the library so that I can use it in the plug-in.
That's alright, thanks for your reply!
Thanks for making this, it works great as long as you're not using snaps
Hello there, I already had to deal with snapcraft and flatpak and I figured I'd share my experience.
The issue here is that those two softwares make a sandbox around discord or eclipse, the problem is that in the end eclipse might not found the socket file to connect to send informations to,
I already found a workaround for flatpak which is simply to make a symlink from $XDG_RUNTIME_DIR/app/com.discordapp.Discord/discord-ipc-0 to $XDG_RUNTIME_DIR. Meanwhile that work, eclipse have to be installed without using flatpak nor snapcraft :roll_eyes:.
as for snapcraft, I have no idea, I have found multiple issues with workarounds but they all don't work.
Just a note for others: This also does not work on the snap version of discord.
You must install both Eclipse and Discord outside of snap.
You'd need to have the discord socket file in $XDG_RUNTIME_DIR for it to work on an Unix system, that's how discord-rpc was made https://github.com/discord/discord-rpc/blob/master/src/connection_unix.cpp#L52-L77