ArturSierzant / OMPD

O!MPD is free, opensource MPD client based on PHP and mySQL.
http://ompd.pl
GNU General Public License v3.0
40 stars 13 forks source link

Tidal search error #125

Closed paradix closed 4 years ago

paradix commented 4 years ago

Hi, today I noticed following error while looking up TIDAL results

image

Is there any way to check the exception causing this error? Does O!MPD has any debug log besides the update debug?

ArturSierzant commented 4 years ago

Hi, does it only happen for albums or generally for all Tidal actions? Does it happen all the time or only from time to time?

There is no additional debugging, unfortunately. But in this case null means that you probably received empty answer from Tidal. In case of error Tidal returns something like this:

array(3) {
  ["status"]=>
  int(401)
  ["subStatus"]=>
  int(6004)
  ["userMessage"]=>
  string(13) "Invalid token"
}

O!MPD takes value of userMessage and displays it as Error message. Since it's null I think that whole answer is null/empty.

Maybe try with other token.

Regards, Artur

paradix commented 4 years ago

This happens all the time in all the use cases, but it used to work with the token I have. Also this token works with a different application.

ArturSierzant commented 4 years ago

To see the whole answer from Tidal try this: in tidalapi\tidal_api.php find line 79 which is: $errors['error'] = $res_json["userMessage"]; and replace it with: $errors['error'] = $server_output;

In my case, for very long token which used to work some time ago, but is not valid anymore, I have the following result: image

Without changes in tidal_api.php and with invalid token I have the same result as You: image

Anyway, please try it and let's see what is the answer from Tidal.

paradix commented 4 years ago

I get the same error message with my token

Error message:

{"status":401,"subStatus":3009,"userMessage":null}
ArturSierzant commented 4 years ago

Try to use uncommented token from here: https://cdn.jsdelivr.net/gh/yaronzz/Tidal-Media-Downloader@latest/Else/tokens.json

paradix commented 4 years ago

found it elsewhere and it works. Dzięki 👍

ArturSierzant commented 4 years ago

Proszę :)