ncspot: Thread Error
Using on Ubuntu.18.04 Usually after sleep, I get following error after one song
thread '<unnamed>' panicked at 'could not send no-op event to cursive: "SendError(..)"', src/events.rs:41:9
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (5 by maintainers)
Commits related to this issue
- recreate librespot session when it's invalid initial attempt to handle #192 — committed to hrkfdn/ncspot by hrkfdn 4 years ago
- recreate librespot session when it's invalid initial attempt to handle #192 — committed to hrkfdn/ncspot by hrkfdn 4 years ago
- recreate librespot session when it's invalid initial attempt to handle #192 — committed to mtshrmn/ncspot by hrkfdn 4 years ago
Thanks again. I have pushed another fix and was able to reproduce it. In my case it successfully recreated the session. The UI was still a little off/out of sync, but after starting playback of another track things were fine. Some minor work remains, but it shouldn’t be as fragile anymore.
Let men know if this fixes it for you. Make sure you pull the current state. I really appreciate all the feedback/reports.
Hi, I still have this issue. It’s pretty easy to reproduce it, just start playing a song, disconnect and reconnect wifi and when press
>
to play the next song, it won’t play but it doesn’t seem any error in the log:I built
ncspot
locally, i.e. runningcargo install ncspot
Thanks!
Hey there, thanks for the report. So it seems that ncspot can at least detect that the session has died, which is a good first step, but recreating the session seems to fail. Unfortunately, backtrace output is logged to
stderr
and thus not in the normal debug log. You can log it by appending2>stderr.log
, which will log the backtrace to stderr.log. Would be awesome if you could attach a backtrace the next time it happens.Hi @theorangepotato I found out the root cause of my reply and maybe can help you too.
the issue belongs to this: https://github.com/librespot-org/librespot/issues/134
and
https://github.com/librespot-org/librespot/pull/206 https://github.com/librespot-org/librespot/pull/427 those two MR fix that, but only when librespot running as a binary itself… not fix in the library…
so my solution is to
now the mac goes to sleep then wake up, the Spotify session will auto reconnected as well.
so for ncspot this repo, the ways to fix this issue are:
hope this helped 🙇
I got the same issue, but run on macos,

but my backtrace says panic on this line https://github.com/librespot-org/librespot/blob/6daa2acd0af7dfe70837592b33bfe9480783f852/playback/src/player.rs#L159
version macos 10.15.4 ncspot 0.1.3 build with below command
steps
wait a while, not too fast to wake the computer up, define too fast: like pressing the sleep button then wake it up immediately, this will not panic and the ncspot will acting normally.
then finish the song remains, panic.
debug log debug.log
at [2020-06-09][22:03:11] [ncspot::spotify] [INFO] pause() then at [2020-06-09][22:14:15] [ncspot::spotify] [INFO] play() waiting the remained song finished, then at [2020-06-09][22:14:31] [librespot_playback::player] [ERROR] Unable to load audio item.
hope this helped