Spotify connect doesn't work on Macbook

Volumio: 3.175
Spotify Connect2 plugin: 3.0.7

Spotify on my macbook doesn’t want to connect to Volumio. I can see it on the list but nothing happens when I click on it. It works fine when using Spotify connect to Volumio from my iPhone.

Here is the log when failing to connect from my mac:

Starting Live Log...
[Vollibrespot] : Connecting to AP "ap-gew1.spotify.com:443"
[Vollibrespot] : Authenticated as "1135114041" !
[Vollibrespot] : Using alsa sink
[Vollibrespot] : Metadata pipe established
[Vollibrespot] : Event: Volume { volume_to_mixer: 21626 }
[Vollibrespot] : Country: "GB"
[SpotifyConnect]  32.99916075379568
[SpotifyConnect] Volume: Spotify:32.99916075379568 Volumio: 33
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
[Vollibrespot] : Fetching autoplay context uri
[Vollibrespot] : Event: SessionActive { became_active_at: 1640165592053 }
[Vollibrespot] : SessionActive!
[Vollibrespot] : Event: PlaybackStarted { track_id: SpotifyId { id: 296270071491791382650575278370571289151, audio_type: Track } }
[Vollibrespot] : Event: PlaybackLoading { track_id: SpotifyId { id: 296270071491791382650575278370571289151, audio_type: Track } }
[SpotifyConnect]  A connect session has begun
[SpotifyConnect]  Device palyback is active!
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: volspotconnect2
[SpotifyConnect] Not requsting volumioStop on our own service
[SpotifyConnect] Vollibrespot Active
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: volspotconnect2
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::volumioGetState
[SpotifyConnect] Currently active: volspotconnect2
[SpotifyConnect] Pushing new state :: true
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
[Vollibrespot] : Autoplay uri resolved to <"spotify:station:playlist:48ISxNHIzuAL1ubjUmE61q">
[Vollibrespot] : Resolving uri "spotify:station:playlist:48ISxNHIzuAL1ubjUmE61q"
[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.31/src/future/map.rs:35:29
stack backtrace:
   0:   0x9b6040 - std::backtrace_rs::backtrace::libunwind::trace::h4e6fc6cdc5d76862
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:   0x9b6040 - std::backtrace_rs::backtrace::trace_unsynchronized::h1c665adaaf480d86
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:   0x9b6040 - std::sys_common::backtrace::_print_fmt::h39ff02745027e048
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/sys_common/backtrace.rs:67:5
   3:   0x9b6040 - ::fmt::hc83ae421f857c6ae
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/sys_common/backtrace.rs:46:22
   4:   0x9d76a4 - core::fmt::write::h59f33d28fc1a9cf5
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/fmt/mod.rs:1092:17
   5:   0x9aefec - std::io::Write::write_fmt::h96774110acd52d88
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/io/mod.rs:1572:15
   6:   0x9b874c - std::sys_common::backtrace::_print::h28b9431057012c44
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/sys_common/backtrace.rs:49:5
   7:   0x9b874c - std::sys_common::backtrace::print::h28173b7ebfe4a4ac
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/sys_common/backtrace.rs:36:9
   8:   0x9b874c - std::panicking::default_hook::{{closure}}::h12f82aa3def34336
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:208:50
   9:   0x9b812c - std::panicking::default_hook::hee29440c29c1cc2e
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:225:9
  10:   0x9b8dac - std::panicking::rust_panic_with_hook::he7d3b6e3eee77e72
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:591:17
  11:   0x9b8928 - std::panicking::begin_panic_handler::{{closure}}::h7faba6b3632756a6
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:497:13
  12:   0x9b65bc - std::sys_common::backtrace::__rust_end_short_backtrace::hdde0f982a7a71ce9
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/sys_common/backtrace.rs:141:18
  13:   0x9b8870 - rust_begin_unwind
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:493:5
  14:   0x49221c - core::panicking::panic_fmt::h97b6949f75a63095
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:92:14
  15:   0x4920a4 - core::option::expect_failed::h4183cd8fa1675d39
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/option.rs:1321:5
  16:   0x6a7944 -  as futures::future::Future>::poll::hb0ddb0e74a1baa46
  17:   0x5741a0 - ::poll::h1a955c132b92df14
  18:   0x4b5b04 - ::poll::h19799562239aa72c
  19:   0x4d20a0 - futures::task_impl::std::set::h0ef71bfab756f27d
  20:   0x4ec7b8 - std::thread::local::LocalKey::with::hb3c749d82f06f5c0
  21:   0x4c4710 - tokio_current_thread::Entered
::block_on::hac3e29a0a4da8120
  22:   0x4ec178 - std::thread::local::LocalKey::with::h78cb87ff6f4c2b7d
  23:   0x501cd4 - tokio_timer::clock::clock::with_default::hb0853b95f60f0630
  24:   0x4be9f4 - tokio::runtime::current_thread::runtime::Runtime::block_on::h239cb8d546240575
  25:   0x4b8258 - vollibrespot::main::hf11cedd7d8a3be51
  26:   0x4eb500 - std::sys_common::backtrace::__rust_begin_short_backtrace::ha48b0377a890cb6d
  27:   0x4eb720 - std::rt::lang_start::{{closure}}::h120c4b14d2445a8e
  28:   0x9b9198 - core::ops::function::impls:: for &F>::call_once::hb7f0eab2b8615017
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/ops/function.rs:259:13
  29:   0x9b9198 - std::panicking::try::do_call::h2c625414401a1a99
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:379:40
  30:   0x9b9198 - std::panicking::try::h09167d835e285a07
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:343:19
  31:   0x9b9198 - std::panic::catch_unwind::hdff19ee37d8421eb
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panic.rs:431:14
  32:   0x9b9198 - std::rt::lang_start_internal::h835544f25e1ef31c
                       at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/rt.rs:51:25
  33:   0x4b9a08 - main
  34: 0xb6bfc718 - __libc_start_main
[Vollibrespot] : EventSender disconnected
[SpotifyConnect]  Device palyback is inactive
[SpotifyConnect] Device Session is_active: true
[SpotifyConnect]  Sink released
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::volumioPushState
volspotconnect2.service: Main process exited, code=exited, status=101/n/a
volspotconnect2.service: Failed with result 'exit-code'.

volspotconnect2.service: Service RestartSec=2s expired, scheduling restart.
volspotconnect2.service: Scheduled restart job, restart counter is at 3.
Stopped Volspotconnect2 Daemon.
Started Volspotconnect2 Daemon.
vollibrespot v0.2.3 769ce77 2021-06-04 (librespot 08d8bcc 2020-10-07) -- Built On 2021-06-04
Reading Config from "volspotify.toml"
[Vollibrespot] : Using Alsa backend with device: volumio
[Vollibrespot] : Failed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
error: error

Librespot doesn’t support Facebook OAuth, so you need to:

At the top right of the desktop app, select your username, and go to Account.
You should be on the “Account overview” page.
You will see your Spotify “Username” there, which is a long string of randomized characters. Save that.
Now go to the “Set device password” page and set a password for your account.

Now log out of the Spotify desktop app, and log in without using Facebook, by using the (long random characters) username & password you just set.

Now the desktop app will send normal Spotify access tokens over Spotify Connect and it should work fine!

I don’t know why I couldn’t find this information anywhere on Volumio’s site and had to figure it out myself by looking at librespot’s open issues :confused: