[GH-ISSUE #1568] CLIENT_NAME field empty in session_client_changed event #711

Open
opened 2026-02-27 19:32:05 +03:00 by kerem · 6 comments
Owner

Originally created by @varungujjar on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1568

Description

I just compiled with the following features
cargo build --target aarch64-unknown-linux-gnu --features "native-tls alsa-backend gstreamer-backend with-avahi"
Everything works perfectly fine except I do not receive CLIENT_NAME anymore its an empty string ''
heres the output :

Version

0.7.1

How to reproduce

Compile :
cargo build --target aarch64-unknown-linux-gnu --features "native-tls alsa-backend gstreamer-backend with-avahi"

  1. Launch librespot with --bitrate 320 --format S16 --name raspberrypi --cache /tmp/spotify_cache --disable-audio-cache --backend alsa --onevent on_event_path --initial-volume 100 --device-type avr --device plughw:Loopback,0,0

  2. Connect with 'Spotify Desktop / Mobile App'

  3. CLIENT_NAME is empty string '' when receiving events from the event handler

  4. Tried compiling with different options but no luck :( maybe some one can help ?

Log

*{'CLIENT_BRAND_NAME': '', 'CLIENT_ID': 'XXXX', 'CLIENT_MODEL_NAME': '', 'CLIENT_NAME': '', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'HOME': '/home/pi', 'LADSPA_PATH': '/usr/lib/ladspa', 'LANG': 'en_GB.UTF-8', 'LC_CTYPE': 'C.UTF-8', 'LOGNAME': 'pi', 'MOTD_SHOWN': 'pam', 'OLDPWD': '/home/pi/builds/librespot', 'PATH': '/home/pi/env/bin:/home/pi/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games', 'PLAYER_EVENT': 'session_client_changed', 'PS1': '(env) ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ', 'PWD': '/home/pi/builds/librespot/target/aarch64-unknown-linux-gnu/debug', 'RUST_BACKTRACE': 'full', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '192.168.1.105 57584 22', 'SSH_CONNECTION': 'XXXX', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm-256color', 'TEXTDOMAIN': 'Linux-PAM', 'USER': 'pi', 'VIRTUAL_ENV': '/home/pi/env', 'VIRTUAL_ENV_PROMPT': '(env) ', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_ID': '2', 'XDG_SESSION_TYPE': 'tty', '_': '/home/pi/env/bin/XXXX'}}

Host (what you are running librespot on):

  • OS: 64Bit OS
  • Platform: Pi 4
Originally created by @varungujjar on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1568 ### Description I just compiled with the following features cargo build --target aarch64-unknown-linux-gnu --features "native-tls alsa-backend gstreamer-backend with-avahi" Everything works perfectly fine except I do not receive CLIENT_NAME anymore its an empty string '' heres the output : ### Version 0.7.1 ### How to reproduce Compile : cargo build --target aarch64-unknown-linux-gnu --features "native-tls alsa-backend gstreamer-backend with-avahi" 1. Launch `librespot` with --bitrate 320 --format S16 --name raspberrypi --cache /tmp/spotify_cache --disable-audio-cache --backend alsa --onevent on_event_path --initial-volume 100 --device-type avr --device plughw:Loopback,0,0 2. Connect with 'Spotify Desktop / Mobile App' 4. CLIENT_NAME is empty string '' when receiving events from the event handler 5. Tried compiling with different options but no luck :( maybe some one can help ? ### Log *{'CLIENT_BRAND_NAME': '', 'CLIENT_ID': 'XXXX', 'CLIENT_MODEL_NAME': '', 'CLIENT_NAME': '', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'HOME': '/home/pi', 'LADSPA_PATH': '/usr/lib/ladspa', 'LANG': 'en_GB.UTF-8', 'LC_CTYPE': 'C.UTF-8', 'LOGNAME': 'pi', 'MOTD_SHOWN': 'pam', 'OLDPWD': '/home/pi/builds/librespot', 'PATH': '/home/pi/env/bin:/home/pi/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games', 'PLAYER_EVENT': 'session_client_changed', 'PS1': '(env) ${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ', 'PWD': '/home/pi/builds/librespot/target/aarch64-unknown-linux-gnu/debug', 'RUST_BACKTRACE': 'full', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '192.168.1.105 57584 22', 'SSH_CONNECTION': 'XXXX', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm-256color', 'TEXTDOMAIN': 'Linux-PAM', 'USER': 'pi', 'VIRTUAL_ENV': '/home/pi/env', 'VIRTUAL_ENV_PROMPT': '(env) ', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_ID': '2', 'XDG_SESSION_TYPE': 'tty', '_': '/home/pi/env/bin/XXXX'}} ### Host (what you are running `librespot` on): - OS: 64Bit OS - Platform: Pi 4
Author
Owner

@kingosticks commented on GitHub (Sep 5, 2025):

Are you talking about the CLIENT_NAME field in the event handler? This report is really unclear.

<!-- gh-comment-id:3257601254 --> @kingosticks commented on GitHub (Sep 5, 2025): Are you talking about the CLIENT_NAME field in the event handler? This report is really unclear.
Author
Owner

@varungujjar commented on GitHub (Sep 5, 2025):

Are you talking about the CLIENT_NAME field in the event handler? This report is really unclear.

Yea, sorry my bad I just corrected it :)

