EthanC / Perplex

Discord Rich Presence implementation for Plex.
MIT License
86 stars 10 forks source link

Failed to connect to Discord (Could not find Discord installed and running on this machine.) #13

Closed raphattack closed 2 years ago

raphattack commented 2 years ago

Getting this error when running the script:

2022-04-20 03:28:57.681 | ERROR    | __main__:LoginDiscord:163 - Failed to connect to Discord (Could not find Discord installed and running on this machine.) retry in 15s...
EthanC commented 2 years ago

Is Discord installed and running on the same PC as the script...?

I can't reproduce this issue myself, and there's no information for me to begin to diagnose your problem.

raphattack commented 2 years ago

Yes, Discord is installed and running on the same PC as the script: image

Rather than close the issue that's only been open for less than a day, it would be helpful if you requested information that might be needed to help you debug.

I just tried replacing my plex username and password with junk values and the script still seems to "authenticate", so clearly that is not working properly:

$ python3.10 -V
Python 3.10.4

$ cat config.json
{
    "logging": {
        "severity": "DEBUG"
    },
    "plex": {
        "username": "blablahblah",
        "password": "fake_pw",
        "twoFactor": false,
        "servers": ["dummy_server"],
        "users": ["some_user"]
    },
    "tmdb": {
        "enable": true,
        "apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "discord": {
        "appId": 923857760897101855,
        "minimal": false
    }
}

$ python3.10 perplex.py
2022-04-20 19:16:50.783 | INFO     | __main__:Initialize:29 - Perplex
2022-04-20 19:16:50.783 | INFO     | __main__:Initialize:30 - https://github.com/EthanC/Perplex
2022-04-20 19:16:50.786 | SUCCESS  | __main__:LoadConfig:82 - Loaded configuration
2022-04-20 19:16:51.367 | SUCCESS  | __main__:LoginPlex:141 - Authenticated with Plex
2022-04-20 19:16:51.375 | ERROR    | __main__:LoginDiscord:163 - Failed to connect to Discord (Could not find Discord installed and running on this machine.) retry in 15s...