"Friends who listen": new browser extension for Chrome and Firefox

  • 18
  • Praise
  • Updated 3 years ago
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes

Posted 4 years ago

  • 18
Photo of Drynwhyl

Drynwhyl

  • 127 Posts
  • 163 Reply Likes
I've tried heliobalione's workaround and it does work indeed. Tested on a variety of bands and all seems good so far.

Using Firefox 43.0 here, there is an upgrade to 43.0.1 right now but I'm feeling slightly hesitated about updating because it might introduce further complications in the way of the plugin's functionality.

Thank you David for all the trouble you went through to bring this small but complementary feature. I hope your efforts won't go unappreciated by the rest of the users.
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
Never mind, I've just paid the fee and the extension is available in the Chrome Web Store now!
Thanks for that, and by the way, did you choose The Beatles profile by chance for the screenshot? Because that Friends Who Listen list will probably be populated a lot from Christmas Eve on, see this Billboard article. I wonder how many of the people I follow also listen to The Beatles, and who is their biggest fan then.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
So the Firefox extension was rejected due to the way I include 3rd party libraries. It'd be probably complicated to change it, I have replied them and we'll see.
It's a pity that there are always some troubles with Firefox and this extension. I love Firefox (mostly because of all the extensions that aren't possible to make on Chrome), I use it as my primary browser. But development for Chrome is much easier.

Hans, I chose The Beatles because they're such a classic. I'm glad they'll finally be on streaming services, I missed them sometimes.

Happy Christmas everybody!
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
Too bad your extension was rejected by Mozilla. Maybe their overly strict handling will change when they finally enable Chrome extensions in Firefox next year.

It will be fun to finally scrobble The Beatles from a streaming site from tomorrow 12:01 a.m. on, nice Christmas present in my opinion and a small step for mankind, but a big one for Yoko Ono. ;-) See e.g. this New York Times article.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
Works fine with the new Firefox 43.0.4, thank you again! I once noticed that some users I do not follow anymore were still listed though, does your extension work with an outdated snapshot of the people I once followed perhaps? Checking it right now in Chrome and Firefox those are gone though, so maybe it was only a temporary effect.
(Edited)
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Friends are cached for a week. Then it will refresh the list again.
I should add an option to flush the cash manually but don't have time now.
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Hi, just wanted to point out that I've been crashing a lot since yesterday. I've narrowed the cause down to this extension on my Chrome browser (ver 47.0.2526.106). The crashes are random, it seems to only effect some artist pages. When I disable the extension everything works fine.

This is a problem since I usually have around 20-30 tabs open in my browser and they can all be lost after clicking a random artist. I then have to forcibly close Chrome from my task manager and have to go digging through my history to get those 30 tabs back. I also can't use the Ctrl + Shift + T shortcut to bring them all back as it opens the tabs that caused the crash in the first place.
(Edited)
Photo of psychicfork013

psychicfork013

  • 222 Posts
  • 365 Reply Likes
Chrome doesn't have a session manager?
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
you aren't the only one - starting the other day out of nowhere opening any last.fm page with this extension enabled would cause my chrome's memory usage to skyrocket and freeze the browser completely until i ended the process in task manager
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Hey guys, I'm sorry for this issue but I don't notice any crashes or high memory usage on OS X. You both use Windows, right?
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Windows 7 Home Premium 64bit for me  ^
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
windows 10 64 here
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I've just tested it on Windows 7 (64bit) and it doesn't seem to appear there neither. Are there any specific steps I should try?
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
How many friends you have on Last.fm?
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
^ i'm following 140 people, since this came out of nowhere it might be the reason?
(Edited)
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
^ I'm following 159 people. I guess this could be the cause.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Yes, that could be the reason. Do you know if it happens when you open an artist you have opened in last 24 hours (caching)?
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
from memory it would occur on both previously opened artists & artists i hadn't opened before
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
I still get the issue with artists I've listened to 1-10 minutes ago, as well as a few hours ago. My CPU usage also spikes up to ~90% when Chrome freezes. 

