jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
401 stars 24 forks source link

WARN-OpenLyrics: Received musixmatch search result but body was malformed: {"message":{"header":{"status_code":401,"execute_time":0.001,"hint":"renew"}}} #284

Closed MegaBidoof closed 11 months ago

MegaBidoof commented 11 months ago

When attempting to search for lyrics, with Musixmatch as one of the sources, I get the following error, and no lyrics are retrieved from Musixmatch: WARN-OpenLyrics: Received musixmatch search result but body was malformed: {"message":{"header":{"status_code":401,"execute_time":0.001,"hint":"renew"}}}

I believe 401 is an authorization error, probably related to my Authentication Token. So it probably is just due to me having put the wrong token in the "Musixmatch Authentication Token" field.

The 2 different tokens I tried inputting on the "Musixmatch Authentication Token" field were:

  1. API key, obtained directly from Musixmatch by creating a developer account.
  2. "musixmatchUserToken", obtained by logging in with a Community account, enabling Web developer tools, going to the "Network" tab and selecting a request which has "musixmatchUserToken" or "usertoken" in the "Header" or "Cookie" tabs.

I would appreciate your help in getting a correct Authentication Token. I have searched online but found no other methods that should work. I'm sorry for my lack of knowledge.

Steps to reproduce

  1. Open console
  2. Bulk search for lyrics

or

  1. Open console
  2. Manually search for lyrics

or

  1. Open console
  2. Play a song while having the OpenLyrics Panel in the UI.

Expected behavior

Lyrics are retrieved from Musixmatch, along with the other sources.

Versions

Additional information

jacquesh commented 11 months ago

Just as a baseline, can you try with an authentication token retrieved by openlyrics (click on the "?" button next to the token field in the openlyrics preferences)?

MegaBidoof commented 11 months ago

First of all, apologies for the late reply. Yesterday you commented right after I had left home, and I returned late.

Now, onto what really matters. Using the "?" button I was able to get a token which works, and now I am able to retrieve the lyrics from Musixmatch, so thank you.

The reason I hadn't tried that before was because that button was outside of the window, and so not visible. This happens because, since I'm on a laptop, the default display scale is 125%, which leads to the button not fitting inside the "Preferences" window, which is not resizable. Preferences - 125% Scale 125%

Your comment made me realize there was probably a button I could not see because it was outside the window. After changing the scale to 100% and restarting Foobar, I was finally able to see the button, and get a usable token.

Preferences - 100%

jacquesh commented 11 months ago

Ah, yeah sorry about that, the UI scaling issue is a known problem (#158 ). Glad you got it working though! I'm not sure why the other tokens didn't work but I'll keep it in mind in case it comes up elsewhere. Thanks for closing the loop after you got it working :)