[GH-ISSUE #223] Crash on connect #150

Closed
opened 2026-02-27 19:29:06 +03:00 by kerem · 21 comments
Owner

Originally created by @nzoschke on GitHub (May 17, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/223

On the latest project version on OS X, I see the device in Spotify Connect but librespot crashes when I connect to it:

$ target/release/librespot -n Librespot
INFO:librespot: librespot d40c0f5 (2018-05-16). Built on 2018-05-17. Build ID: GxFW96z8
WARN:mdns::fsm: error sending packet Os { code: 65, kind: Other, message: "No route to host" }
INFO:librespot_core::session: Connecting to AP "guc3-accesspoint-b-wxrw.ap.spotify.com:4070"
INFO:librespot_core::session: Authenticated as "REDACTED" !
INFO:librespot_core::session: Country: "US"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: WireError(InvalidEnumValue(14))', libcore/result.rs:945:5
stack backtrace:
   0:        0x1021c882b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h3f18d3fe7b409cbd
   1:        0x1021b291b - std::sys_common::backtrace::print::hfd7004b5bee7b0b3
   2:        0x1021c0b6d - std::panicking::default_hook::{{closure}}::hb39bacd7102e387a
   3:        0x1021c08ca - std::panicking::default_hook::h81449bb3ee2c264c
   4:        0x1021c0fe6 - std::panicking::rust_panic_with_hook::h0baa7f6d452ec656
   5:        0x1021c0e1a - std::panicking::begin_panic_fmt::hb73f14e064bcaac6
   6:        0x1021c0d12 - rust_begin_unwind
   7:        0x1021fc245 - core::panicking::panic_fmt::h1f931e954ed5ca10
   8:        0x101d37fed - core::result::unwrap_failed::h89c26c22b83db455
   9:        0x101d2b8fc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::haa19ec0ec08ab3da
  10:        0x101d4cdc8 - <futures::stream::map::Map<S, F> as futures::stream::Stream>::poll::h1279f2f676912801
  11:        0x101d306c3 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h53355516242d97d3
  12:        0x101d072ba - <librespot::Main as futures::future::Future>::poll::hf62b408878027c35
  13:        0x101ce433c - <futures::task_impl::Spawn<T>>::poll_future_notify::hffe548c8bee7756b
  14:        0x101ce41c6 - <futures::task_impl::Spawn<T>>::poll_future_notify::he8732aed2b4db136
  15:        0x101cee751 - <std::thread::local::LocalKey<T>>::with::h2e50911a234dc4f9
  16:        0x101cfa128 - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h192d657a7337ed64
  17:        0x101cee9ab - <std::thread::local::LocalKey<T>>::with::h794c42a689db370f
  18:        0x101cee647 - <std::thread::local::LocalKey<T>>::with::h16e2725fa9ac4084
  19:        0x101cee4f0 - <std::thread::local::LocalKey<T>>::with::h0f4d651a1d7e64c3
  20:        0x101cef715 - <scoped_tls::ScopedKey<T>>::set::h597b24e1b7405f61
  21:        0x101ce96e3 - tokio_core::reactor::Core::run::hd44178e1cb142dd0
  22:        0x101d096b4 - librespot::main::hcd85999e9d3f24cc
  23:        0x101cff805 - std::rt::lang_start::{{closure}}::h825b5a97fa1e332e
  24:        0x1021c0c77 - std::panicking::try::do_call::h31b28181f28d5f56
  25:        0x1021d3aae - __rust_maybe_catch_panic
  26:        0x1021beec1 - std::rt::lang_start_internal::h2bf4e04a5f964a3d
  27:        0x101d0a53b - main
Originally created by @nzoschke on GitHub (May 17, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/223 On the latest project version on OS X, I see the device in Spotify Connect but librespot crashes when I connect to it: ``` $ target/release/librespot -n Librespot INFO:librespot: librespot d40c0f5 (2018-05-16). Built on 2018-05-17. Build ID: GxFW96z8 WARN:mdns::fsm: error sending packet Os { code: 65, kind: Other, message: "No route to host" } INFO:librespot_core::session: Connecting to AP "guc3-accesspoint-b-wxrw.ap.spotify.com:4070" INFO:librespot_core::session: Authenticated as "REDACTED" ! INFO:librespot_core::session: Country: "US" thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: WireError(InvalidEnumValue(14))', libcore/result.rs:945:5 stack backtrace: 0: 0x1021c882b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h3f18d3fe7b409cbd 1: 0x1021b291b - std::sys_common::backtrace::print::hfd7004b5bee7b0b3 2: 0x1021c0b6d - std::panicking::default_hook::{{closure}}::hb39bacd7102e387a 3: 0x1021c08ca - std::panicking::default_hook::h81449bb3ee2c264c 4: 0x1021c0fe6 - std::panicking::rust_panic_with_hook::h0baa7f6d452ec656 5: 0x1021c0e1a - std::panicking::begin_panic_fmt::hb73f14e064bcaac6 6: 0x1021c0d12 - rust_begin_unwind 7: 0x1021fc245 - core::panicking::panic_fmt::h1f931e954ed5ca10 8: 0x101d37fed - core::result::unwrap_failed::h89c26c22b83db455 9: 0x101d2b8fc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::haa19ec0ec08ab3da 10: 0x101d4cdc8 - <futures::stream::map::Map<S, F> as futures::stream::Stream>::poll::h1279f2f676912801 11: 0x101d306c3 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::h53355516242d97d3 12: 0x101d072ba - <librespot::Main as futures::future::Future>::poll::hf62b408878027c35 13: 0x101ce433c - <futures::task_impl::Spawn<T>>::poll_future_notify::hffe548c8bee7756b 14: 0x101ce41c6 - <futures::task_impl::Spawn<T>>::poll_future_notify::he8732aed2b4db136 15: 0x101cee751 - <std::thread::local::LocalKey<T>>::with::h2e50911a234dc4f9 16: 0x101cfa128 - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h192d657a7337ed64 17: 0x101cee9ab - <std::thread::local::LocalKey<T>>::with::h794c42a689db370f 18: 0x101cee647 - <std::thread::local::LocalKey<T>>::with::h16e2725fa9ac4084 19: 0x101cee4f0 - <std::thread::local::LocalKey<T>>::with::h0f4d651a1d7e64c3 20: 0x101cef715 - <scoped_tls::ScopedKey<T>>::set::h597b24e1b7405f61 21: 0x101ce96e3 - tokio_core::reactor::Core::run::hd44178e1cb142dd0 22: 0x101d096b4 - librespot::main::hcd85999e9d3f24cc 23: 0x101cff805 - std::rt::lang_start::{{closure}}::h825b5a97fa1e332e 24: 0x1021c0c77 - std::panicking::try::do_call::h31b28181f28d5f56 25: 0x1021d3aae - __rust_maybe_catch_panic 26: 0x1021beec1 - std::rt::lang_start_internal::h2bf4e04a5f964a3d 27: 0x101d0a53b - main ```
kerem closed this issue 2026-02-27 19:29:06 +03:00
Author
Owner

@dawidd6 commented on GitHub (May 17, 2018):

Yup, can confirm that. Same with Android and Ubuntu clients.

<!-- gh-comment-id:389917800 --> @dawidd6 commented on GitHub (May 17, 2018): Yup, can confirm that. Same with Android and Ubuntu clients.
Author
Owner

@omelettedufromagee commented on GitHub (May 17, 2018):

I can confirm too. Crashed on me while listening to music around 11.30 EST. Spotify probably updated something.
I am using the librespot version built on 2018-04-30.

<!-- gh-comment-id:389924872 --> @omelettedufromagee commented on GitHub (May 17, 2018): I can confirm too. Crashed on me while listening to music around 11.30 EST. Spotify probably updated something. I am using the librespot version built on 2018-04-30.
Author
Owner

@analogic commented on GitHub (May 17, 2018):

Same here https://github.com/dtcooper/raspotify/issues/113

<!-- gh-comment-id:389924879 --> @analogic commented on GitHub (May 17, 2018): Same here https://github.com/dtcooper/raspotify/issues/113
Author
Owner

@plietar commented on GitHub (May 17, 2018):

Can you try to add a new entry in https://github.com/librespot-org/librespot/blob/master/protocol/proto/spirc.proto#L78, with value 0xe, see if that fixes it?

You'll have to rebuild the sources using the protocol/build.sh file.

<!-- gh-comment-id:389930765 --> @plietar commented on GitHub (May 17, 2018): Can you try to add a new entry in `https://github.com/librespot-org/librespot/blob/master/protocol/proto/spirc.proto#L78`, with value `0xe`, see if that fixes it? You'll have to rebuild the sources using the `protocol/build.sh` file.
Author
Owner

@nzoschke commented on GitHub (May 17, 2018):

I am trying but having trouble with the build environment:

$ ./build.sh 
protoc-gen-rust: program not found or is not executable
--rust_out: protoc-gen-rust: Plugin failed with status code 1.
<!-- gh-comment-id:389935408 --> @nzoschke commented on GitHub (May 17, 2018): I am trying but having trouble with the build environment: ``` $ ./build.sh protoc-gen-rust: program not found or is not executable --rust_out: protoc-gen-rust: Plugin failed with status code 1. ```
Author
Owner

@nzoschke commented on GitHub (May 17, 2018):

Ok I got past that with cargo install protobuf --version 1.2.1.

Adding the 0xe value does fix it!

<!-- gh-comment-id:389938026 --> @nzoschke commented on GitHub (May 17, 2018): Ok I got past that with `cargo install protobuf --version 1.2.1`. Adding the `0xe` value does fix it!
Author
Owner

@plietar commented on GitHub (May 17, 2018):

Great! Could you make a PR with the updated .proto and sources please.

The good news is rust-protobuf has recently been fixed to ignore unknown values: https://github.com/stepancheg/rust-protobuf/pull/276

This was released in version 1.5.0, so if we update to that version we shouldn't run into this issue.
I'll send a PR soon for this, and also use protobuf-codegen-pure so we don't have to manually regenerate sources.

<!-- gh-comment-id:389940755 --> @plietar commented on GitHub (May 17, 2018): Great! Could you make a PR with the updated `.proto` and sources please. The good news is rust-protobuf has recently been fixed to ignore unknown values: https://github.com/stepancheg/rust-protobuf/pull/276 This was released in version 1.5.0, so if we update to that version we shouldn't run into this issue. I'll send a PR soon for this, and also use [protobuf-codegen-pure](https://github.com/stepancheg/rust-protobuf/tree/master/protobuf-codegen-pure) so we don't have to manually regenerate sources.
Author
Owner

@nzoschke commented on GitHub (May 17, 2018):

I’m happy to however I stepped away for my dev machine for the day so it’ll
be later tonight.

I am not sure what to name the field either...
On Thu, May 17, 2018 at 10:11 AM Paul Liétar notifications@github.com
wrote:

Great! Could you make a PR with the updated .proto and sources please.

The good news is rust-protobuf has recently been fixed to ignore unknown
values: stepancheg/rust-protobuf#276
https://github.com/stepancheg/rust-protobuf/pull/276

This was released in version 1.5.0, so if we update to that version we
shouldn't run into this issue.
I'll send a PR soon for this, and also use protobuf-codegen-pure
https://github.com/stepancheg/rust-protobuf/tree/master/protobuf-codegen-pure
so we don't have to manually regenerate sources.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/librespot-org/librespot/issues/223#issuecomment-389940755,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAI_0qbEM7Xx6QX--hPw7QF3Ko4nRJETks5tza8rgaJpZM4UDTs_
.

<!-- gh-comment-id:389941526 --> @nzoschke commented on GitHub (May 17, 2018): I’m happy to however I stepped away for my dev machine for the day so it’ll be later tonight. I am not sure what to name the field either... On Thu, May 17, 2018 at 10:11 AM Paul Liétar <notifications@github.com> wrote: > Great! Could you make a PR with the updated .proto and sources please. > > The good news is rust-protobuf has recently been fixed to ignore unknown > values: stepancheg/rust-protobuf#276 > <https://github.com/stepancheg/rust-protobuf/pull/276> > > This was released in version 1.5.0, so if we update to that version we > shouldn't run into this issue. > I'll send a PR soon for this, and also use protobuf-codegen-pure > <https://github.com/stepancheg/rust-protobuf/tree/master/protobuf-codegen-pure> > so we don't have to manually regenerate sources. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/librespot-org/librespot/issues/223#issuecomment-389940755>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAI_0qbEM7Xx6QX--hPw7QF3Ko4nRJETks5tza8rgaJpZM4UDTs_> > . >
Author
Owner

@dawidd6 commented on GitHub (May 17, 2018):

Ok it's working now. Needed to add this line:
kSupportsPlaylistV3 = 0xe

under this line:
https://github.com/librespot-org/librespot/blob/master/protocol/proto/spirc.proto#L78

I made a pull request for this. @nzoschke if you don't mind?

<!-- gh-comment-id:389944374 --> @dawidd6 commented on GitHub (May 17, 2018): Ok it's working now. Needed to add this line: `kSupportsPlaylistV3 = 0xe` under this line: https://github.com/librespot-org/librespot/blob/master/protocol/proto/spirc.proto#L78 I made a pull request for this. @nzoschke if you don't mind?
Author
Owner

@nzoschke commented on GitHub (May 17, 2018):

@dawidd6 don't mind at all. Thanks!

<!-- gh-comment-id:389974051 --> @nzoschke commented on GitHub (May 17, 2018): @dawidd6 don't mind at all. Thanks!
Author
Owner

@berrywhite96 commented on GitHub (May 17, 2018):

Compiled on my mac, same error like before :/

<!-- gh-comment-id:389978933 --> @berrywhite96 commented on GitHub (May 17, 2018): Compiled on my mac, same error like before :/
Author
Owner

@dawidd6 commented on GitHub (May 17, 2018):

@berrywhite96 did you compile from my fork? I just made fresh build from my master and it's working as expected.

<!-- gh-comment-id:389986672 --> @dawidd6 commented on GitHub (May 17, 2018): @berrywhite96 did you compile from my fork? I just made fresh build from my master and it's working as expected.
Author
Owner

@michalfita commented on GitHub (May 17, 2018):

I have the same problem on Raspberry. When we can expect a fix on master?

<!-- gh-comment-id:389987646 --> @michalfita commented on GitHub (May 17, 2018): I have the same problem on Raspberry. When we can expect a fix on **master**?
Author
Owner

@Gronis commented on GitHub (May 17, 2018):

I've complied from @nzoschke commit on linux x86 and it works fine :)
@michalfita We will get a fix on master once the PR is merged

<!-- gh-comment-id:389989102 --> @Gronis commented on GitHub (May 17, 2018): I've complied from @nzoschke commit on linux x86 and it works fine :) @michalfita We will get a fix on **master** once the PR is merged
Author
Owner

@berrywhite96 commented on GitHub (May 17, 2018):

@dawidd6 oh I thought its already in the master branch :D. Your fork work as expected on mac! Will now compile on raspberry, thank you.

<!-- gh-comment-id:389989624 --> @berrywhite96 commented on GitHub (May 17, 2018): @dawidd6 oh I thought its already in the master branch :D. Your fork work as expected on mac! Will now compile on raspberry, thank you.
Author
Owner

@dtcooper commented on GitHub (May 17, 2018):

Tracking this for Raspotify as well!

<!-- gh-comment-id:390015094 --> @dtcooper commented on GitHub (May 17, 2018): Tracking this for [Raspotify](/dtcooper/raspotify) as well!
Author
Owner

@plietar commented on GitHub (May 17, 2018):

Btw what other devices with what version of the Spotify app do you have on when this issue happens?
I'm curious as to what the meaning of the new enum is, but neither the macOS desktop client nor the Android one support it yet (at least as far as I can tell, from a quick dump of strings).

<!-- gh-comment-id:390018694 --> @plietar commented on GitHub (May 17, 2018): Btw what other devices with what version of the Spotify app do you have on when this issue happens? I'm curious as to what the meaning of the new enum is, but neither the macOS desktop client nor the Android one support it yet (at least as far as I can tell, from a quick dump of strings).
Author
Owner

@dawidd6 commented on GitHub (May 17, 2018):

Android (phone) - 8.4.36.305
Ubuntu (desktop) - 1.0.77.338.g758ebd78

<!-- gh-comment-id:390019827 --> @dawidd6 commented on GitHub (May 17, 2018): Android (phone) - 8.4.36.305 Ubuntu (desktop) - 1.0.77.338.g758ebd78
Author
Owner

@sashahilton00 commented on GitHub (May 17, 2018):

@plietar it could be the Time Capsule playlist, for example. I get a funky new UI for Spotify generated playlists now. Though that could also be the v2 playlist

<!-- gh-comment-id:390020278 --> @sashahilton00 commented on GitHub (May 17, 2018): @plietar it could be the Time Capsule playlist, for example. I get a funky new UI for Spotify generated playlists now. Though that could also be the v2 playlist
Author
Owner

@dtcooper commented on GitHub (May 17, 2018):

Confirming that @dawidd6's fork works on Raspberry Pi and closes Raspotify:#114.

<!-- gh-comment-id:390021611 --> @dtcooper commented on GitHub (May 17, 2018): Confirming that @dawidd6's fork works on Raspberry Pi and closes [Raspotify:#114](https://github.com/dtcooper/raspotify/issues/114).
Author
Owner

@berrywhite96 commented on GitHub (May 17, 2018):

@plietar Mac OS: 1.0.80.474.gef6b503e
Android: 8.4.53.703
Both dont connect.

<!-- gh-comment-id:390023639 --> @berrywhite96 commented on GitHub (May 17, 2018): @plietar Mac OS: 1.0.80.474.gef6b503e Android: 8.4.53.703 Both dont connect.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#150
No description provided.