I'm using an Intel Core i5 4670k, watercooled and overclocked to 4.5GHz.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I didn't mean listened in past day but viewed on Last.fm.
Anyway, interesting. I think it could cause either executing hundred of asynchronous requests at one time or re-rendering the widget every time a request completes.
Does it happen always or just sometimes?
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
practically all the time I'd say - pretty much bricks my laptop if I don't end the chrome process quickly enough
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Yes, almost all artist pages cause a crash. I've found that with some artists (where I only have a few friends who have Scrobbled their music) it doesn't cause a crash, but it's very inconsistent.  
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I've changed the code a bit and it might help. I updated the Chrome extension in the Store. Try if it helps. You can update the extension now by going to extensions, enabling developer mode and clicking update extensions now.
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Thanks! Unfortunately I'm still crashing at the same rate as before.   :(
I also uninstalled/ reinstalled the extension again with no luck.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
That's a pity. :/
Can you give me your Last.fm username?
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
It's really weird. I tested it with your account (but on OS X) and it works well.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Could you try disabling all others extensions?
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
All other extensions disabled, still crashing - though not quite as often. Some pages work, some don't. For example "Kate Voegele" just freezes every time I try and load it, but works fine with this extension disabled.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I don't have any other idea. :(
If you want the widget, you can try using Firefox for that.
Photo of psychicfork013

psychicfork013

  • 222 Posts
  • 365 Reply Likes
Did you try clearing the cache? That at least temporarily solves most of my problems. It might just be a Chrome thing though, I haven't had any issues with it on Firefox.
Photo of Gospodin Setembrini

Gospodin Setembrini

  • 25 Posts
  • 19 Reply Likes
I'm using Opera, can i find it there? / https://addons.opera.com/en/
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
I think there is an Opera extension which enables to use all Chrome extensions, maybe it would work with that.
(Edited)
Photo of stella

stella

  • 31 Posts
  • 25 Reply Likes
doesn't work for me. i'm using chrome
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Could you be more specific? Does it show the widget with empty list, with random people or it doesn't show the widget at all?
(Edited)
Photo of Juneau

Juneau

  • 43 Posts
  • 92 Reply Likes
it started showing random people instead of my friends on that list. Using chrome. Any advice?
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Yeah, I know what happened. I accidentally published a version that shows the list for a concrete user. Update to version 0.3.3 but that probably won't be enough because the friends list is cached. I'll add functionality to flush the cache in the future but for now you have to do it manually. Open console – ctrl + shift + J for Chrome or Ctrl + shift + K for Firefox (if you're using OS X, it's cmd + opt + letter). And type there localStorage.clear()
Hope it helps.
Photo of Juneau

Juneau

  • 43 Posts
  • 92 Reply Likes
that fixed it, thank you! 
Photo of Gospodin Setembrini

Gospodin Setembrini

  • 25 Posts
  • 19 Reply Likes
I just installed it on Opera with chrome extension, works great. Thank Hans-Jürgen for a tip.
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
That's great, probably you could also use the Last.fm web scrobbler extension now if you want to scrobble other sites. There once was an own Opera version of it, but the developer does no longer support it, so there only is the one for Chrome now. And of course scroblr which has a Chrome and a Safari version.
(Edited)
Photo of Raichel Jane Woulf

Raichel Jane Woulf

  • 2 Posts
  • 0 Reply Likes
Thanks! working in Firefox 43 after cleaning cache :)
(Edited)
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
And of course scroblr which has a Chrome and a Safari version.
Scroblr will be available for Firefox as well now, see the latest update on the GitHub page.
(Edited)
Photo of Łukasz Karol Tyburcy

Łukasz Karol Tyburcy

  • 4 Posts
  • 0 Reply Likes
how install it on opera?
Photo of Hans-Jürgen

Hans-Jürgen, Moderator

  • 2359 Posts
  • 1205 Reply Likes
That's interesting, so you don't need that extra extension anymore to enable all Chrome extensions in Opera? So your extension works almost everywhere except for Safari and MS Edge/IE. Great.

By the way, I used the new setting to collapse the list to 5 friends, and it works very fast in Chrome on Windows 10 now, even with my old PC.
(Edited)
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Oh, sorry, I haven't realized I have the 'Download Chrome Extension' extension installed.

