jsiegenthaler / homebridge-eosstb

A homebridge plugin for the EOS set-top box as used by Sunrise, Telenet, Ziggo, Virgin Media and maybe more in various countries on the Horizon Go (HGO) platform
https://github.com/jsiegenthaler/homebridge-eosstb
32 stars 4 forks source link

Unable to oauth authorize: 404 Not Found #98

Closed groovyf closed 1 year ago

groovyf commented 1 year ago

Describe The Bug: Every 15 seconds or so, the EOSSTB plugin attempts to connect & authenticate, but fails

To Reproduce: Issue reproduces every 15 seconds

Expected behavior: Expect session to login correctly a single time

Logs:

[2/16/2023, 2:04:20 PM] [EOSSTB] Failed to create session - Step 4 of 7: Unable to oauth authorize: 404 Not Found
[2/16/2023, 2:04:33 PM] [EOSSTB] Session DISCONNECTED. Starting session connection process
[2/16/2023, 2:04:33 PM] [EOSSTB] Creating eosstb GB session...
[2/16/2023, 2:04:33 PM] [EOSSTB] Step 1 of 7: get authentication details
[2/16/2023, 2:04:33 PM] [EOSSTB] Step 1 of 7: response: 200 OK
[2/16/2023, 2:04:33 PM] [EOSSTB] Step 2 of 7: get AUTH cookie
[2/16/2023, 2:04:34 PM] [EOSSTB] Step 2 of 7: response: 200 OK
[2/16/2023, 2:04:34 PM] [EOSSTB] Step 3 of 7: logging in with username xxx@xxx.com (email redacted)
[2/16/2023, 2:04:34 PM] [EOSSTB] Step 3 of 7: response: 200 OK
[2/16/2023, 2:04:34 PM] [EOSSTB] Step 4 of 7: follow redirect url
[2/16/2023, 2:04:34 PM] [EOSSTB] Failed to create session - Step 4 of 7: Unable to oauth authorize: 404 Not Found
[2/16/2023, 2:04:48 PM] [EOSSTB] Session DISCONNECTED. Starting session connection process
[2/16/2023, 2:04:48 PM] [EOSSTB] Creating eosstb GB session...
[2/16/2023, 2:04:48 PM] [EOSSTB] Step 1 of 7: get authentication details
[2/16/2023, 2:04:48 PM] [EOSSTB] Step 1 of 7: response: 200 OK
[2/16/2023, 2:04:48 PM] [EOSSTB] Step 2 of 7: get AUTH cookie
[2/16/2023, 2:04:49 PM] [EOSSTB] Step 2 of 7: response: 200 OK
[2/16/2023, 2:04:49 PM] [EOSSTB] Step 3 of 7: logging in with username xxx@xxx.com (email redacted)
[2/16/2023, 2:04:49 PM] [EOSSTB] Step 3 of 7: response: 200 OK
[2/16/2023, 2:04:49 PM] [EOSSTB] Step 4 of 7: follow redirect url
[2/16/2023, 2:04:49 PM] [EOSSTB] Failed to create session - Step 4 of 7: Unable to oauth authorize: 404 Not Found
[2/16/2023, 2:05:03 PM] [EOSSTB] Session DISCONNECTED. Starting session connection process
[2/16/2023, 2:05:03 PM] [EOSSTB] Creating eosstb GB session...
[2/16/2023, 2:05:03 PM] [EOSSTB] Step 1 of 7: get authentication details
[2/16/2023, 2:05:03 PM] [EOSSTB] Step 1 of 7: response: 200 OK
[2/16/2023, 2:05:03 PM] [EOSSTB] Step 2 of 7: get AUTH cookie
[2/16/2023, 2:05:04 PM] [EOSSTB] Step 2 of 7: response: 200 OK
[2/16/2023, 2:05:04 PM] [EOSSTB] Step 3 of 7: logging in with username xxx@xxx.com (email redacted)
[2/16/2023, 2:05:04 PM] [EOSSTB] Step 3 of 7: response: 200 OK
[2/16/2023, 2:05:04 PM] [EOSSTB] Step 4 of 7: follow redirect url
[2/16/2023, 2:05:04 PM] [EOSSTB] Failed to create session - Step 4 of 7: Unable to oauth authorize: 404 Not Found

Plugin Config:

{
    "bridge": {
        "name": "Homebridge CBA7",
        "username": "xxx",
        "port": 51633,
        "pin": "xxx"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "Wemo",
            "mode": "auto",
            "platform": "Wemo"
        },
        {
            "name": "Miele@home",
            "clientID": "xxx",
            "clientSecret": "xxx",
            "language": "en",
            "reconnectEventServerInterval": 60,
            "platform": "Miele@home"
        },
        {
            "tvs": [
                {
                    "name": "SonyTV",
                    "ip": "192.168.0.xxx",
                    "soundoutput": "speaker"
                }
            ],
            "platform": "BraviaPlatform"
        },
        {
            "name": "EOSSTB",
            "country": "gb",
            "username": "xxx@xxx.com",
            "password": "xxx",
            "doublePressTime": 250,
            "triplePressTime": 1200,
            "doublePressDelayTime": 300,
            "devices": [
                {
                    "syncName": true,
                    "accessoryCategory": "settopbox",
                    "channelOrder": "channelOrder",
                    "maxChannels": 95,
                    "showChannelNumbers": false,
                    "arrowUpButton": "ArrowUp",
                    "arrowUpButtonDoubleTap": "ChannelUp",
                    "arrowDownButton": "ArrowDown",
                    "arrowDownButtonDoubleTap": "ChannelDown",
                    "arrowLeftButton": "ArrowLeft",
                    "arrowLeftButtonDoubleTap": "MediaRewind",
                    "arrowRightButton": "ArrowRight",
                    "arrowRightButtonDoubleTap": "MediaFastForward",
                    "selectButton": "Enter",
                    "selectButtonDoubleTap": "Enter",
                    "playPauseButton": "MediaPlayPause",
                    "playPauseButtonDoubleTap": "MediaPlayPause",
                    "backButton": "Escape",
                    "backButtonDoubleTap": "Escape",
                    "infoButton": "MediaTopMenu",
                    "infoButtonDoubleTap": "Guide",
                    "viewTvSettingsCommand": "Help"
                }
            ],
            "platform": "eosstb"
        },
        {
            "name": "Hub",
            "hubIP": "192.168.0.xxx",
            "hubName": "Hub",
            "mainActivity": "Watch TV",
            "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000,
            "HUB_CONNECT_TIMEOUT": 10000,
            "HUB_SEND_TIMEOUT": 30000,
            "publishGeneralMuteSwitch": true,
            "platform": "HarmonyHubWebSocket"
        },
        {
            "controllers": [
                {
                    "address": "192.168.0.xxx",
                    "password": "xxx",
                    "username": "xxx"
                }
            ],
            "platform": "UniFi Protect"
        }
    ]
}

Screenshots:

Environment:

groovyf commented 1 year ago

To confirm, I can successfully login to my Virgin Media account using the same credentials I use for the EOSSTB plugin. Unsure how long this oauth failing has been happening as I don't often look at my Homebridge console.

Having just restarted Homebridge, the logs now show: [2/16/2023, 2:15:07 PM] [EOSSTB] Session DISCONNECTED. Starting session connection process [2/16/2023, 2:15:07 PM] [EOSSTB] Creating eosstb GB session... [2/16/2023, 2:15:07 PM] [EOSSTB] Step 1 of 7: get authentication details [2/16/2023, 2:15:08 PM] [EOSSTB] Step 1 of 7: response: 200 OK [2/16/2023, 2:15:08 PM] [EOSSTB] Step 2 of 7: get AUTH cookie [2/16/2023, 2:15:09 PM] [EOSSTB] Step 2 of 7: response: 200 OK [2/16/2023, 2:15:09 PM] [EOSSTB] Step 3 of 7: logging in with username xxx@xxx.com (email redacted) [2/16/2023, 2:15:09 PM] [EOSSTB] Step 3 of 7: response: 200 OK [2/16/2023, 2:15:09 PM] [EOSSTB] Step 4 of 7: follow redirect url [2/16/2023, 2:15:09 PM] [EOSSTB] Step 4 of 7: response: 302 Found [2/16/2023, 2:15:09 PM] [EOSSTB] Step 5 of 7: extract authorizationCode [2/16/2023, 2:15:09 PM] [EOSSTB] Step 5 of 7: authorizationCode OK [2/16/2023, 2:15:09 PM] [EOSSTB] Step 6 of 7: post auth data with valid code [2/16/2023, 2:15:09 PM] [EOSSTB] Step 6 of 7: response: 200 OK [2/16/2023, 2:15:09 PM] [EOSSTB] Step 7 of 7: post refreshToken request [2/16/2023, 2:15:10 PM] [EOSSTB] Step 7 of 7: response: 200 OK [2/16/2023, 2:15:10 PM] [EOSSTB] Session created

Is there some session timeout that occurs which after some time causes the plugin to disconnect and try to reconnect?

groovyf commented 1 year ago

Update: Logs already showing oauth failures:

[2/16/2023, 2:50:33 PM] [EOSSTB] Session DISCONNECTED. Starting session connection process [2/16/2023, 2:50:33 PM] [EOSSTB] Creating eosstb GB session... [2/16/2023, 2:50:33 PM] [EOSSTB] Step 1 of 7: get authentication details [2/16/2023, 2:50:33 PM] [EOSSTB] Step 1 of 7: response: 200 OK [2/16/2023, 2:50:33 PM] [EOSSTB] Step 2 of 7: get AUTH cookie [2/16/2023, 2:50:34 PM] [EOSSTB] Step 2 of 7: response: 200 OK [2/16/2023, 2:50:34 PM] [EOSSTB] Step 3 of 7: logging in with username xxx@xxx.com (email redacted) [2/16/2023, 2:50:34 PM] [EOSSTB] Step 3 of 7: response: 200 OK [2/16/2023, 2:50:34 PM] [EOSSTB] Step 4 of 7: follow redirect url [2/16/2023, 2:50:34 PM] [EOSSTB] Failed to create session - Step 4 of 7: Unable to oauth authorize: 404 Not Found

jsiegenthaler commented 1 year ago

Hi @groovyf I'd like to help. I need to see why the session disconnects. Set debug log level to verbose, and enable also homebridge debug mode. This will log a very large amount of data. Create a log of a reboot and then showing when the session disconnects. redact the log and send it to me by email. My email is my github username with a b between the j and s, at that well known email service starting with a g.

jsiegenthaler commented 1 year ago

Please try v2.2.2 and report back

groovyf commented 1 year ago

Apologies for not getting back with logs. I’ll get the new version tested. Very odd though, just looking at logs now and there are no errors at all, despite me not making any changes at all!

jsiegenthaler commented 1 year ago

Could have been a back end problem. If v2.2.2 works without issue, then all is good. Let me know.

jsiegenthaler commented 1 year ago

Closing due to no response