Clementine icon indicating copy to clipboard operation
Clementine copied to clipboard

Last.fm plugin not submitting scrobbles when track has finished

Open notdanhan opened this issue 5 years ago • 32 comments

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

  • [x] I checked the issue tracker for similar issues
  • [x] I checked the changelog if the issue is already resolved
  • [ ] I tried the latest Clementine build from here

System information

Please provide information about your system and the version of Clementine used.

  • Operating System: Arch Linux
  • Clementine version: 1.4 rc2

Expected behaviour / actual behaviour

It submits the data showing that I'm currently scrobbling a track but when the track elapses, it does not appear to have been submitted that it was completed

Steps to reproduce the problem (only for bugs)

listen to a track with the lastfm plugin running

notdanhan avatar Nov 04 '20 12:11 notdanhan

I have the same problem.

jmm23 avatar Nov 05 '20 22:11 jmm23

I CONFIRM!!! Very sad thing!!! Should I rollback to some earlier version?

upd: I downgraded from 350 to 250, didn't help. It may be an issue on Last.fm side, though I see tracks submitted earlier from another player (mobile).

upd2: downgraded from 250 to 170 (1.4-). Still no luck. This is very frustrating because I have probably to use another player until the issue is solved. Very sad because Clementine is the best one.

upd3: well, Amarok is no more, Exaile is uninstallable, so I took Ubuntu's Rhythmbox. It worked. So, this is clearly a Clementine's issue, waiting for fix!!!

ssrublev avatar Nov 06 '20 09:11 ssrublev

Hello ssrublev. Do you know any player for kde?

jmm23 avatar Nov 06 '20 15:11 jmm23

Confirmed here as well.

sez11a avatar Nov 06 '20 21:11 sez11a

Hello ssrublev. Do you know any player for kde?

Hello! I don't really distinguish them by DE, I used to think that any software may be run in any DE... When I rarely start KDE I tend to use Clementine...

The things look now more strange. The report I wrote yesterday was from Ubuntu MATE (latest version). That was at PC I use rarely. Now I am at my main PC with my main OS Fedora Linux (also latest non-beta version 5.8.16-200.fc32.x86_64).

On 5.8.16-200.fc32.x86_64 Fedora Linux clementine.x86_64 1.4.0rc1-2.344.gad354276b.fc32 scrobbles to Last.fm properly! Has to be something with OS, probably.

ssrublev avatar Nov 07 '20 09:11 ssrublev

I found a quickfix

Run

sudo mkdir ~/.local/share/Last.fm

Works then by the looks of it, gonna look for something more permanent

(edit) the issue seems to lie with Liblastfm but I dunno

notdanhan avatar Nov 07 '20 18:11 notdanhan

creating Last.fm dir didn't work for me :( Still see tracks in "scrobbling now" state, and then they disappear without being scrobbled.

eignatenkov avatar Nov 17 '20 10:11 eignatenkov

creating Last.fm dir didn't work for me :( Still see tracks in "scrobbling now" state, and then they disappear without being scrobbled.

@eignatenkov Did you create the Last.fm directory using the exact command danielh2942 provided? With sudo included? If you did, I think I know why it's not working for you. When you type the command danielh2942 suggested using sudo, it will create the directory, but give ownership of the directory to root. I don't believe Clementine can access directories owned by root. You can see who has ownership of the directory by running this command:

ls -ld ~/.local/share/Last.fm

If it shows this:

drwxr-xr-x 2 root root

Then that means the directory is indeed owned by root and can't be accessed by Clementine. You can fix this by removing the directory and then create it again using danielh2942's command, but this time without sudo. First remove the directory:

sudo rm -r ~/.local/share/Last.fm

Then create it again, this time without sudo:

mkdir ~/.local/share/Last.fm

You can verify the directory has the correct permissions by running the ls command again:

ls -ld ~/.local/share/Last.fm

It should look something like this:

drwxr-xr-x 2 your-username your-username

With "your-username" of course being your actual user's name. If the permissions are correct, you should be able to scrobble from Clementine now. I can confirm that this fix is still working. I've scrobbled around 14 tracks so far and haven't run into any issues. Hope it works for you! :)

nichii124 avatar Nov 23 '20 03:11 nichii124

yep, it worked, thank you very much.

eignatenkov avatar Nov 23 '20 10:11 eignatenkov