Łukasz, you have to install this extension first.
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
i reinstalled and tried that 'flush cache' trick and it appears to have fixed the memory leak as far as i can see
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Working for me too. Thanks!
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Oh that's great! I haven't thought of that.
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
any news on when you'll add a 'flush cache' functionality of some sort as you mentioned above? 
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I'm working on it and will release it probably tomorrow. :)
Photo of metalfingers

metalfingers

  • 14 Posts
  • 36 Reply Likes
thanks mate
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I've just released version 1.0! Besides other things it has the flush cache functionality. :)
It's in the Chrome Store, Firefox version will take a few days to approve.
Photo of Lusifair Amnus

Lusifair Amnus

  • 6 Posts
  • 1 Reply Like
works great on chrome 47....many thanxs for this !!
Photo of Peter Greenwell

Peter Greenwell

  • 2 Posts
  • 5 Reply Likes
Awesome. This is one of the prime features of last.fm I missed. Thank you!
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I've just released version 1.0! It's in the Chrome Store, Firefox version will take a few days to approve. You can see the changelog on Github.

BTW, I know this is just a tiny extension that does just what Last.fm should itself. But I spend dozens of hours coding and testing it and supporting you. I do it for free (even paid the fee) but if someone appreciate this extension so much that he would like to send me a few bucks to buy a coffee, I'd be grateful.
Photo of Cassandra-Leo

Cassandra-Leo

  • 119 Posts
  • 269 Reply Likes
Since the latest last.fm update, this seems to be causing Chrome to freeze whenever I load an artist or track page. I'm not sure if it's due to this extension or due to the update, but since the problem hasn't been widely reported and doesn't seem to occur if I don't have the extension enabled, I'm assuming it's a conflict of the extension with the new update. I also haven't tested to see if this also occurs with the Firefox version. Anyway, I figured I'd report it here.
(Edited)
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Hey. A few users (including myself) had this problem a little while ago. Make sure you're using the latest version of the extension. If you are, and still have issues try the fix below that @David Pavlík (the creator) posted.

"Open console – ctrl + shift + J for Chrome and type there localStorage.clear()"

Doing that fixed it for me, and since the latest version I haven't had any further issues.
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
This happened for me as well. All of my windows of Chrome lock up, the Helper process is at 100%, and my Chrome memory usage went to 15GB before I had to close it.

@James I'll try the above and report back. 
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Sorry, the memory leak seems to still persist. Clearing the cache probably should temporary solve it. Forgot to mention that you must be on Last.fm to clear the cache with console. In the version 1.0 you don't have to do that console stuff, instead you can do it from settings (the cog icon).
BUT, if you haven't flushed it yet, open console on Last.fm and type there copy(localStorage) . It should some text something to the clipboard. Please, post the content of your clipboard to Pastebin for example and then post the link here. It'd help me with this issue.
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
@David, would it be easy to modify this to recreate the "friends listening now" page on the old site? From the API it seems like user.getRecentTracks() and then sort
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Yes, that was my second most missed feature. It probably wouldn't be hard. The only problem is that I rarely use the homepage now because it's so slow and there's nothing interesting. So I don't have such motivation. But maybe if more people want it...
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Does it have to be on the homepage, what about our profiles? There's a lot of empty space since the About Me section was cut down to 200 characters.  I'd certainly be interested in this. I don't think I could live without your "Friends Who Listen" extension!
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Hmm, profile would be a better place.
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
This still regularly locks up my entire Chrome application. Even when I force quit the helper application, I have to close Chrome entirely because none of my tabs are responsive. I didn't know extensions could do this.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
I'm sorry. I really don't know where it comes from. You can try flushing or disabling completely the cache in settings.
Photo of Raichel Jane Woulf

Raichel Jane Woulf

  • 2 Posts
  • 0 Reply Likes
Working fine on Firefox 45.... search for "Friends Who Listen" in Firefox extensions
Photo of vs271

vs271

  • 69 Posts
  • 96 Reply Likes
I have the same issue with Chrome.  I had to disable the extension.  It's too bad.  
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Hmm. Reinstalling (uninstall, restart, install) doesn't help? What's your Last.fm username?
Photo of vs271

vs271

  • 69 Posts
  • 96 Reply Likes
Username...vs271.  I have tried uninstalling and reinstalling.  It seems to cause chrome to hang.  Back then, I was waiting for the newer version to be ready and approved.  I will try again.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
And when it hangs, does it consume your CPU or RAM (you can look into Task Manager)?
Photo of vs271

