fredemmott / StreamDeck-Discord

Control the Discord application with the Elgato StreamDeck
MIT License
275 stars 23 forks source link

Have to Keep Reauthenticating Plugin to Keep It Working #87

Open daylightEX opened 2 years ago

daylightEX commented 2 years ago

Describe the bug Every now and then, when my PC is powered on, I am forced to click 'Reauthenticate' in order for the plugin to continue working.

To Reproduce It seems to happen after several power downs/restarts of the PC before it requires reauthenticating.

Log File

03:47:45.078 DiscordClient.cpp: Opened connection to Discord, starting authentication 03:48:08.864 DiscordStreamDeckPlugin.cpp: PI event: com.fredemmott.discord.rpc.getState 03:48:10.229 DiscordStreamDeckPlugin.cpp: PI event: com.fredemmott.discord.rpc.reauthenticate 03:48:10.229 DiscordStreamDeckPlugin.cpp: Disconnected from Discord 03:48:10.385 DiscordClient.cpp: Opened connection to Discord, starting authentication 03:48:12.216 DiscordStreamDeckPlugin.cpp: Got new credentials for app id 767536193045921802 with an oauth token 03:48:13.578 DiscordClient.cpp: Authenticated/authorized, setting up subscriptions 03:48:13.579 DiscordClient.cpp: Sent subscription requests 03:48:13.579 DiscordClient.cpp: Waiting for initial data 03:48:13.579 DiscordClient.cpp: - waiting for VOICE_CHANNEL_SELECT 03:48:13.580 DiscordClient.cpp: - received VOICE_CHANNEL_SELECT 03:48:13.580 DiscordClient.cpp: - waiting for VOICE_SETTINGS_UPDATE 03:48:13.581 DiscordClient.cpp: VOICE_SETTINGS_UPDATE: ----- received event ----- 03:48:13.581 DiscordClient.cpp: > VOICE_SETTINGS_UPDATE: {"deaf":true,"mode":{"type":"VOICE_ACTIVITY"},"mute":true} 03:48:13.581 DiscordClient.cpp: > VOICE_SETTINGS_UPDATE: ----- done ----- 03:48:13.581 DiscordClient.cpp: - received VOICE_SETTINGS_UPDATE 03:48:13.581 DiscordClient.cpp: Received all initial data 03:48:13.585 DiscordStreamDeckPlugin.cpp: Discord client ready 04:03:06.131 DiscordStreamDeckPlugin.cpp: PI event: com.fredemmott.discord.rpc.getState

Operating System

Win 10 Pro 64-Bit (Latest Build)

aramova commented 2 years ago

Also running into this as well. StreamDeck is setup to run as my user upon login with highest privilege resulting in running as Administrator so it can run keybindings.

I need to delete and reauth the Discord with the app open each time, it feels though if Streamdeck launches before Discord it times out on the reauth step and fails, maybe a bug with the Discord API implementation or how Streamdeck handles saving auth tokens?