OH YES!!! Worked for me also and I again can use this great software (Clementine). Thanks so much!

ssrublev avatar Nov 25 '20 21:11 ssrublev

@nichii124 success!!! thank youuu!! this had been bugging me for awhile.

SeanPhilippi avatar Jan 19 '21 02:01 SeanPhilippi

Can confirm that this issue still exists as of 1.4.0rc1-510-g3f34b332c (Ubuntu 20.10 64-bit). apt purge and reinstall makes no difference, neither does deleting ~/.config/Clementine/.

@nichii124's solution works as a temporary workaround.

Related https://support.last.fm/t/clementine-tracks-appear-as-scrobbling-now-but-no-longer-get-scrobbled/37451/4

Rumperuu avatar Mar 17 '21 10:03 Rumperuu

@danielh2942 Can you edit the command you provided to mkdir ~/.local/share/Last.fm without sudo? Otherwise it won't work for any sane setup where the user doesn't have sudo write access and that might confuse some users who come here to find the workaround.

trougnouf avatar Mar 21 '21 19:03 trougnouf

@danielh2942 Can you edit the command you provided to mkdir ~/.local/share/Last.fm without sudo? Otherwise it won't work for any sane setup where the user doesn't have sudo write access and that might confuse some users who come here to find the workaround.

Yeah

notdanhan avatar Apr 21 '21 00:04 notdanhan

Confirmed. As of today (2021.04.26) creating ~/.local/share/Last.fm as your user (not as sudo or root) does indeed create a successful scrobble on last.fm. Clementine v1.4 rc2 on Manjaro. Hate Manjaro but too lazy to install pure arch.

jz-train avatar Apr 27 '21 00:04 jz-train

Just to add my +1 and say that a) the issue still persists on latest Manjaro/Clementine - i've used Clementine on various distros over the years without a hitch - and b) the workaround works so i'm a happy man :-)

Londino avatar May 03 '21 18:05 Londino

I can confirm that creating ~/.local/share/Last.fm fixes the problem with scrobbling for me with 1.4.0~rc1+git347-gfc4cb6fc7+dfsg-1build1 on Ubuntu 21.04.

bodziek666 avatar May 21 '21 23:05 bodziek666