vs271

  • 69 Posts
  • 96 Reply Likes
I will check later today and get back to you. 
Photo of vs271

vs271

  • 69 Posts
  • 96 Reply Likes
I reinstalled it.  So far it's behaving ok.  Maybe this is a different version.  I will let you know if it acts up.  Thanks for the app! I do like it.
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
This extension stopped working for me entirely. It will lock up my entire Chrome session, including all other tabs. I re-installed, I cleared the cache. Nothing helped, I had to uninstall or any artist/album/track page would require force quit of Chrome. 
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
:(, when it hangs, does it consume your CPU or RAM (you can look into the Task Manager)?
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
yeah. it's at 100% cpu, and the ram grows gradually. I let it run for 20 minutes and the chrome process took all my ram (8GB) and locked up my machine entirely. 
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Should be fixed now, see this for more info.
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
Since about 1 day I started to experience almost similar blocks of my Firefox with this addon enabled, too.
Not 100% CPU as in pizzicatoiv's case, (well, technically, 1 CPU IS at 100%, but the second one is normal and I can work normal on my PC), but still it freezes and mostly I have no choice but to kill it.
Memory does not seem to increase.
So, now I have to let it disabled.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Should be fixed now, see this for more info.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Good news everyone! I think I have fixed the freeze issue! I'm sorry you had to wait for so long.
I'm running OS X (maybe macOS tomorrow btw) with a standard Core i3 and it has always worked for me so I didn't know where the issue was coming from and I also had lesser interest in it. One thing was clear, only users with a lot of friends had this problem (but I haven't noticed any problems when I had loaded the addon with their friends). When I thought about that, only two possible issues came to my mind.
First, the addon has to do a request for every single friend and after it receives the play count it has to reorder the list of friends and rerender it. And that may be a bit CPU heavy. So I added an option to render the list only after all friends are fetched.
Second, after the list of friends is loaded (most of the time from cache, otherwise it's one request), the list is iterated and a request for every friend is executed. The browser allow only about 5 concurrent requests so I thought it adds them all to a queue and then executes only 5 at a time (which I think shouldn't be CPU heavy). So I implemented my own queue (with limit 3 requests at a time), it may be a bit slower (you can turn it off in settings) but it probably should solve the problem. When I tested it with pizzicatoiv's friends I noticed that without it the browser freezes for about 3 seconds when adding request to browser's own queue (but it doesn't freeze completely, probably OS X is better at handling this than Windows) and with it no freeze happens. So I hope this will finally fix it.
Maybe you don't understand a word, it doesn't matter, I wrote it just if someone was interested where the bug was.
The update is available in Chrome WebStore now and Firefox version is waiting for approval (will take a few hours/days).
(Edited)
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Mine has been working fine since the initial cache clear 5 months ago - but this is great! Thanks  :)

Hope it's working again for @Cornel Diaconu  ^
Photo of James L.

James L.

  • 184 Posts
  • 493 Reply Likes
Is it going to show the entirety of your friends on every band page like it has been but without the lag?

That's the only this I dislike about the extension, and miss about the old site. It would only show the top 3 friends who listen to said artist the most, and if you want to see who else listens to, just click on that link and it'll bring you to a separate page. It's annoying how on EVERY page on the artists profile it has to show them all, every single time. I'm sure everyone else feels the same way.
(Edited)
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
There is an option in settings (click the cog icon) to collapse the list.
Photo of pizzicatoiv

pizzicatoiv

  • 250 Posts
  • 614 Reply Likes
thanks so much for this. the freeze problem became very common for me and I had to stop using the extension. I'm looking forward to using it again!
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
@pizzicatoiv, could you please report if it works now?
Photo of vs271

vs271

  • 69 Posts
  • 96 Reply Likes
Gonna try it again.  Thanks for your efforts!
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
After installing the updated version, I no longer have the issue with freeze, but ... no list of friends listening to that artist/song, either.
That is, the place where this list should be displayed is empty (only about 1 or 2 empty rows).
As in this screenshot:

I also have upgraded Firefox to latest version (47.0).
If I disable addon, or remove it, that empty line above the button for "Play similar artists" disappears from the page.

On the other hand, on the same linux box (Opensuse 42.1), browser Chrome + this addon works great !
Also, on some other computer, with Windows and Firefox 47.0, this addon also works great.

Only my normal Firefox in my normal linux system refuses to be the same great :-))
I'll try to investigate a little to see if I get some error in the Javascript console, or any other error somewhere.
For the moment I only can see something not quite right with this (probably) error:

