discord / discord-rpc

https://discordapp.com/developers
MIT License
1.06k stars 327 forks source link

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

Open vadi2 opened 6 years ago

vadi2 commented 6 years ago

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 commented 6 years ago

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

msciotti commented 6 years ago

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?

vadi2 commented 6 years ago

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

It doesn't show them for Qt Creator.

msciotti commented 6 years ago

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?

vadi2 commented 6 years ago

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?

msciotti commented 6 years ago

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.

MinnDevelopment commented 6 years ago

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