Hi! I noticed that Clementine is now migrated to Qt5, but that support is quite experimental. I was trying that version of Clementine, and although I have the USE-flag lastfm enabled, it's disabled by default. I made a patch to get rid of that, but it can't log in. I'll upload the patch then. Thanks. Reproducible: Always
Created attachment 519848 [details, diff] The patch to fix the last.fm support
This patch works in getting lastfm back into the settings menu, however when trying to login the lastfm webpage returns this: "Invalid API key. If you are a third party developer see our authentication how-to to find out more." Also, did you notice that the sidebar menu items all contain an extra '&' symbol in their text? What's up with that? Is that due to qt5?
(In reply to Andrew Ammerlaan from comment #2) > This patch works in getting lastfm back into the settings menu, however when > trying to login the lastfm webpage returns this: "Invalid API key. If you > are a third party developer see our authentication how-to to find out more." > > Also, did you notice that the sidebar menu items all contain an extra '&' > symbol in their text? What's up with that? Is that due to qt5? This is what I mean when I tried to make it work with the last.fm support because of the liblastfm directories list. Yes, the menu is back, but I know it fails when trying to login with a Last.fm account. Also, I think it may be due to qt5 because I compared the lastfmservice.cpp between the qt4 and qt5 branches. But in essential, the code may be the same, but with different functions. So I can't understand why with qt5 fails but with qt4 works. Also, the qt5 support is still experimental.
Well according to the lastfm webpage: https://www.last.fm/api/authentication You need to apply for an API key, which is specific to the application. What I think is that the key that works for qt4 does not work for qt5 because lastfm sees clementine-qt5 as a different application then celementine-qt4. Thus it returns a key mismatch. You can create an API account here: https://www.last.fm/api/account/create but maybe that is something the clementine devs need to do, as it is their application.
(In reply to Andrew Ammerlaan from comment #4) > Well according to the lastfm webpage: https://www.last.fm/api/authentication > You need to apply for an API key, which is specific to the application. What > I think is that the key that works for qt4 does not work for qt5 because > lastfm sees clementine-qt5 as a different application then celementine-qt4. > Thus it returns a key mismatch. > You can create an API account here: https://www.last.fm/api/account/create > but maybe that is something the clementine devs need to do, as it is their > application. Fine. I reported that issue in the Clementine tracker to make the developers do something with that. Also I added your answer in a screenshot. Thanks.
Whatever the problem, the appname seems to not be it. I patched it to drop the awkward -qt5 postfix but it made no difference.
(In reply to Andreas Sturmlechner from comment #6) > Whatever the problem, the appname seems to not be it. I patched it to drop > the awkward -qt5 postfix but it made no difference. Maybe it sends additional info about the app. I would imagine that lastfm would implement something to make sure that the api key that is sent actually comes from the legit registered application that it belongs to. Otherwise one could just make a fake application with just the name of the real one and use the same api key to connect it to lastfm's servers. Which I imigine is something they don't want, why would you otherwise implement this whole abi key thing. But I'm just guessing here, hopefully the bug report on clementine's github will enlighten us.
Created attachment 520104 [details, diff] A patch to fix the last.fm auth Someone sent a pull request in the issue I reported in Clementine and it says it fixes the auth issue, so I turned it into this patch. https://github.com/clementine-player/Clementine/issues/5993
Thank you, it works now. I had to authenticate clementine's request in konqueror instead of firefox, firefox-58.0.1 returned: "An error occurred during a connection to localhost:35973. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG" after clicking the "yes, allow access" button. It worked just fine in konqueror though, anyone else also had this issue?
(In reply to Andrew Ammerlaan from comment #9) > Thank you, it works now. > > I had to authenticate clementine's request in konqueror instead of firefox, > firefox-58.0.1 returned: "An error occurred during a connection to > localhost:35973. SSL received a record that exceeded the maximum permissible > length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG" after clicking the "yes, > allow access" button. It worked just fine in konqueror though, anyone else > also had this issue? This is a known issue with Firefox, but they must solve it. In other browsers this doesn't happen. I also had to do the same with Qupzilla. More information in https://github.com/clementine-player/Clementine/issues/5936
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fb120d06ebcd23c2668d7f838a35445c2900c1e commit 2fb120d06ebcd23c2668d7f838a35445c2900c1e Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2018-02-19 18:47:26 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2018-02-19 19:00:47 +0000 media-sound/clementine: Bump snapshot 1.3.1_p200182019 to fix lastfm Closes: https://bugs.gentoo.org/647904 Package-Manager: Portage-2.3.24, Repoman-2.3.6 media-sound/clementine/Manifest | 1 + .../clementine/clementine-1.3.1_p20180219.ebuild | 191 +++++++++++++++++++++ media-sound/clementine/clementine-9999.ebuild | 6 +- 3 files changed, 195 insertions(+), 3 deletions(-)