Can also confirm, creating ~/.local/share/Last.fm fixed it on Clementine 1.4.0rc1+495+g10bf5dc17-3` as packaged by Arch. Maybe to close this issue, Clementine should just create that directory if it does not exist once scrobbling is enabled?

ioistired avatar Jun 12 '21 05:06 ioistired

Works great, thanks! :+1:

dps-910 avatar Aug 26 '21 15:08 dps-910

Hopefully, we can close this, if the internal don't think need some PR. ~/.local/share/Last.fm will work for me. I will confirm from manjaro and clementine 14.0.rc2 some played songs are listed on my last.fm account. But I do an additional step, which is to re-login my last fm account. I think the clear indication is the UI show love button instead of a star. :)

to close this what was stated by @ioistired should remove this bug, but when is the codebase doing the logging?

Remember when closing this, there are kinda duplicate issue #3994 which was opened by our issue importer. I am already reading, and that's is basically an older version of this thread but already confirmed as a bug. So please when closing do both, CMIIW.

sukrosono avatar Sep 09 '21 00:09 sukrosono

Anyone knows how to solve this issue in windows 10? I have read that I need to create a Last.fm directory but I have no idea where I need to create it on Windows.

EDIT: Forgot to mention, I am using Clementine 1.4.0rc1-737-g69fd49b97 with a "data" folder on it, making it portable that way.

Other Edit: I managed to make this to work for me. In order to have Clementine scrobble tracks on Windows you need to create a folder at: %HOMEPATH%\AppData\Local\Last.fm ... if you are using a Portable version of Clementine, you need to create that folder none the less, because it is what liblastfm uses.

for a bit more information, see: https://github.com/lastfm/liblastfm/blob/master/src/misc.cpp#L58

kadai avatar Oct 05 '21 01:10 kadai

Workaround not working on Ubuntu 20.04.2 :(

ls -ld ~/.local/share/Last.fm

returns

drwxrwxr-x

Not sure where to go from here.

shriramvrajan avatar Nov 22 '21 16:11 shriramvrajan

Workaround not working on Ubuntu 20.04.2 :(

ls -ld ~/.local/share/Last.fm

returns

drwxrwxr-x

Not sure where to go from here.

maybe try

sudo chmod -R 777 ~/.local/share/Last.fm/

notdanhan avatar Dec 09 '21 22:12 notdanhan

Anyone knows how to solve this issue in windows 10? I have read that I need to create a Last.fm directory but I have no idea where I need to create it on Windows.

EDIT: Forgot to mention, I am using Clementine 1.4.0rc1-737-g69fd49b97 with a "data" folder on it, making it portable that way.

Other Edit: I managed to make this to work for me. In order to have Clementine scrobble tracks on Windows you need to create a folder at: %HOMEPATH%\AppData\Local\Last.fm ... if you are using a Portable version of Clementine, you need to create that folder none the less, because it is what liblastfm uses.

for a bit more information, see: https://github.com/lastfm/liblastfm/blob/master/src/misc.cpp#L58

Thank you very much for this! It worked for me also.

ssrublev avatar Dec 21 '21 16:12 ssrublev

Confirming that this problem still exists in the Windows build of 1.4.0rc1-814-g2b340da79 (running under Windows 11) and that the workaround above also works. Even if this is an issue with the plugin, perhaps Clementine could check for the missing directory when the plugin is enabled and create it if it's missing?

I.e., as in this code?

for a bit more information, see: https://github.com/lastfm/liblastfm/blob/master/src/misc.cpp#L58

szarka avatar May 07 '22 19:05 szarka

I faced the problem after upgrading to Ubuntu 22.04. Workaround with ~/.local/share/Last.fm worked for me.

It really have been fixed here https://github.com/lastfm/liblastfm/blob/2ce2bfe1879227af8ffafddb82b218faff813db9/src/misc.cpp#L85, but the fix is not included in package liblastfm5-1 (1.0.9-1.2). Manual update to liblastfm 1.1.0-4 solves the issue.

Vsevak avatar Aug 25 '22 10:08 Vsevak

The workaround suggested earlier didn't work for me, the directory is already there (and it even has a file called <last_fm_username>_subs_cache.xml).

The folder was created automatically and the permissions look ok. I installed Clementine using the latest (release candidate) .deb file for the bullseye distribution.

arsinclair avatar Sep 05 '22 05:09 arsinclair

Oh hi, same issue here. I've only just noticed, new build of linux mint (21) with Clementine newly installed... used to work fine, but also: it scrobbles "Now Playing", but then something goes wrong and it doesn't commit... 😿

I'll take a look through the suggestions here and try find solution Thanks everyone for your ideas

mickleberry avatar Mar 04 '23 09:03 mickleberry

creating Last.fm dir didn't work for me :( Still see tracks in "scrobbling now" state, and then they disappear without being scrobbled.

@eignatenkov Did you create the Last.fm directory using the exact command danielh2942 provided? With sudo included? If you did, I think I know why it's not working for you. When you type the command danielh2942 suggested using sudo, it will create the directory, but give ownership of the directory to root. I don't believe Clementine can access directories owned by root. You can see who has ownership of the directory by running this command:

ls -ld ~/.local/share/Last.fm

If it shows this:

drwxr-xr-x 2 root root

Then that means the directory is indeed owned by root and can't be accessed by Clementine. You can fix this by removing the directory and then create it again using danielh2942's command, but this time without sudo. First remove the directory:

sudo rm -r ~/.local/share/Last.fm

Then create it again, this time without sudo:

mkdir ~/.local/share/Last.fm

You can verify the directory has the correct permissions by running the ls command again:

ls -ld ~/.local/share/Last.fm

It should look something like this:

drwxr-xr-x 2 your-username your-username

With "your-username" of course being your actual user's name. If the permissions are correct, you should be able to scrobble from Clementine now. I can confirm that this fix is still working. I've scrobbled around 14 tracks so far and haven't run into any issues. Hope it works for you! :)

I confirm that the problem still persists and the only solution found is the one presented above by @nichii124

*Clementine Version 1.4 rc2 (Ubuntu)

riotbr avatar Apr 06 '23 00:04 riotbr

Ubuntu 22.04, fresh install with 1.4 rc2 and the issue still presents, and the fix presented by @nichii124 fixed the problem.

joshp23 avatar Dec 07 '23 14:12 joshp23