Spotifyd / spotifyd

A spotify daemon
https://spotifyd.rs
GNU General Public License v3.0
9.83k stars 450 forks source link

Panic when trying to play specific songs #1260

Open spoutn1k opened 8 months ago

spoutn1k commented 8 months ago

Description Hello all, I experience repeated crashes when trying to play the latest Justice/Tame Impala song. It is really recent so time might be of the essence to reproduce.

To Reproduce Play One night/All night to a device and switch to spotifyd, experience the crash.

Expected behavior Playing the song.

Logs I am putting the systemctl logs as attachment so not pasting here. spotifyd.log

Compilation flags

Versions (please complete the following information):

eladyn commented 8 months ago

Hmm, i'm not entirely sure what's happening here. FWIW, it seems to be playing fine on my instance. I can see in the metadata that Spotify is sending me regarding that song, that it has an earliest_live_timestampe set to Wednesday, 24. January 2024 18:00:00. But your logs look like your attempts are one day after that, so there should be no problem. (One should not however, that current librespot is parsing that field incorrectly. I doubt that that is the issue however, since the wrongly parsed timestamp is much earlier than the real one.)

Can you still reproduce the problem or has it resolved itself due to the release being already some days in the past?

spoutn1k commented 8 months ago

Thank you for looking into this. This is very interesting, I live in the Middle East but my country is still set to US, so maybe this was the issue ? I tried again this morning and it worked flawlessly. Is there another song with one such timestamp I can try to reproduce it ?

Btw is there notification support planned ? Due to the daemon nature of spotifyd it was very confusing what was happening.

eladyn commented 8 months ago

Huh, interesting. I just looked through the code, and apparently the earliest_live_timestamp shouldn't be relevant to the issue. It rather seems that Spotify somehow didn't return any available audio files, potentially due to it being that new?

Btw is there notification support planned ? Due to the daemon nature of spotifyd it was very confusing what was happening.

We do have the option of an event hook (on_song_change_hook) that is triggered each time, when the song changes, playback is paused/resumed, ... So you can mostly implement the notifications you want yourself. (See here for examples.) But I'm not sure, if that is what you wanted to be notified of?

spoutn1k commented 8 months ago

Really weird. Sorry I could not give more info I am a very new user of spotifyd. Great job btw pretty cool project.

The more I think about it the less it makes sense, but I would have really enjoyed having a notification of "Oops we panicked ! Log here" or something. Can you hook functions when panicking ? My big issue was figuring why the music stopped, as systemd restarted the daemon it appeared to be running, so I looked at my phone, internet connection and spotify as suspects.

eladyn commented 6 months ago

FYI, it might be related to https://github.com/librespot-org/librespot/issues/1268.