tehkillerbee / mopidy-tidal

Tidal Backend plugin for Mopidy
Apache License 2.0
93 stars 28 forks source link

OAuth session expires after some time #37

Closed tehkillerbee closed 3 years ago

tehkillerbee commented 3 years ago

I have noticed that the new OAuth login appears to stop working after some time on my setup. It is possible that the session expires after some time and must be renewed (refresh token). This is currently not handled correctly by mopidy-tidal and therefore the following error is seen in the log:

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: XX

The temporary solution is a restart of the mopidy service and reauthentification by visiting the OAuth link.

If anyone else has noticed this, please feel free to update this issue.

See https://github.com/tamland/python-tidal/issues/65 for more details

greggilbert commented 3 years ago

I also just noticed this. Haven't found a workaround, though - still need to do the manual link the most recent token.

tehkillerbee commented 3 years ago

@greggilbert The issue is already fixed in the latest python-tidal sources. However, the PyPi package has not been updated yet.

Therefore, the easiest workaround is to pull the latest python-tidal sources, checkout the 0.6.x branch and execute setup.py

Eg. remove tidalapi package using pip, then install the latest version from git:

git clone https://github.com/tamland/python-tidal.git
cd python-tidal
git checkout remotes/origin/0.6.x
sudo python3 setup.py install --force

Then restart the mopidy service and everything should work as expected.

For now, this workaround will be needed until the next official python-tidal PyPi release

voskuh commented 3 years ago

Works great! Had the same problem and needed to visit the Oauth link every week. Now the session expired again. I removed tidalapi and did the steps above. I restarted mopidy and I got a new token automatically without visiting the Oauth link.

tehkillerbee commented 3 years ago

I have been testing over the last few months and have not had any issues. Closing this issue.