locating the problem at line 106 in the file core.js
(at this calling:  "console.exception(args[0]);"  in some function  "emitOnObject(...)" )
But core.js is not part of this addon, as far as I can see, so I have to investigate further...
The page with the source code looks like is opening this "URL: view-source:resource://gre/modules/commonjs/sdk/event/core.js
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
A bit of further investigation:
if I activate option "Pause on exceptions" at my Firefox Javascript debugger (the one you get opened when clicking CTRL+SHIFT+S, or Tools >> WebDeveloper >> Debugger) and try to open a page of an artist, it stopes executing the script content.js of this addon at:
line 15151 -- call of localStorage.setItem('waitUntilFetched', value);
  which is called from line 21141 (setWaitUntilFetched(defaultValue);)
    which in turn is called from line 20162
       which is called from line 15151 ( var renderedComponent = inst.render();)
... and I stopped looking deeper.

I have this exception:
NS_ERROR_DOM_QUOTA_REACHED


For now ... I'm stuck, because I don't get what's causing this error.

Even if trying to debug in step-by-step execution of the script, comparing my linux Firefox with Windows Firefox, where it works OK.



[EDIT]Ahhh... I was to quick to post this...
Just found a workaround, from here: https://confluence.atlassian.com/jirakb/accessing-jira-in-the-browser-fails-due-to-ns_error_dom_quot...
In the about:config page of settings, I have to edit default value of
dom.storage.default_quota
from default value of 5120 to a double value (10240), thus increasing the cache for this parameter.

Now it works for me, too :-))
And the extra increase of 5MB of RAM consumption of my Firefox is insignificant compared to it's overall usage of RAM, anyway.

@David ... if you happen to find out a reason why Firefox does this on a Linux box, I'd be happy to revert this value to the default one, but it's OK this way, too.
(Edited)
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
The update is live on Firefox Add-ons.
 
@Cornel, hmm, I haven't even realized that localStorage is limited. According to my calculations, if you have 200 friends, you would have to browse about 300 artist/album/song pages in your cache expiration period to fill 5 MB. Is it possible?
The solution may be flushing the cache and/or decreasing the cache expiration period (both can be done in settings).
Thank you for your investigation.
(Edited)
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
@David ... there's no sure thing Firefox has this issue; only the variant Opensuse has in it's repositories seems to have this problem.
I added a "ticket" to Opensuse forums... maybe someone will figure out why it behaves like this. Maybe someone changed something in the source code, which triggers this in an un-proper way ?
As a sidenote... there's also a strange change in Firefox 47.0 compared to previous version: the dialog for saving files has it's button for "Save" in a different position (right of "Cancel", and before it was the other way around) ... and now I have to adjust my small automatisms :-))) )
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
@Cornel, I think there's no issue with Firefox or Opensuse but you have just viewed a lof of pages on Last.fm. Try opening addon settings (clicking the cog in top right corner of the extension) and flush cache there. Then you should be able to use the extension even with setting dom.storage.default_quota back to 5MB.
Photo of Саша Зинуков

Саша Зинуков

  • 49 Posts
  • 9 Reply Likes
Chrome. Windows 10. Now it's freezing a lot... Cash cleaning didn't help. What should I do to solve this problem?
Photo of Lonnie Jolly

Lonnie Jolly

  • 1 Post
  • 0 Reply Likes
try to get rid of all the bloatware in windows 10 check this out this site. http://www.ibtimes.co.uk/windows-10-c...
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
This reply was created from a merged topic originally titled friends who listen.

