spocon / lovspotify

Spotify GUI + Spotify Client for Raspberry PI , Ubuntu and Debian
54 stars 4 forks source link

Becomes unresponsive after some days #9

Closed timgoeller closed 4 years ago

timgoeller commented 4 years ago

After some days, lovspotify becomes unresponsive for me. When I want to play music, the app and the web interface say it's playing the song, but it's not. Also, I can't stop the song, or even open the song details on the app. I can still skip songs in the web interface (but it won't play the next song either). This happend every 5-6 days. The last times I got it working again by just restarting the pi or the service, but that doesn't seem to do the trick this time.

(I'm using a Raspberry 3 B+)

spocon commented 4 years ago

Hej Tim ,

Could you add some logs when that happend ?

Please open a console and enter

journalctl -u lovspotify

timgoeller commented 4 years ago

This error appears in the log. Seems to be some audio issue, though I didn't change any settings:

_Jul 26 11:22:33 raspberrypi java[601]: 2020-07-26 11:22:33,413 INFO CacheManager:72 - There are 246 cached entries. Jul 26 11:22:34 raspberrypi java[601]: 2020-07-26 11:22:34,906 INFO StateWrapper:305 - Notified new device (us)! Jul 26 11:22:35 raspberrypi java[601]: 2020-07-26 11:22:35,479 INFO DeviceStateHandler:252 - Put state. {ts: 1595758954893, connId: M2RhZ...DNDc4, reason: NEWDEVICE} Jul 26 11:22:36 raspberrypi java[601]: 2020-07-26 11:22:36,203 INFO PlayerSession:49 - Created new session. {id: xrxcPO3X4VZmIjZq73bIsA} Jul 26 11:22:36 raspberrypi java[601]: 2020-07-26 11:22:36,367 INFO LineHelper:62 - Available mixers: 'Headphones [default]', 'Headphones [plughw:0,0]' Jul 26 11:22:36 raspberrypi java[601]: 2020-07-26 11:22:36,372 FATAL Player:548 - An error with the mixer occurred. This is likely a configuration issue, please consult the project repository. Jul 26 11:22:36 raspberrypi java[601]: xyz.gianlu.librespot.player.mixing.LineHelper$MixerException: No mixers available for the specified search keywords: [Headphones [plughw:1,0]] Jul 26 11:22:36 raspberrypi java[601]: at xyz.gianlu.librespot.player.mixing.LineHelper.findMixer(LineHelper.java:49) ~[librespot-core-1.4.0.jar!/:?] Jul 26 11:22:36 raspberrypi java[601]: at xyz.gianlu.librespot.player.mixing.LineHelper.getLineFor(LineHelper.java:63) ~[librespot-core-1.4.0.jar!/:?] Jul 26 11:22:36 raspberrypi java[601]: at xyz.gianlu.librespot.player.mixing.AudioSink$Output.acquireLine(AudioSink.java:203) ~[librespot-core-1.4.0.jar!/:?] Jul 26 11:22:36 raspberrypi java[601]: at xyz.gianlu.librespot.player.mixing.AudioSink$Output.start(AudioSink.java:219) ~[librespot-core-1.4.0.jar!/:?] Jul 26 11:22:36 raspberrypi java[601]: at xyz.gianlu.librespot.player.mixing.AudioSink.run(AudioSink.java:149) ~[librespot-core-1.4.0.jar!/:?] Jul 26 11:22:36 raspberrypi java[601]: at java.lang.Thread.run(Thread.java:834) [?:?] Jul 26 11:22:36 raspberrypi java[601]: 2020-07-26 11:22:36,386 WARN EventService:106 - Did not send event because of missing metrics: 0108a9163c9d43281b9823786e19e35d

spocon commented 4 years ago

The issue is that the Mixer Headphones [plughw:1,0] is disappearing. You could try to use Headphones [default] instead of Headphones [plughw:1,0]

spocon commented 4 years ago

the issue is the linux system together with Java which lovspotify is running in . Java itself provides the Sound Mixer. https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/sound/sampled/Mixer.html

You could try to ask the maintainer of the package librespot-java , https://github.com/librespot-org/librespot-java

closing this

timgoeller commented 4 years ago

I replaced the "Headphones [plughw:1,0]" in mixerSearchKeywords with just "Headphones", that worked!