SandwichFox / MBCord

An Emby/Jellyfin rich presence client for Discord ✨
https://mbcord.sandwichfox.de
MIT License
30 stars 3 forks source link

Toggling "Display as Status" in context menu causes error #41

Open Exhabition opened 1 year ago

Exhabition commented 1 year ago
TypeError: Cannot read properties of null (reading 'write')
    at IPCTransport.send (C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\node_modules\discord-rpc\src\transports\ipc.js:155:17)
    at C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\node_modules\discord-rpc\src\client.js:159:22
    at new Promise (<anonymous>)
    at RPCClient.request (C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\node_modules\discord-rpc\src\client.js:157:12)
    at RPCClient.clearActivity (C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\node_modules\discord-rpc\src\client.js:540:17)
    at toggleDisplay (C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\main.js:211:36)
    at click (C:\Users\Luke\AppData\Local\Programs\mbcord\resources\app.asar\main.js:345:18)
    at MenuItem.click (node:electron/js2c/browser_init:2:30166)
    at a._executeCommand (node:electron/js2c/browser_init:2:35562)

DEBUG INFO: Development Mode: false Platform: win32 (Version 10.0.22621) Architecture: x64 MBCord version: 3.0.6 Node version: 16.17.1 Electron version: 22.0.0 Chrome version: 108.0.5359

SandwichFox commented 1 year ago

Thats strange, i cant repro this issue.

Exhabition commented 1 year ago
[Sat Dec 31 2022 09:39:22 GMT+0100 (Central European Standard Time)] info: DEBUG INFO:
Development Mode: false
Platform: win32 (Version 10.0.22621)
Architecture: x64
MBCord version: 3.0.6
Node version: 16.17.1
Electron version: 22.0.0
Chrome version: 108.0.5359
[Sat Dec 31 2022 09:39:22 GMT+0100 (Central European Standard Time)] debug: Attempting to log into server
[Sat Dec 31 2022 09:39:22 GMT+0100 (Central European Standard Time)] debug: {
 "port": "8096",
 "protocol": "http",
 "serverType": "emby",
 "isSelected": true,
 "ignoredViews": [],
 "serverId": "ebccb760b1cc4815acaa055d3edc9206",
 "serverName": "e0be3b74840a"
}
[Sat Dec 31 2022 09:39:22 GMT+0100 (Central European Standard Time)] error: Failed to connect to Discord. Attempting to reconnect in 30 seconds
[Sat Dec 31 2022 14:38:07 GMT+0100 (Central European Standard Time)] debug: doDisplayStatus: false
[Sat Dec 31 2022 14:38:07 GMT+0100 (Central European Standard Time)] error: Cannot read properties of null (reading 'write')
[Sat Dec 31 2022 14:40:09 GMT+0100 (Central European Standard Time)] debug: doDisplayStatus: true

Hmm, seems like it failed to connect and also didn't actually attempt to reconnect, so I think this issue will happen when the RP isn't connected to Discord?

SandwichFox commented 1 year ago

Sorry for this late response, is discord running when this error is occuring?