<!-- gh-comment-id:3257610783 --> @varungujjar commented on GitHub (Sep 5, 2025): > Are you talking about the CLIENT_NAME field in the event handler? This report is really unclear. Yea, sorry my bad I just corrected it :)
Author
Owner

@photovoltex commented on GitHub (Sep 10, 2025):

Do you have an example of what was previously given out?

<!-- gh-comment-id:3274328510 --> @photovoltex commented on GitHub (Sep 10, 2025): Do you have an example of what was previously given out?
Author
Owner

@varungujjar commented on GitHub (Nov 7, 2025):

previously it would be 'CLIENT_NAME': 'XXX MacBook Pro' or 'XXX iphone' may be I am compiling it wrong ?

<!-- gh-comment-id:3504406162 --> @varungujjar commented on GitHub (Nov 7, 2025): previously it would be 'CLIENT_NAME': 'XXX MacBook Pro' or 'XXX iphone' may be I am compiling it wrong ?
Author
Owner

@photovoltex commented on GitHub (Nov 7, 2025):

No no, I'm pretty sure that is something that was accidentally dropped during the refactor on the connect front. Could you explain what the redacted part was? If we know what to emit, we can probably fix it pretty easily.

<!-- gh-comment-id:3505265309 --> @photovoltex commented on GitHub (Nov 7, 2025): No no, I'm pretty sure that is something that was accidentally dropped during the refactor on the connect front. Could you explain what the redacted part was? If we know what to emit, we can probably fix it pretty easily.
Author
Owner

@varungujjar commented on GitHub (Nov 7, 2025):

I am not quite sure about the redacted part, but with the librespot 0.6 i get the following information which seems to be missing when i use 0.7+

{'CLIENT_BRAND_NAME': 'apple', 'CLIENT_ID': '65b708073fc0480ea92a077233ca87bd', 'CLIENT_MODEL_NAME': 'MacBookPro14,2', 'CLIENT_NAME': 'Varun’s MacBook Pro', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'HOME': '/home/pi', 'LADSPA_PATH': '/usr/lib/ladspa', 'LANG': 'en_GB.UTF-8', 'LC_CTYPE': 'C.UTF-8', 'LOGNAME': 'pi', 'MOTD_SHOWN': 'pam', 'OLDPWD': '/home/pi/builds/librespot', 'PATH': '/home/pi/env/bin:/home/pi/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games', 'PLAYER_EVENT': 'session_client_changed', 'PS1': '(env) ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ', 'PWD': '/home/pi/builds/librespot/target/aarch64-unknown-linux-gnu/debug', 'RUST_BACKTRACE': 'full', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '192.168.X.XXX XXXXX XX', 'SSH_CONNECTION': 'XXXX', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm-256color', 'TEXTDOMAIN': 'Linux-PAM', 'USER': 'pi', 'VIRTUAL_ENV': '/home/pi/env', 'VIRTUAL_ENV_PROMPT': '(env) ', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_ID': '2', 'XDG_SESSION_TYPE': 'tty', '_': '/home/pi/env/bin/XXXX'}}

<!-- gh-comment-id:3505343983 --> @varungujjar commented on GitHub (Nov 7, 2025): I am not quite sure about the redacted part, but with the librespot 0.6 i get the following information which seems to be missing when i use 0.7+ `{'CLIENT_BRAND_NAME': 'apple', 'CLIENT_ID': '65b708073fc0480ea92a077233ca87bd', 'CLIENT_MODEL_NAME': 'MacBookPro14,2', 'CLIENT_NAME': 'Varun’s MacBook Pro', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'HOME': '/home/pi', 'LADSPA_PATH': '/usr/lib/ladspa', 'LANG': 'en_GB.UTF-8', 'LC_CTYPE': 'C.UTF-8', 'LOGNAME': 'pi', 'MOTD_SHOWN': 'pam', 'OLDPWD': '/home/pi/builds/librespot', 'PATH': '/home/pi/env/bin:/home/pi/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games', 'PLAYER_EVENT': 'session_client_changed', 'PS1': '(env) ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ', 'PWD': '/home/pi/builds/librespot/target/aarch64-unknown-linux-gnu/debug', 'RUST_BACKTRACE': 'full', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '192.168.X.XXX XXXXX XX', 'SSH_CONNECTION': 'XXXX', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm-256color', 'TEXTDOMAIN': 'Linux-PAM', 'USER': 'pi', 'VIRTUAL_ENV': '/home/pi/env', 'VIRTUAL_ENV_PROMPT': '(env) ', 'XDG_RUNTIME_DIR': '/run/user/1000', 'XDG_SESSION_CLASS': 'user', 'XDG_SESSION_ID': '2', 'XDG_SESSION_TYPE': 'tty', '_': '/home/pi/env/bin/XXXX'}}`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#711
No description provided.