plietar / librespot

Open Source Spotify client library
MIT License
1.14k stars 184 forks source link

Intermittent authentication issues #221

Closed dmfutcher closed 7 years ago

dmfutcher commented 7 years ago

I'm seeing issues with librespot intermittently failing to authenticate with Spotify. About half the time it will auth fine, the other half, it'll panic with "Authentication failed".

> RUST_BACKTRACE=full ./target/debug/librespot --username <redacted_correct_username> --password <redacted_correct_password>  --backend pipe --name Scrobbler
INFO:librespot: librespot aa86ebf (2017-07-09). Built on 2017-07-16.
WARN:mdns: Failed to register IPv6 receiver: Error { repr: Os { code: 49, message: "Can\'t assign requested address" } }
INFO:librespot::session: Connecting to AP "lon6-accesspoint-a21.ap.spotify.com:4070"
thread 'main' panicked at 'Authentication failed', /Users/davidfutcher/code/rust/librespot/target/debug/build/librespot-3c13ee3527cd9ab5/out/lib.rs:365
stack backtrace:
   0:        0x102f2ea63 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hcc709dd93d82a051
   1:        0x102f3286d - std::panicking::default_hook::{{closure}}::he392668e67778d9e
   2:        0x102f3247b - std::panicking::default_hook::h2ade4aa81d4f8204
   3:        0x102f34fe7 - std::panicking::rust_panic_with_hook::h4573918fc9f80a34
   4:        0x1024b5de3 - std::panicking::begin_panic::h0b1eb0ebf12edac1
   5:        0x10269d160 - librespot::connection::authenticate::{{closure}}::h491faa13958321b4
   6:        0x10245425b - <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll::{{closure}}::{{closure}}::hd96b1d1983e98ece
   7:        0x10250009d - <core::result::Result<T, E>>::map::h94574c79f2fc8796
   8:        0x102452bb5 - <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll::{{closure}}::ha736e5897b455cb3
   9:        0x1025c7a8a - <futures::future::chain::Chain<A, B, C>>::poll::hd8581d0da50a829e
  10:        0x102451f23 - <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll::hcb4726b2369fd3be
  11:        0x1025e78d6 - <alloc::boxed::Box<F> as futures::future::Future>::poll::hb66495c588857fb5
  12:        0x1025c131b - <futures::future::chain::Chain<A, B, C>>::poll::h4c6b3c2e0fa8b777
  13:        0x102451e93 - <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll::hb039b3204627240c
  14:        0x10264664e - <futures::future::map::Map<A, F> as futures::future::Future>::poll::h1b2bbd294a6a0e33
  15:        0x102413dc6 - <alloc::boxed::Box<F> as futures::future::Future>::poll::h3db0fa643d2683cb
  16:        0x1024237a2 - <librespot::Main as futures::future::Future>::poll::h184fc0c4b39a1ebf
  17:        0x1023e036c - <futures::task_impl::Spawn<F>>::poll_future::{{closure}}::hc40a91b557b5eade
  18:        0x1023e0527 - <futures::task_impl::Spawn<T>>::enter::{{closure}}::hb1da2be55168403e
  19:        0x1024180d3 - futures::task_impl::set::{{closure}}::h196e435af1bd9dbf
  20:        0x1023e63f1 - <std::thread::local::LocalKey<T>>::with::ha138070957478d2a
  21:        0x10241800f - futures::task_impl::set::he094d1281dd89e6b
  22:        0x1023e0486 - <futures::task_impl::Spawn<T>>::enter::h88e4fea210ad3907
  23:        0x1023e02ef - <futures::task_impl::Spawn<F>>::poll_future::h49a47c2cd84ac369
  24:        0x1023d06ee - tokio_core::reactor::Core::run::{{closure}}::h1a510271d9c3a902
  25:        0x1023da6c4 - <scoped_tls::ScopedKey<T>>::set::h25adf020d1dcbc80
  26:        0x1023d0549 - tokio_core::reactor::Core::run::h5f9256539d4bee9a
  27:        0x10242473b - librespot::main::h98d5680561ad6527
  28:        0x102f3611a - __rust_maybe_catch_panic
  29:        0x102f35400 - std::rt::lang_start::ha1f4f04346e51ef5
  30:        0x102424909 - main
sashahilton00 commented 7 years ago

This is the same problem as issue #220, and has been fixed in PR #218. Just waiting on a merge from @plietar...

dmfutcher commented 7 years ago

Yep confirm it's fixed by PR #218, cheers @sashahilton00.

sashahilton00 commented 7 years ago

Glad to hear it. Please close the issue :)