balbuze / volumio-plugins

volumio's plugins from balbuze
190 stars 60 forks source link

Plugin immediately crashes when trying to connect from desktop app #306

Closed kevin00xxl closed 1 year ago

kevin00xxl commented 3 years ago

Hi There,

Thanks for creating this plugin, it bet it works amazing! I have some problems starting a Spotify Connect session from my Spotify app on my Desktop.

When i check the logs from Volumio the last few lines are:

[SpotifyConnect] A connect session has begun [SpotifyConnect] Device palyback is active! [Vollibrespot] : error 403 for uri hm://keymaster/token/authenticated?client_id=4ced2e7c73484127be5d36015752eb43&scope=streaming,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,user-read-private [Vollibrespot] : Error: MercuryError thread 'main' panicked at 'cannot poll Map twice', /build/cache/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/map.rs:35:29 stack backtrace:

I am using version 2.882 of Volumio on a Raspberry Pi 2 model B. I hope you can check out if this is something i can resolve or if this is a bug.

I offcourse tried to reinstall Volumio, and reinstall the pluging via the webbrowser but then i have the same "problem". The weird thing is that when i start a connect session from my iPhone it just works!.

hempalex commented 3 years ago

Same issue on : Raspberry Pi 3 Model B Rev 1.2 after updating to Volumio 2.907

