discord-rpc icon indicating copy to clipboard operation
discord-rpc copied to clipboard

[Question] Rich Presence doesn't work when launched from CLion

Open vadi2 opened this issue 6 years ago • 7 comments

This is odd, but when I launch my app from Qt Creator, the game is detected okay and rich presence integration works.

When I launch my app from CLion, the game is detected okay but rich presence integration does not work.

What could be going wrong?

vadi2 avatar Jun 08 '18 02:06 vadi2

I call Discord_Initialize just the same and that works, but handleDiscordReady is never triggered.

vadi2 avatar Jun 08 '18 02:06 vadi2

Does the error callback return anything? If you open up your Discord console—control shift i/cmd option i—do you see the connection being made?

msciotti avatar Jun 08 '18 16:06 msciotti

handleDiscordError doesn't get tripped up. Console shows errors: discordapp.com-1528477023568.log

It doesn't show them for Qt Creator.

vadi2 avatar Jun 08 '18 16:06 vadi2

Sorry—circling back to this now. What operating system are you using? Perhaps CLion is doing some sandboxing that prevents it from calling out to the local Discord client?

msciotti avatar Jun 19 '18 23:06 msciotti

Ubuntu and clion is run as a snap - which do offer sandboxes but I don't think it's used here. If there was, Discord wouldn't see anything at all, right?

vadi2 avatar Jun 20 '18 01:06 vadi2

The log you posted isn't quite the full story—could you post a log from Discord that shows connection open -> close, and expand any errors in there?

Snaps and local sockets haven't played well with Discord in my recent experience, but that's been an issue of installing Discord via snap, not other apps trying to talk to Discord.

msciotti avatar Jun 20 '18 18:06 msciotti

According to the CLion snap description it is unconfined and has access to all system resources.

MinnDevelopment avatar Jun 20 '18 20:06 MinnDevelopment