Hi,
since around 3 hours ago (when I write this, it's 06-06-2016, 14:00, GMT+2) I started to notice some strange freezes of my browser, Firefox, especially when visiting artists pages.
Firefox jumps to about 55-60% of CPU (one of the CPUs is at 100% and the other is rather normal, thus giving me opportunity to kill Firefox).
Usually it only remains the variant of "killing" Firefox; but a few times I got this error message in a popup window:
"Script: resource://gre/modules/commonj...nds-who-listen/data/content.js:20594"
With choices to "continue", and "stop the script"

Thus, I finally found out that the culprit is the addon "Friends Who Listen, 1.0.0.".

So, besides simply disabling the addon in order to remove this freezes ... does anyone else experienced the same things (of course, if uses Firefox + this addon).

Is any change under-going on the site that could trigger such bad function of this script ?

P.S. Just before this started to happen, I had already uploaded some pictures to new artists and/or albums, so it did worked OK today, for some time. Now the addon is disabled.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Hey, that's strange (as always). I don't know where the issue comes from. The line (20594) is pretty interesting because it refers to this fragment:
if (this.friendsRemaining === 0) {
    this.setState({
        done: true
    });
}
which is executed when the extension receives information about friend's scrobbles from the server. But I still don't know where could be the problem. Is the line number always the same?
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
Cornel's post above is several months old. It was recently moved over to this thread by a moderator - which explains the recent time stamp.

I still have frequent freezing issues with the extension on Chrome though. The only sure way to prevent it is to disable all caching. 
Photo of Patrick

Patrick

  • 1346 Posts
  • 957 Reply Likes
Did you try to test out by using Google Chrome or Opera? FireFox is familiar to freezes completely even with an ABP extension.
Photo of David Pavlík

David Pavlík

  • 58 Posts
  • 41 Reply Likes
Hey guys, I didn't notice the timestamp. I'll probably have to rewrite the cache storage because it's like never ending source of issues. But I don't promise I'll do it anytime soon. I have work to do too... But I'll try.
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
Hmmmm... this is quite strange.
Until yesterday, every time I activated (enabled) this plugin, my Firefox seemed to choke for a while, until the javascript "moderator" inside the browser notified my that the script content.js stopped (at line 21256 was the last notifications).
Now (a few minutes earlier) it started to work again ! :-)
I have not invoked any external powers, honest :-)

My current settings for the plugin are:
cache friends for 1 week
cache scrobbles for 1 day
limit concurrent requests to 3
I haven't emptied my Firefox's cache since a very long time (I'm quite lazy at this particular action, I admit).

Granted, the plugin was disabled for quite a time (around 2 months, actually).
So, now as I write this, it works good, again.
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
Ahh... sorry about the above rush in...
it worked for a relative short time the way I stated in previous message; probably after accumulating some cache, it started to behave the same as before (Firefox choking, and error message about being stuck at line 21256).
Indeed, as James wrote above, setting it to make no cache at all, solved the issue.

It may be worth to notify that I have a pretty low number of "friends" (only 23-24) and thus it finishes the job rather quick; if someone has a large number of friends (500, 1000 ... I suppose there are users with that "amount" of friends) it will take more time to finish and display the results; and this time could add to that behaviour of freezing experienced by others.
Photo of Patrick

Patrick

  • 1346 Posts
  • 957 Reply Likes
If you click on the circle, you will see that you have the option to adjust to show 5-10 or 20 friends. Try that if you can, maybe it will work.
Photo of Cornel Diaconu

Cornel Diaconu

  • 873 Posts
  • 378 Reply Likes
Ah, thanks for the tip; I knew about it, though :-) (I also have limited the list to 5 users + that expand "button", as you have illustrated above).
I expect, somehow, that if you have a large number of friends (lets assume you have 1000 friends in the list), parsing such a large list of users and checking if they have a certain artist in their library, and then displaying those users in the list that have listened ... all these take some time significant larger than if you have only around 20.

But maybe I'm too pessimistic, and the API is optimized and respond quite quickly even in such cases, and you don't get to feel the difference.... David may confirm if so :-)
Photo of James Joul

James Joul

  • 983 Posts
  • 2019 Reply Likes
After a quick test, it took under 6 seconds for the extension to load information for 155 friends. That's pretty quick. Scrobbling aside, this is easily my most-used feature on Last.fm.

Not being able to cache information isn't an issue for me anyway. I use this feature to recommend friends new music so it's rarely loading the same information. It would be neat if I could use some of my 2+TB hard drive space to store the cache data without ever needing to clear it though  :)