strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.7k stars 188 forks source link

Playback fails for Tidal #599

Closed kjetilk closed 3 years ago

kjetilk commented 3 years ago

Describe the bug After extracting a client ID from my phone and logging in to Tidal, I get an error Asset is not ready for playback (401) (4005) when trying to play a song

To Reproduce

  1. Get a Client ID from and Android phone,
  2. Add that as Client ID to the OAuth authentication
  3. Log into Tidal with a browser
  4. Note it says that I'm logged in
  5. Play song

Expected behavior Song should start to play

Screenshots: If applicable, add screenshots to help explain your problem.

System Information:

Additional context Since I see the number 401 in the error message, I suppose that might be an HTTP 401 error, which may indicate that authentication actually failed, since it would be more likely a 403 if I hadn't been authorized.

Forgot to say, I had the exact same setup working until I got a new phone and upgraded the Tidal app on that. I suppose the consequence of that upgrade was that the token was invalidated. I struggle to understand why Tidal wants to make it so hard, I only want to play music that I've paid a subscription for. :-(

jonaski commented 3 years ago

It works here. The "Asset is not ready for playback" error usually occurs if you try to play a track that is not available in your region. 401 isn't a HTTP error, it's the status code returned by Tidal. I found this which explains some of the error codes, looks like these are the sub codes: https://support.auralic.com/hc/en-us/articles/360050462133-Lightning-DS-TIDAL-Error-Codes

kjetilk commented 3 years ago

OK; useful list. What ought to be the same track plays on my mobile and in the browser, so it shouldn't be a region issue. However, I see the error code 4005 in that list, which is 4005 Track is not valid. I suppose that could imply that Strawberry has retained a list of tracks that is now invalid. Perhaps that could be the issue? Possibly, Strawberry has an internal structure that represents artists, albums, tracks, which connects to a Tidal Track, but that Tidal Track has been invalidated with the updated client, and so, it fails?

I've tried to refresh the catalog, it didn't help.

jonaski commented 3 years ago

If you get the same error for all songs, it has to be related to your subscription or the client id. I can't really give much support for Tidal. As long as it works for everyone else, it's hard for me to tell why you get that error.

cepB commented 3 years ago

Streamurl method no longer works with your OAuth authentication method for some reason. But it works with https://github.com/tamland/python-tidal/blob/0.6.x/tidalapi/__init__.py#L229 So, I changed the Stream URL method from streamurl to playbackinfopostpaywall in the Tidal settings and it worked.

jonaski commented 3 years ago

It still works for me

kjetilk commented 3 years ago

It has failed for me too... It has been quite unstable lately actually. I just wrote Tidal an email saying that they should offer people to get a Client ID from their Web pages, they said they would take it up with product. It'll be interesting to see what they will say. I said I'll terminate my subscription if they don't, which I will, I'm just too tired of it being hard to use a product that I pay for...