Festify / app

:tada: Festify Host & Client
https://festify.rocks/
413 stars 73 forks source link

Festify plays one song, then plays whatever album I last played in spotify #290

Closed ccantill closed 3 years ago

ccantill commented 4 years ago

Yesterday I played Bach's Cello Suite in Spotify on my phone at home. Today I started playing our Festify playlist in the office on my laptop (as per usual on Fridays), and after the first song it started playing Bach's Cello Suite. Skipping just played the next song in that album. I had to open my Spotify client, clear out the queue, reload Festify and then it played the next song. But the same thing happened again the song after that. Every time a new song plays in Festify, the queue gets filled again with whatever album I played last in the Spotify client and I'm having to manual clear it.

ccantill commented 4 years ago

As a pretty shitty workaround I made a playlist with just Monty Python's Dennis Moore Song (Pt3) and played that. Now in between every song it sings "Dennis Moore, Dennis Moore is not in this bit" but that only takes 3 seconds. Playlist here: https://open.spotify.com/playlist/3BAx0z3JGEE4taDIGdjP2D?si=vZMyI7YTRFeuOgPHBilKTA

leolabs commented 4 years ago

That's an interesting bug! Could you give me more details on which OS and Browser you're using Festify on? Do you have any instances of Spotify running while using Festify? This shouldn't be a problem but maybe it's connected to that.

DeastinY commented 4 years ago

Hi all, we also run into the same issue.
We're on Windows 10 and the latest chrome release

Edit: Also verified on Firefox

ccantill commented 4 years ago

I'm running Chrome on Linux (Ubuntu 19.10). I've tried with both Spotify running and without. I even changed my password and logged out all devices to be sure but that didn't change it.

DeastinY commented 4 years ago

It's strange that this happened without any code changes, right? It's also browser/OS agnostic so that would pretty much only leave spotify as the culprit, but: https://developer.spotify.com/community/news/ there doesn't seem to be anything relevant

NeoLegends commented 4 years ago

This is strange in particular because Festify is not supposed to interact with the queue at all. When a song ends and the next one starts we send a command to Spotify to play this specific one song. Perhaps that behavior has changed?

DeastinY commented 4 years ago

Could it be that you've been using some beta api commands that were changed?

(Have zero experience with spotify, but found this: https://developer.spotify.com/documentation/web-api/reference-beta/)

ccantill commented 4 years ago

It doesn't seem to realize that the song has ended, probably because Spotify is automatically adding that other stuff to the queue and just keeps playing?

DeastinY commented 4 years ago

Shouldn't you see behaviour like this in the logs?

DeastinY commented 4 years ago

We somehow broke it even more. Two votes now also skips a track 😅

GisliNielsen commented 4 years ago

Happens to me as well, not a lone wolf scenario

DeastinY commented 4 years ago

Apparently only exactly two vote songs are skipped.

jannomeister commented 4 years ago

same here :( It plays my anime songs after the last song from festify played.

pasathaioum5 commented 4 years ago

same here... having this issue since Friday

Cross-roads commented 4 years ago

I can also confirm this issue ... first noticed friday evening.

benb7760 commented 4 years ago

@leolabs I think I have more detail on what the exact cause of the issue is.

  1. I queue three songs in Festify and begin the playback. The first song begins playing
  2. During first song, I look at spotify and see there are random items in next up, which have come from the last time i was using spotify. I remove these and have an empty next up queue.
  3. The first song completes. The second song begins correctly (yay!) but the Next Up queue gets refilled with nonsense.
  4. The second song completes and spotify begins playing the next up queue instead of the third song from Festify.
  5. If I now allow the next up queue to run to completion, festify begins playing the third song
  6. Then spotify next up takes over again
NeoLegends commented 4 years ago

@leolabs Seems like we do not interpret the end of the song correctly and then don't start the next one. WDYT?

leolabs commented 4 years ago

@NeoLegends yup, that seems to be the problem. I think that the events from Spotify‘s Web SDK may have changed, so our heuristics don’t work properly anymore. It may be a better idea to regularly fetch the current playback position and work with timers like jqbx.fm does it.

NeoLegends commented 4 years ago

https://github.com/Festify/niceify-web-playback-sdk we should probably finish that

benb7760 commented 4 years ago

For anybody looking for an non ideal workaround; Create a playlist with one song. Shortest possible song you can find! I found one which is only 4 seconds long via a quick google search. Play this playlist, then start using Festify. The queue will work but there will be a 4 second song between each. Not ideal at all but it at least restores some usability.

Cross-roads commented 4 years ago

There is a song called 'One second of Silence' from 'Quality assured hipsters' which is really -hence the title- one second of silence. So that results in nearly perfect playback. Only a small delay

leolabs commented 4 years ago

I've expanded the conditions for when to skip to the next track. As soon as Festify notices that the current progress is smaller than the last progress (new track means progress === 0), the player is paused so the track from up next isn't played, and the next track from the queue is played.

Please tell me if this workaround works for you. It should be online now :)

leolabs commented 4 years ago

@DeastinY could you check if the double-skipping bug you've experienced still occurs or if it has been fixed by this as well?

DeastinY commented 4 years ago

thanks for the fast fix, will check when I have time :)

jannomeister commented 4 years ago

after the latest patch, the songs wont play :( I'm using the latest version of firefox browser

jannomeister commented 4 years ago

When I play the very first song in the queue it will play my spotify latest song :(

pasathaioum5 commented 4 years ago

Still having #290 issue have to use the quick dirty hack method (see the gif below) festify

pasathaioum5 commented 4 years ago

even worst, now the website will occationally freeze the music will stop playing and the browser saying "Tab is not responsding "Festify" what would you like to do" and gave me option to wait or close

festify2

image

ccantill commented 4 years ago

Definitely not fixed for me either. Now I even have to close Festify to be able to play anything in the Spotify client.

chrisbjw commented 4 years ago

Same Problem. Workaround with the "one Second of silence" isn't working either. It's just bursting through the playlist silent.

leolabs commented 4 years ago

Oh man, okay. I've rolled back the update for now. Please clear your browser cache and try again.

@NeoLegends do you have time for a remote session in the beginning of February? We should get this bug fixed asap, but I think we'll be quicker with four eyes :)

chrisbjw commented 4 years ago

Nice! Now the work around is working again!

b12e commented 4 years ago

What's the latest on this bug?

leolabs commented 4 years ago

We‘re still on it and will dedicate some more time on it next week. It’s more complicated than we thought it would be.

pasathaioum5 commented 4 years ago

Wait, I thought it was already fixed. I used it since you rolled back the update and it works fine so far for me 😂

leolabs commented 4 years ago

Oh, that's interesting! I'll take a closer look on Tuesday. Maybe Spotify reversed some changes they made to their API or something 🤔

pasathaioum5 commented 4 years ago

festify_ok

some gif to confirm it's ok (without a workaround, even)

jannomeister commented 4 years ago

@leolabs yeah, I thought its already fixed because its working now :) The bug was gone.