Stopping Volspotconnect2 Daemon...
Starting Volspotconnect2 Daemon...
Started Volspotconnect2 Daemon.
vollibrespot v0.2.2 cd96399 2020-10-07 (librespot 08d8bcc 2020-10-07) -- Built On 2020-10-07
Reading Config from "volspotify.toml"
[Vollibrespot] : Using Alsa backend with device: plughw:1
[Vollibrespot] : Failed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
[Vollibrespot] : Connecting to AP "gew1-accesspoint-a-vcdm.ap.spotify.com:443"
[Vollibrespot] : Authenticated as "31pds9nllej69xcuy0tq09w4r" !
[Vollibrespot] : Setting up new mixer: card:hw:1 mixer:Headphone index:0
[Vollibrespot] : Alsa Mixer info min: -10239 (MilliBel(-9999999)[dB]) -- max: 400 (MilliBel(400)[dB]) HW: true
[Vollibrespot] : Using alsa sink
[Vollibrespot] : Metadata pipe established
[Vollibrespot] : Country: "RU"
[Vollibrespot] : Event: Volume { volume_to_mixer: 65535 }
[Vollibrespot] : Fetching autoplay context uri
[Vollibrespot] : Event: SessionActive { became_active_at: 1629450226493 }
[Vollibrespot] : SessionActive!
[Vollibrespot] : Event: PlaybackStarted { track_id: SpotifyId { id: 194555916762366650435732499959182223141, audio_type: Track } }
[Vollibrespot] : Event: PlaybackLoading { track_id: SpotifyId { id: 194555916762366650435732499959182223141, audio_type: Track } }
[Vollibrespot] : error 403 for uri hm://keymaster/token/authenticated?client_id=4ced2e7c73484127be5d36015752eb43&scope=streaming,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,user-read-private
[Vollibrespot] : Error: MercuryError
[Vollibrespot] : No autoplay_uri found
[Vollibrespot] : AutoplayError: MercuryError
thread 'main' panicked at 'cannot poll Map twice', /build/cache/registry/src/github.com-1ecc6299db9ec823/futures-0.1.29/src/future/map.rs:35:29
stack backtrace:
0:   0xa8233c - backtrace::backtrace::libunwind::trace::hae21a072c81e5842
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1:   0xa8233c - backtrace::backtrace::trace_unsynchronized::h0f9b260087e46e47
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2:   0xa8233c - std::sys_common::backtrace::_print_fmt::hbf1a59173a7860c3
at src/libstd/sys_common/backtrace.rs:78
3:   0xa8233c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he1a5d6f378e506c4
at src/libstd/sys_common/backtrace.rs:59
4:   0xaa2d5c - core::fmt::write::hb37ae5a5e0b70623
at src/libcore/fmt/mod.rs:1076
5:   0xa7bc64 - std::io::Write::write_fmt::ha24bb3f5a858327b
at src/libstd/io/mod.rs:1537
6:   0xa84974 - std::sys_common::backtrace::_print::h47b03aa1342833e3
at src/libstd/sys_common/backtrace.rs:62
7:   0xa84974 - std::sys_common::backtrace::print::h2217cbc390250439
at src/libstd/sys_common/backtrace.rs:49
8:   0xa84974 - std::panicking::default_hook::{{closure}}::h179f5229ea1c8e30
at src/libstd/panicking.rs:198
9:   0xa84640 - std::panicking::default_hook::h46ab82039cbc65eb
at src/libstd/panicking.rs:217
10:   0xa85054 - std::panicking::rust_panic_with_hook::h7326c48419bc7c33
at src/libstd/panicking.rs:526
11:   0xa84c54 - rust_begin_unwind
at src/libstd/panicking.rs:437
12:   0xaa0594 - core::panicking::panic_fmt::ha292e19d5ae716ed
at src/libcore/panicking.rs:85
13:   0xaa0370 - core::option::expect_failed::he9e39f8f5ba60ecb
at src/libcore/option.rs:1261
volspotconnect2.service: main process exited, code=exited, status=101/n/a
Unit volspotconnect2.service entered failed state.
14:   0x776bf8 - <futures::future::map::Map<A,F> as futures::future::Future>::poll::h3d56b212ca27d9e4
15:   0x62c3a4 - <librespot_connect::spirc::SpircTask as futures::future::Future>::poll::ha2e91a6b75c719f3
16:   0x5a2ca4 - <vollibrespot::Main as futures::future::Future>::poll::hc5e7d2d1b7dbef13
17:   0x56a844 - futures::task_impl::std::set::h8f081cf0436110c9
18:   0x57e41c - std::thread::local::LocalKey<T>::with::h711a13323aafc45a
19:   0x55aa50 - tokio_current_thread::Entered<P>::block_on::h339073902a399eb7
20:   0x57ee00 - std::thread::local::LocalKey<T>::with::hff64c13ccfec5327
21:   0x58b20c - tokio_reactor::with_default::h7ef12e65cb103d2f
22:   0x55e9f8 - tokio::runtime::current_thread::runtime::Runtime::block_on::h043f136d6b8cf48f
23:   0x5a42c8 - vollibrespot::main::h02a0d49d4cc5eaa6
24:   0x58bf18 - std::rt::lang_start::{{closure}}::h279cd2b7929fdba7
25:   0xa85404 - std::rt::lang_start_internal::{{closure}}::he93bfc404849b78a
at src/libstd/rt.rs:52
26:   0xa85404 - std::panicking::try::do_call::h6e9e98f4078affb0
at src/libstd/panicking.rs:348
27:   0xa85404 - std::panicking::try::h2e68d4f7f799a6df
at src/libstd/panicking.rs:325
28:   0xa85404 - std::panic::catch_unwind::h8880a4c07cc66391
at src/libstd/panic.rs:394
29:   0xa85404 - std::rt::lang_start_internal::hf4ae2140248bf16b
at src/libstd/rt.rs:51
30:   0x5a4d84 - main
31: 0x76d0f678 - __libc_start_main
[Vollibrespot] : EventSender disconnected
volspotconnect2.service holdoff time over, scheduling restart.
kialam commented 3 years ago

I've also had this issue happen to me recently. Logs also show 403 error when trying to get the auth token.

More info:

RPi4 version b
Volumio 3.114
balbuze commented 3 years ago

what is the version of volumio you use?

kialam commented 3 years ago

I'm on 3.114. Resuming playback via a phone seems to have resolved the issue. I could not get tablet or the desktop app to work once I encountered the error.

hempalex commented 3 years ago

Resuming playback via a phone seems to have resolved the issue.

This helps me too, but it needs to be done every day. Maybe some auth tokens expires? I'm on latest release version 2.917

remyj38 commented 1 year ago

Same issue here, desktop app can't play on Volumio (error 403), but mobile has not problem. I'm using a Rpi 2 with Volumio 3.546 and Spotify plugin 3.0.9. Desktop app : Spotify  pour Windows (64 bits) 1.2.21.1104.g42cf0a50 on Windows 11

balbuze commented 1 year ago

please, use last version from the store! v4.0.1 this an umaintened plugin here!