Skip to content

go-librespot spotify connect doesn't accept connection and then crashes #161

@FrancisHGR

Description

@FrancisHGR

So I have build / compiled go-librespot from source (Commit 4af7200) in order to pipe music to fifo for owntone. I have setup everything according to my understanding correctly. However, once I try to connect to my go-librespot spotify connect device "spotify-smart-home" via my phone, the connection is rejected and the whole spotify connect device is not even reachable anymore, not being listed under the spotify connect devices in my spotify app. Connection try happens after the line "DEBU[0001] put connect state because VOLUME_CHANGED "

My config.yml is below.

Any ideas based on the log?

root@debian-test:~/librespot/go-librespot# go run ./cmd/daemon
INFO[0000] running go-librespot dev                     
DEBU[0000] app state loaded                             
DEBU[0000] fetched new accesspoints: [ap-gew4.spotify.com:4070 ap-gew4.spotify.com:443 ap-gew4.spotify.com:80 ap-gue1.spotify.com:4070 ap-gew1.spotify.com:443 ap-gae2.spotify.com:80] 
DEBU[0000] fetched new dealers: [gew4-dealer.spotify.com:443 gue1-dealer.spotify.com:443 gew1-dealer.spotify.com:443 gae2-dealer.spotify.com:443] 
DEBU[0000] fetched new spclients: [gew4-spclient.spotify.com:443 gue1-spclient.spotify.com:443 gew1-spclient.spotify.com:443 gae2-spclient.spotify.com:443] 
INFO[0000] zeroconf server listening on port 36469      
DEBU[0000] obtained new client token: ####BLURRED#####
DEBU[0000] connected to ap-gew4.spotify.com:4070        
DEBU[0000] completed keyexchange                        
DEBU[0000] completed challenge                          
INFO[0000] authenticated AP as  ####BLURRED##### 
INFO[0000] authenticated Login5 as  ####BLURRED##### 
DEBU[0000] initializing zeroconf session, username:  ####BLURRED##### 
DEBU[0000] dealer connection opened                     
DEBU[0000] skipping packet PacketTypeSecretBlock, len: 336 
DEBU[0000] skipping packet PacketTypeLicenseVersion, len: 2 
DEBU[0000] skipping packet PacketTypeUnknown1f, len: 17 
DEBU[0000] skipping packet PacketTypeLegacyWelcome, len: 0 
DEBU[0000] skipping packet PacketTypeMercuryEvent, len: 481 
DEBU[0000] received connection id:  ####BLURRED#####
DEBU[0000] put connect state because NEW_DEVICE         
DEBU[0000] update volume to 65535/65535                 
DEBU[0001] put connect state because VOLUME_CHANGED     
DEBU[0007] handling transfer player command from  ####BLURRED##### 
DEBU[0007] resolved context of track                     uri="spotify:playlist:2Wn8mZPx5ptRI6RH8Vrax6"
DEBU[0007] shuffled context with seed 5176609461849141274 (len: 51, keep: 30)  uri="spotify:playlist:2Wn8mZPx5ptRI6RH8Vrax6"
DEBU[0007] loading track (paused: true, position: 23951ms)  uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
DEBU[0007] put connect state because PLAYER_STATE_CHANGED 
DEBU[0007] skipping packet PacketTypeMercuryEvent, len: 250 
DEBU[0007] selected format OGG_VORBIS_160 (d380f511c448dd4307f1d59a3cafc18504d50702)  uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
DEBU[0007] requested aes key for file d380f511c448dd4307f1d59a3cafc18504d50702, gid: 5cqDvP5jkRvJ78jcreuM4L 
DEBU[0009] fetched first chunk of 7, total size is 3627652 bytes  uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
DEBU[0009] fetched chunk 1/6, size: 524288               uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
DEBU[0009] fetched chunk 2/6, size: 524288               uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
DEBU[0009] fetched chunk 3/6, size: 524288               uri="spotify:track:5cqDvP5jkRvJ78jcreuM4L"
ERRO[0090] did not receive last pong from dealer, 60s passed 
ERRO[0120] did not receive last pong from dealer, 90s passed 
ERRO[0150] did not receive last pong from dealer, 120s passed 
ERRO[0180] did not receive last pong from dealer, 150s passed 
ERRO[0210] did not receive last pong from dealer, 180s passed 
ERRO[0240] did not receive last pong from dealer, 210s passed 
ERRO[0270] did not receive last pong from dealer, 240s passed 
ERRO[0300] did not receive last pong from dealer, 270s passed 
ERRO[0330] did not receive last pong from dealer, 300s passed 
ERRO[0360] did not receive last pong from dealer, 330s passed 
ERRO[0390] did not receive last pong from dealer, 360s passed 
ERRO[0420] did not receive last pong from dealer, 390s passed 
ERRO[0450] did not receive last pong from dealer, 420s passed 
ERRO[0480] did not receive last pong from dealer, 450s passed 
ERRO[0510] did not receive last pong from dealer, 480s passed 
ERRO[0540] did not receive last pong from dealer, 510s passed 

and so on...

config.yml

log_level: debug
device_name: Spotify-Smart-Home
zeroconf_enabled: true # Whether to keep the device discoverable at all times, even if authenticated via>
zeroconf_port: 0 # The port to use for Zeroconf, 0 for random
credentials:
  type: spotify_token
  spotify_token:
    username:  ####BLURRED##### # Whether to persist zeroconf user credent>
device_type: computer # Spotify device type (icon)
audio_backend: pipe # Audio backend to use (alsa, pipe, pulseaudio)
audio_buffer_time: 500000 # Audio buffer time in microseconds, ALSA only
audio_period_count: 4 # Number of periods to request, ALSA only
audio_output_pipe: /root/tmp/spotify.fifo # Path to a named pipe for audio output
audio_output_pipe_format: s16le # Audio output pipe format (s16le, s32le, f32le)
bitrate: 160 # Playback bitrate (96, 160, 320)
volume_steps: 100 # Volume steps count
initial_volume: 100 # Initial volume in steps (not applied to the mixer device)
external_volume: false # Whether volume is controlled externally 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions