rivenmedia / riven-frontend

Source code for Riven's frontend
https://debrid.wiki
GNU General Public License v3.0
15 stars 8 forks source link

[BUG] Trakt errors 401 and 405, cannot authorize #119

Closed theincredibleman closed 1 week ago

theincredibleman commented 1 week ago

When Trakt is added trough the frontend along with the API key and a watchlist and user list, the following errors show in the log:

❌ ERROR     | trakt._fetch_data - Error fetching data: Client error with status 405
❌ ERROR     | trakt._fetch_data - Error fetching data: Client error with status 401

This is likely because the redirect URI is not authorized and there is no way to do so in the frontend using a pin.

image

This is in my settings.json:

 "trakt": {
            "update_interval": 300,
            "enabled": true,
            "api_key": "<redacted>",
            "watchlist": [
                "https://trakt.tv/users/<redacted>/watchlist"
            ],
            "user_lists": [
                "https://trakt.tv/users/<redacted>/lists/<redacted>"
            ],
            "collection": [],
            "fetch_trending": false,
            "trending_count": 10,
            "fetch_popular": false,
            "popular_count": 10
        }
    }
theincredibleman commented 1 week ago

I changed my settings.json to this and now my own watchlist is working and error 405 is gone:

 "trakt": {
            "update_interval": 300,
            "enabled": true,
            "api_key": "<redacted>",
            "watchlist": [
                "<username>"
            ],
            "user_lists": [
                "https://trakt.tv/users/<redacted>/lists/<redacted>"
            ],
            "collection": [],
            "fetch_trending": false,
            "trending_count": 10,
            "fetch_popular": false,
            "popular_count": 10
        }
    }

The user watchlist (a friend's list which is in my liked lists) still isn´t though and error 401 remains, I wonder if this is another issue and unrelated to API authentication?

filiptrplan commented 1 week ago

@dreulavelle Is this related to the recent complaints about Trakt from Discord or is it another issue?

dreulavelle commented 1 week ago

We don't use oauth yet, so the redirect URI is never used. But the field can't be blank either, so anything can be used. This is a different issue that I don't think it's us, but will need someone to test a I haven't used Trakt lately.

What complaints?

theincredibleman commented 1 week ago

Was able to workaround by following friends and adding their watchlists directly and skipping user lists entirely.


"trakt": {
            "update_interval": 60,
            "enabled": true,
            "api_key": "<redacted>",
            "watchlist": [
                "<user1>",
                "<user2>",
                "<user3>"
            ],
            "user_lists": [],
            "collection": [],
            "fetch_trending": false,
            "trending_count": 10,
            "fetch_popular": false,
            "popular_count": 10
        }
    }