it has happened several times over the years that the Last.fm connection has been disconnected.
Has happened on Desktop (Win and Mac) and on Mobile (Iphone).
Which spotify desktop version are you using? (1)
When you go to your preferences in desktop, you will see an error msg if spotify can not scrobble: what do you see there?
Just in case: I assume you did already input your credentials for last.fm again in spotify (as in: reverify your account with last.fm, that it works)
Another thing you can do is: make sure your account really "works", by scrobbling from somewhere else than spotify to lastfm.
in my desktop version 0.9.4.183.g644e24e0 on linux it works, for months already
also: the desktop version caches the tracks, so they won't get lost + scrobbled when there's a connection to lastfm
I have version 184.108.40.206.gbfa97dfe on Win7 but this has been an issue across several versions. Not sure if the credentials perhaps are deleted once you update to a new version...
Spotify connects successfully to Last.fm so I don't see that connection error message you mention. The crediantials are just from time to time wiped out.
Same here. Last.FM is disconnected every time I restart Spotify. I use the relatively recent 1.0.27-1.fc23 version on Fedora 23.
I have the exact same problem on my iPhone. Everytime I update Spotify App, the Last.fm gets disconnected and I have to set it up again.