elamperti / OpenWebScrobbler

🎧 An open source web scrobbler for Last.fm
https://openscrobbler.com/
GNU General Public License v2.0
320 stars 37 forks source link

Song scrobble fields reloading and getting cleared #226

Closed Orofil closed 8 months ago

Orofil commented 8 months ago

Describe the bug Recently when I've had the song scrobble page open in a different tab, sometimes when I switch back to that tab the song info input fields reload, like in the image below, and all their text is cleared.

Steps to reproduce

  1. Open https://openscrobbler.com/scrobble/song
  2. Type something in the input fields
  3. Go to a different tab in the browser
  4. Maybe wait a few minutes
  5. Go back to the Open Scrobbler tab
  6. The input fields will sometimes reload and become empty

Expected behavior The input fields shouldn't have to reload, or the inputted values should at least stay.

Screenshots image

Device Desktop

Platform (please complete the following information):

elamperti commented 8 months ago

Hi, thanks for your report. This issue is related to a conflict of one or more service workers. I've applied some mitigations in 2.8.6 but, sadly, it's still happenning for most users. I'm investigating the issue and a patched version will be released as soon as I find a solution.

If anyone can share more information on this (I wasn't able to reproduce it locally) it could be helpful. Specially: a screenshot of your current service workers (F12 -> Application tab -> Service Workers).

Orofil commented 8 months ago

It says that there are no service workers found.

elamperti commented 8 months ago

Thank you! That was very helpful.

I've figured it out. It's not related to service workers after all (I was mislead by recent changes!), it's the user session revalidation triggering a suspense in the scrobble form.

I'm fixing it and will release a new version with the fix as soon as possible (a few hours from now).

elamperti commented 8 months ago

Version 2.8.7 has been released with a fix (the next version will have better session handling and probably a few tests). This should be fixed but feel free to reopen the issue if something is off. Thanks for your help! :)