Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on connect #223

Closed
nzoschke opened this issue May 17, 2018 · 21 comments
Closed

Crash on connect #223

nzoschke opened this issue May 17, 2018 · 21 comments

Comments

@nzoschke
Copy link

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
@dawidd6
Copy link
Contributor

dawidd6 commented May 17, 2018

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

@omelettedufromagee
Copy link

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.

@analogic
Copy link

Same here dtcooper/raspotify#113

@plietar
Copy link
Contributor

plietar commented 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.

@nzoschke
Copy link
Author

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.

@nzoschke
Copy link
Author

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

Adding the 0xe value does fix it!

@plietar
Copy link
Contributor

plietar commented 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: stepancheg/rust-protobuf#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.

@nzoschke
Copy link
Author

nzoschke commented May 17, 2018 via email

@dawidd6
Copy link
Contributor

dawidd6 commented 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?

@nzoschke
Copy link
Author

@dawidd6 don't mind at all. Thanks!

@berrywhite96
Copy link

Compiled on my mac, same error like before :/

@dawidd6
Copy link
Contributor

dawidd6 commented May 17, 2018

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

@michalfita
Copy link

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

@Gronis
Copy link

Gronis commented 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

@berrywhite96
Copy link

@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.

@dtcooper
Copy link

Tracking this for Raspotify as well!

@plietar
Copy link
Contributor

plietar commented 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).

@dawidd6
Copy link
Contributor

dawidd6 commented May 17, 2018

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

@sashahilton00
Copy link
Member

@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

@dtcooper
Copy link

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

@berrywhite96
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants