Spotifyd / spotifyd

A spotify daemon
https://spotifyd.rs
GNU General Public License v3.0
9.89k stars 452 forks source link

Spotifyd works when run from terminal, but doesn't work as a systemd service #1230

Closed KSaiAkshit closed 1 year ago

KSaiAkshit commented 1 year ago

Description

I cannot find spotifyd in my spotify Connect(neither in spotify-tui or in my phone, which is on the same Wi-Fi) when it is run as a systemd service and the only way it shows up is when i run it from the terminal using spotifyd --config-file /home/user/.config/spotifyd/spotifyd.conf --no-daemon. I have the same line in my .service file. To Reproduce

Expected behavior

Spotifyd shows up on Spotify Connect as a device.

Logs

Click to show logs ``` ● spotifyd.service - A spotify playing daemon Loaded: loaded (/etc/systemd/system/spotifyd.service; enabled; preset: disabled) Active: active (running) since Mon 2023-10-16 15:51:53 IST; 4s ago Docs: https://github.com/Spotifyd/spotifyd Main PID: 51539 (spotifyd) Tasks: 17 (limit: 18340) Memory: 2.2M CPU: 7ms CGroup: /system.slice/spotifyd.service └─51539 /usr/bin/spotifyd --config-path ~/.config/spotifyd/spotifyd.conf --no-daemon --verbose Oct 16 15:51:53 akshit-eos spotifyd[51539]: no usable credentials found, enabling discovery Oct 16 15:51:53 akshit-eos spotifyd[51539]: Using device id '9b9361752c9462822fe97fc7ff7752af67c35f4a' Oct 16 15:51:53 akshit-eos spotifyd[51539]: registering event source with poller: token=Token(0), interests=READABLE | WRITABLE Oct 16 15:51:53 akshit-eos spotifyd[51539]: Zeroconf server listening on 0.0.0.0:38935 Oct 16 15:51:53 akshit-eos spotifyd[51539]: registering event source with poller: token=Token(1), interests=READABLE | WRITABLE Oct 16 15:51:53 akshit-eos spotifyd[51539]: registering event source with poller: token=Token(2), interests=READABLE | WRITABLE Oct 16 15:51:53 akshit-eos spotifyd[51539]: found interface Interface { name: "wlan0", addr: V4(Ifv4Addr { ip: 10.30.6.47, netmask: 255.255.0.0, broadcast: Some(10.30.255.255) }) } Oct 16 15:51:53 akshit-eos spotifyd[51539]: sending packet to 224.0.0.251:5353 Oct 16 15:51:53 akshit-eos spotifyd[51539]: found interface Interface { name: "wlan0", addr: V4(Ifv4Addr { ip: 10.30.6.47, netmask: 255.255.0.0, broadcast: Some(10.30.255.255) }) } Oct 16 15:51:53 akshit-eos spotifyd[51539]: sending packet to [ff02::fb]:5353 ``` ---- From terminal ``` ❯ spotifyd --config-path ~/.config/spotifyd/spotifyd.conf --no-daemon --verbose Loading config from "/home/akshit/.config/spotifyd/spotifyd.conf" CliConfig { config_path: Some("/home/akshit/.config/spotifyd/spotifyd.conf"), no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), username_cmd: None, password: Some("ta ken out for privacy"), password_cmd: None, use_keyring: true, use_mpris: Some(true), dbus_type: Some(Session), on_song_change_hook: Some("command_to_run_on_playback_events"), cache_path: Some("cache_directory"), no-audio-cache: true, ba ckend: Some(Alsa), volume_controller: Some(Alsa), device: Some("pipewire"), control: Some("alsa_audio_device"), mixer: Some("PCM"), device_name: Some("eos_spotify"), bitrate: Some(Bitrate160), audio_format: Some(S16), initial_volume: So me("90"), volume_normalisation: true, normalisation_pregain: Some(-10.0), zeroconf_port: Some(1234), proxy: None, device_type: Some(Speaker), autoplay: true, max_cache_size: Some(1000000000) } } Found user shell: Some("/usr/local/bin/zsh") No proxy specified registering event source with poller: token=Token(2147483649), interests=READABLE Using alsa volume controller. Keyring is ignored, since you already configured a password registering event source with poller: token=Token(0), interests=READABLE | WRITABLE signal: Want signal found waiting giver, notifying poll_want: taker wants! signal: Want signal: Want poll_want: taker wants! deregistering event source from poller Ignoring blacklisted access point ap-gue1.spotify.com:443 Connecting to AP "ap-gae2.spotify.com:443" signal: Closed registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE Authenticated as "ksaiakshit" ! new Session[0] Normalisation Type: Auto Normalisation Pregain: -10.0 dB Normalisation Threshold: -2.0 dBFS Normalisation Method: Dynamic Session[0] strong=3 weak=1 Normalisation Attack: 5 ms Normalisation Release: 100 ms Normalisation Knee: 5 dB Country: "IN" new Spirc[0] canonical_username: ksaiakshit new MercuryManager new Player[0] Converting with ditherer: tpdf Using AlsaSink with format: S16 command=AddEventSender ALSA lib control.c:1570:(snd_ctl_open_noupdate) Invalid CTL alsa_audio_device Couldn't set volume: Error("snd_mixer_attach", ENOENT) command=VolumeSet(58981) Running "command_to_run_on_playback_events" using "/usr/local/bin/zsh" with environment variables {"PLAYER_EVENT": "volumeset", "VOLUME": "58981"} registering event source with poller: token=Token(1), interests=READABLE | WRITABLE registering event source with poller: token=Token(2), interests=READABLE | WRITABLE registering event source with poller: token=Token(3), interests=READABLE | WRITABLE deregistering event source from poller deregistering event source from poller deregistering event source from poller Failed to execute "command_to_run_on_playback_events" using "/usr/local/bin/zsh". Error: zsh:1: command not found: command_to_run_on_playback_events registering event source with poller: token=Token(16777219), interests=READABLE subscribed uri=hm://remote/user/ksaiakshit/ count=0 kMessageTypeLoad "" webapi-4cce58d263984150a5955ff25219d81a 939699477 1697451772850 kPlayStatusPlay State: index: 0 position_ms: 421 status: kPlayStatusPlay position_measured_at: 1697451780635 context_description: "" shuffle: false repeat: true playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: "\211\245oK\210kJ\004 Frame has 41 tracks Fetching autoplay context uri Sending status to server: [kPlayStatusPlay] command=SetAutoNormaliseAsAlbum(false) command=Load(SpotifyId { id: 182963221735989580991480002660140810720, audio_type: Track }, true, 421) Sending status to server: [kPlayStatusPlay] Running "command_to_run_on_playback_events" using "/usr/local/bin/zsh" with environment variables {"TRACK_ID": "4bJygwUKrRgq1stlNXcgMg", "POSITION_MS": "421", "PLAYER_EVENT": "start", "PLAY_REQUEST_ID": "0"} registering event source with poller: token=Token(16777218), interests=READABLE | WRITABLE registering event source with poller: token=Token(16777217), interests=READABLE | WRITABLE registering event source with poller: token=Token(4), interests=READABLE | WRITABLE deregistering event source from poller deregistering event source from poller deregistering event source from poller Failed to execute "command_to_run_on_playback_events" using "/usr/local/bin/zsh". Error: zsh:1: command not found: command_to_run_on_playback_events Running "command_to_run_on_playback_events" using "/usr/local/bin/zsh" with environment variables {"TRACK_ID": "4bJygwUKrRgq1stlNXcgMg", "PLAY_REQUEST_ID": "0", "POSITION_MS": "421", "PLAYER_EVENT": "load"} registering event source with poller: token=Token(16777220), interests=READABLE | WRITABLE registering event source with poller: token=Token(33554433), interests=READABLE | WRITABLE registering event source with poller: token=Token(33554434), interests=READABLE | WRITABLE deregistering event source from poller deregistering event source from poller deregistering event source from poller Failed to execute "command_to_run_on_playback_events" using "/usr/local/bin/zsh". Error: zsh:1: command not found: command_to_run_on_playback_events error 400 for uri hm://autoplay-enabled/query?uri= AutoplayError: MercuryError Loading with Spotify URI Downloading file 10d0e3fcca4f7020858a0401e06781961f4b48b7 new ChannelManager new AudioKeyManager (214440 ms) loaded Normalisation Data: NormalisationData { track_gain_db: -8.471924781799316, track_peak: 1.1197787523269653, album_gain_db: -8.971169471740723, album_peak: 1.1519784927368164 } Calculated Normalisation Factor for Track: 11.92% == Starting sink == Desired Frames per Buffer: 22050 Desired Frames per Period: 5512 Actual Frames per Buffer: 22050 Actual Frames per Period: 5512 Period Buffer size in bytes: 22048 Period Buffer capacity: 22048 Running "command_to_run_on_playback_events" using "/usr/local/bin/zsh" with environment variables {"TRACK_ID": "4bJygwUKrRgq1stlNXcgMg", "POSITION_MS": "420", "PLAYER_EVENT": "play", "DURATION_MS": "214440", "PLAY_REQUEST_ID": "0"} registering event source with poller: token=Token(50331650), interests=READABLE | WRITABLE registering event source with poller: token=Token(50331649), interests=READABLE | WRITABLE registering event source with poller: token=Token(33554436), interests=READABLE | WRITABLE Making request Request(GET https://api.spotify.com/v1/tracks/4bJygwUKrRgq1stlNXcgMg, [authorization: Bearer BQCLcfi6tH8izw-F28WuEn-RLrJQu-ObrHZVOVkIEdpW6RKcw0ceDcjJe7L8wOezuB_Xts5csNLyF8giNwricUxA9njQ4vUn0TS3maqO2BCL8MC0U-u8zbb5CT3uzEI4 connecting to api.spotify.com:443 at 35.186.224.25:443 No cached session for DnsName(DnsName(DnsName("api.spotify.com"))) Not resuming any session Sending ClientHello Message { version: TLSv1_0, payload: Handshake { parsed: HandshakeMessagePayload { typ: ClientHello, payload: ClientHello( ClientHelloPayload { client_version: TLSv1_2, random: 6741a027cff2c0399d0eeff768942685ba8e0896c530783c64eee932e7529b9e, session_id: 36fe0cb310e33a64d1e3414c08a7a445c7b34be2cf2305821bd3595ab2af338c, cipher_suites: [ TLS13_AES_256_GCM_SHA384, TLS13_AES_128_GCM_SHA256, TLS13_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, ], compression_methods: [ Null, ], extensions: [ SupportedVersions( [ TLSv1_3, TLSv1_2, ], ), ECPointFormats( [ Uncompressed, ], ), NamedGroups( [ X25519, secp256r1, secp384r1, ], ), SignatureAlgorithms( [ ECDSA_NISTP384_SHA384, ECDSA_NISTP256_SHA256, ED25519, RSA_PSS_SHA512, RSA_PSS_SHA384, RSA_PSS_SHA256, RSA_PKCS1_SHA512, RSA_PKCS1_SHA384, RSA_PKCS1_SHA256, ], ), ExtendedMasterSecretRequest, CertificateStatusRequest( OCSP( OCSPCertificateStatusRequest { responder_ids: [], extensions: , }, ), ), ServerName( [ ServerName { typ: HostName, payload: HostName( ( 6170692e73706f746966792e636f6d, DnsName( "api.spotify.com", ), ), ), }, ], ), SignedCertificateTimestampRequest, KeyShare( [ KeyShareEntry { group: X25519, payload: 0154bace6f4820712adb0cde029e864a2faa3b7374d3c84e35be38a257a24b5d, }, ], ), PresharedKeyModes( [ PSK_DHE_KE, ], ), SessionTicket( Request, ), ], }, ), }, encoded: 010000ed03036741a027cff2c0399d0eeff768942685ba8e0896c530783c64eee932e7529b9e2036fe0cb310e33a64d1e3414c08a7a445c7b34be2cf2305821bd3595ab2af338c0014130213011303c02cc02bcca9c030c02fcca800ff01000090002b00050403040303000b000 }, } We got ServerHello ServerHelloPayload { legacy_version: TLSv1_2, random: f7d385dace48ddc6de51efdb68d53cac3595420400186984e79d44fd8476d83c, session_id: 36fe0cb310e33a64d1e3414c08a7a445c7b34be2cf2305821bd3595ab2af338c, cipher_suite: TLS13_AES_256_GCM_SHA384, compression_method: Null, extensions: [ KeyShare( KeyShareEntry { group: X25519, payload: ff4238c5342202d48a09138102f92cc04f511acf2483f7a413f7cfa34278d610, }, ), SupportedVersions( TLSv1_3, ), ], } Using ciphersuite TLS13_AES_256_GCM_SHA384 Not resuming EarlyData rejected Dropping CCS TLS1.3 encrypted extensions: [] ALPN protocol is None Server cert is [Certificate(b"0\x82\x06\xa50\x82\x05\x8d\xa0\x03\x02\x01\x02\x02\x10\x07\xc9\xc2\xcd\x12\x01\xd6\x1c\x1f\x96+\x13\xb4\xe2\x1f\xb90\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\00O1\x0b0\t\x06\x03U\x04\x06\x13\x02US1\x150\x13\x06\x03U\x04\n\x13\x0cDigiCert Inc1)0'\x06\x03U\x04\x03\x13 DigiCert TLS RSA SHA256 2020 CA10\x1e\x17\r230307000000Z\x17\r240306235959Z0N1\x0b0\t\x06\x03U\x04\x06\x13\x02SE1\x120\x10\x06\x03U\x04\x07\x13\tStockholm1\x130\x11\x06\x03U\x04\n\x13\nSpotify AB1\x160\x14\x06\x03U\x04\x03\x0c\r*.spotify.com0\x82\x01\"0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\0\x03\x82\x01\x0f\00\x82\x01\n\x02\x82\x01\x01\0\xcf\xdd\x01\x86\x7f\xd3\x18\xb20\xd7\xcaQ\xe9X%;o\x18m6\xe9\x84\r\xff\xdfc2\xb8C\x8f\xf3\xb7\xbc\xa2\xa6ma\xb3\xca\x9f\x15Z6\xb7\xd8Ny\xf5\x982\x07\xd4\x06\xbe\xc5\xb8C\xb5\xf6-&\x8cR\xb2\x1a\xb1;u7\x9d\x8d\xe76\x86\xbc\xbdE)\x99\xca\x9b\xe2\xb7\x88)\xa1\xb8c\xd9nr\\\xbd\xbbj\x07\x80\x99\xcbI\x92\xcd\x8eZy>\xd3](\xcd%\xbc\xbe\xfb\x1b\xa4\x17J%#\x1aZ\x17\r\x06S\x98\xdf\xfcg\x03\xbe\xcaP\xb9D\xf4G}v\xc2\x95\x19\"3g\x84\xa4\xa3M\xe6\xd1\x1c\xf5L\x8b\xc1\x9c\xe0~X7\x173\xc9$\xa9E\xc1\x92\x0b\x19\x04\xd7~\x86\xaah\xf4\x8a\x7f\xa7\xa1V@\xc2]\xf7CU\xb9\x13\xd9\xde\xda\xd3\xa2\xb1\x92G\xe24t\xbeX\xe9\xb9\xe5-\x8eyG\xd0|1\rx\xed\xd50\xfd\x95x\x9c\x14\xae\x04\xa6p\x11s\xb3Q\x1a\xb7\xd4\x14\xab\\9\x96\x81\xce<\xd1|\xe4\x1f;\xdeO\xee\xe3\xe6B\xd7\x02\x03\x01\0\x01\xa3\x82\x03|0\x82\x03x0\x1f\x06\x03U\x1d#\x04\x180\x16\x80\x14\xb7k\xa2\xea\xa8\xaa\x84\x8cy\xea\xb4\xda\x0f\x98\xb2\xc5\x95v\xb9\xf40\x1d\x06\x03U\x1d\x0e\x04\x16\x04\x14:\xf6/\x7f\xecO\xb1!\x99~\x89\xc0\x0f\xb2%&%e\xdeF0%\x06\x03U\x1d\x11\x04\x1e0\x1c\x82\r*.spotify.com\x82\x0bspotify.com0\x0e\x06\x03U\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x05\xa00\x1d\x06\x03U\x1d%\x04\x160\x14\x06\x08+\x06\x01\x05\x05\x07\x03\x01\x06\x08+\x06\x01\x05\x05\x07\x03\x020\x81\x8f\x06\x03U\x1d\x1f\x04\x81\x870\x81\x840@\xa0>\xa0<\x86:http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl0@\xa0>\xa0<\x86:http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1-4.crl0>\x06\x03U\x1d \x0470503\x06\x06g\x81\x0c\x01\x02\x020)0'\x06\x08+\x06\x01\x05\x05\x07\x02\x01\x16\x1bhttp://www.digicert.com/CPS0\x7f\x06\x08+\x06\x01\x05\x05\x07\x01\x01\x04s0q0$\x06\x08+\x06\x01\x05\x05\x070\x01\x86\x18http://ocsp.digicert.com0I\x06\x08+\x06\x01\x05\x05\x070\x02\x86=http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1-1.crt0\t\x06\x03U\x1d\x13\x04\x020\00\x82\x01\x80\x06\n+\x06\x01\x04\x01\xd6y\x02\x04\x02\x04\x82\x01p\x04\x82\x01l\x01j\0w\0v\xff\x88?\n\xb6\xfb\x95Q\xc2a\xcc\xf5\x87\xba4\xb4\xa4\xcd\xbb)\xdchB\n\x9f\xe6gLZ:t\0\0\x01\x86\xba\xde\xd5\x07\0\0\x04\x03\0H0F\x02!\0\xbbt\x9fy\xb4?\xaf0`\xb2L\x17\xdbY\xa3\xc3\xdf\nnf`oR\xe2\xc4\xfe\xee\xc4.\x1f\x08E\x02!\0\xe4\xa9f\xde\xf7I\x86\x1e}`A\xb4\x80\xbb\xa8\xab\xf9\xa0Z#\xe6\x1c\xc8W\x15\xdc\xf6\xb8m\xbd\xca\xdf\0w\0s\xd9\x9e\x89\x1bL\x96x\xa0 }G\x9d\xe6\xb2\xc6\x1c\xd0Q^q\x19*\x8ck\x80\x10z\xc1wr\xb5\0\0\x01\x86\xba\xde\xd5%\0\0\x04\x03\0H0F\x02!\0\x85\xfe\xc6Z\xe0\xe3\xd9\xf5\xf1\xb6}\x87<\xf1^\xf0\xfe\xac\xdc~\x1d\xc4\xc7\xbb\r\xe3\x08\xdb+\xed\x85p\x02!\0\xd7\x0b#=+\x80\x0f\x8f\xf3\0u\xbdB\xf68/\xa3\xde\x0caG\xb5(\x89\xf3\x92\xe7\xdc\x8d.\xdf\xc3\0v\0H\xb0\xe3k\xda\xa6G4\x0f\xe5j\x02\xfa\x9d0\xeb\x1cR\x01\xcbV\xdd,\x81\xd9\xbb\xbf\xab9\xd8\x84s\0\0\x01\x86\xba\xde\xd4\xf2\0\0\x04\x03\0G0E\x02 e\xaei\xbb\xb6\xe6\xe7X\xd5\x8f\xc5I\n\\\x03\x87\xd0\xdcg\xcfy&\xe5\xd7\xf1\xef\xe2\xaaua\xf1t\x02!\0\xae\xb4\xa5\x9c\xa1\x12\xd1\xcb\x92\xb5\xb0;{)+3\xd4\xdfo\x8b9\x02\x7f\xb4\x83\xf4\x96\x9b\xf91:\xc1O\x8b\xb6\xddb\x927\xb6\xcf\xdd\xa3\xf2\xc17\xf9=\x0c7\x1d\x9e1\xde\xe6')\x05\xb4\x13\xe3\xb9A\x15tW\xfe\xfe\xd5\x92\x01Q\x126e\x15\xa7\x80\x1eU\xf4e\xdf)\xceG^\xa8\x1d\xe9\xea2\xb7g\xbe%\x83X\xe61\x90\xd8\xdc\x82\xf1\xe4\xf9T\xda\x1d\xe7\xa4\xcd\xe6M}\xa6\xb0\xc4\xe3\xee\xd1\xd6\xa7\xfa\x10_\xf0\xefU\xd2J\n\xe6ZOGp\xb8r4\xa2Ia\xbb\x90@\xe3\xb3\xde\xc0\xb4\x19\x05o%O]\xd2\x06\r\x93\x1d:\xaev\x12S\xb6\xe1te\xdf\xdc\xbb\0\x90\xb5"), Certificate(b"0\x82\x04\xbe0\x82\x03\xa6\xa0\x03\x02\x01\x02\x02\x10\x06\xd8\xd9\x04\xd5XCF\xf6\x8a/\xa7T\"~\xc40\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\00a1\x0b0\t\x06\x03U\x04\x06\x13\x02US1\x150\x13\x06\x03U\x04\n\x13\x0cDigiCert Inc1\x190\x17\x06\x03U\x04\x0b\x13\x10www.digicert.com1 0\x1e\x06\x03U\x04\x03\x13\x17DigiCert Global Root CA0\x1e\x17\r210414000000Z\x17\r310413235959Z0O1\x0b0\t\x06\x03U\x04\x06\x13\x02US1\x150\x13\x06\x03U\x04\n\x13\x0cDigiCert Inc1)0'\x06\x03U\x04\x03\x13 DigiCert TLS RSA SHA256 2020 CA10\x82\x01\"0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\0\x03\x82\x01\x0f\00\x82\x01\n\x02\x82\x01\x01\0\xc1K\xb3eGp\xbc\xddOX\xdb\xec\x9c\xed\xc3f\xe5\x1f1\x13T\xadJfF\x1f,\n\xecd\x07\xe5.\xdc\xdc\xb9\n \xed\xdf\xe3\xc4\xd0\x9e\x9a\xa9z\x1d\x82\x88\xe5\x11V\xdb\x1e\x9fX\xc2Q\xe7,4\r.\xd2\x92\xe1V\xcb\xf1y_\xb3\xbb\x87\xca%\x03{\x9aRAf\x10`OW\x13I\xf0\xe87g\x83\xdf\xe7\xd3KgL\"Q\xa6\xdf\x0e\x99\x10\xedWQt&\xe2}\xc7\xcab.\x13\x1b\x7f#\x88%So\xc14X\0\x8b\x84\xff\xf8\xbe\xa7XI\"{\x96\xad\xa2\x88\x9b\x15\xbc\xa0|\xdf\xe9Q\xa8\xd5\xb0\xed7\xe26\xb4\x82Kb\xb5I\x9a\xec\xc7g\xd6\xe3>\xf5\xe3\xd6\x12^D\xf1\xbfqB}X\x84\x03\x80\xb1\x81\x01\xfa\xf9\xca2\xbb\xb4\x8e'\x87'\xc5+t\xd4\xa8\xd6\x97\xde\xc3d\xf9\xca\xceS\xa2V\xbcx\x17\x8eI\x03)\xae\xfbIO\xa4\x15\xb9\xce\xf2\\\x19Wmky\xa7+\xa2' \x13\xb5\xd0=@\xd3!0\x07\x93\xea\x99\xf5\x02\x03\x01\0\x01\xa3\x82\x01\x820\x82\x01~0\x12\x06\x03U\x1d\x13\x01\x01\xff\x04\x080\x06\x01\x01\xff\x02\x01\00\x1d\x06\x03U\x1d\x0e\x04\x16\x04\x14\xb7k\xa2\xea\xa8\xaa\x84\x8cy\xea\xb4\xda\x0f\x98\xb2\xc5\x95v\xb9\xf40\x1f\x06\x03U\x1d#\x04\x180\x16\x80\x14\x03\xdeP5V\xd1L\xbbf\xf0\xa3\xe2\x1b\x1b\xc3\x97\xb2=\xd1U0\x0e\x06\x03U\x1d\x0f\x01\x01\xff\x04\x04\x03\x02\x01\x860\x1d\x06\x03U\x1d%\x04\x160\x14\x06\x08+\x06\x01\x05\x05\x07\x03\x01\x06\x08+\x06\x01\x05\x05\x07\x03\x020v\x06\x08+\x06\x01\x05\x05\x07\x01\x01\x04j0h0$\x06\x08+\x06\x01\x05\x05\x070\x01\x86\x18http://ocsp.digicert.com0@\x06\x08+\x06\x01\x05\x05\x070\x02\x864http://cacerts.digicert.com/DigiCertGlobalRootCA.crt0B\x06\x03U\x1d\x1f\x04;0907\xa05\xa03\x861http://crl3.digicert.com/DigiCertGlobalRootCA.crl0=\x06\x03U\x1d \x046040\x0b\x06\t`\x86H\x01\x86\xfdl\x02\x010\x07\x06\x05g\x81\x0c\x01\x010\x08\x06\x06g\x81\x0c\x01\x02\x010\x08\x06\x06g\x81\x0c\x01\x02\x020\x08\x06\x06g\x81\x0c\x01\x02\x030\r\x06\t*\x86H\x86\xf7\r\x01\x01\x0b\x05\0\x03\x82\x01\x01\0\x802\xce^\x0b\xddnZ\r\n\xaf\xe1\xd6\x84\xcb\xc0\x8e\xfa\x85p\xed\xda]\xb3\x0c\xf7+u@\xfe\x85\n\xfa\xf31x\xb7pK\x1a\x89X\xba\x80\xbd\xf3k\x1d\xe9~\xcf\x0b\xbaX\x9cY\xd4\x90\xd3\xfdl\xfd\xd0\x98m\xb7q\x82[\xcfm\x0bZ\t\xd0{\xde\xc4C\xd8*\xa4\xde\x9eA&_\xbb\x8f\x99\xcb\xdd\xae\xe1\xa8o\x9f\x87\xfet\xb7\x1f\x1b \xab\xb1O\xc6\xf5g]]\x9b<\xe9\xffi\xf7al\xd6\xd9\xf3\xfd6\xc6\xab\x03\x88v\xd2K.u\x86\xe3\xfc\xd8U}&\xc2\x11w\xdf>\x02\xb6|\xf3\xab{z\x866o\xb8\xf7\xd8\x93q\xcf\x86\xdfs0\xfa{\xab\xed*Y\xc8B\x84;\x11\x17\x1aR\xf3\xc9\x0e\x14}\xa2[rg\xbaq\xedWGf\xc5\xb8\x02Je4^\x8b\xd0*< \x9cQ\x99L\xe7R\x9e\xf7k\x11+\r\x92~\x1d\xe8\x8a\xeb6\x16C\x87\xea*c\xbfu?\xeb\xde\xc4\x03\xbb\n<\xf70\xef\xeb\xafL\xfc\x8b6\x10s>\xf3\xa4")] created stream: Stream(RustlsStream) sending request GET https://api.spotify.com/v1/tracks/4bJygwUKrRgq1stlNXcgMg writing prelude: GET /v1/tracks/4bJygwUKrRgq1stlNXcgMg HTTP/1.1 Host: api.spotify.com User-Agent: ureq/2.6.2 Accept: */* authorization: *** Ticket saved Ticket saved Streaming body until content-length: 4503 response 200 to GET https://api.spotify.com/v1/tracks/4bJygwUKrRgq1stlNXcgMg dropping stream: Stream(RustlsStream) deregistering event source from poller deregistering event source from poller deregistering event source from poller Failed to execute "command_to_run_on_playback_events" using "/usr/local/bin/zsh". Error: zsh:1: command not found: command_to_run_on_playback_events Sending status to server: [kPlayStatusPlay] ==> kPlayStatusPlay ```

Versions (please complete the following information):

My spotifyd.conf:

[global]
username = "-"
password = "-"
use_keyring = true
use_mpris = true
dbus_type = "session"
backend = "alsa" # use portaudio for macOS [homebrew]
device = "pipewire"  # omit for macOS

audio_format = "S16"
control = "alsa_audio_device"  # omit for macOS

mixer = "PCM"  # omit for macOS
volume_controller = "alsa"  # use softvol for macOS
on_song_change_hook = "command_to_run_on_playback_events"
device_name = "eos_spotify"

bitrate = 160

cache_path = "cache_directory"

max_cache_size = 1000000000

no_audio_cache = true

initial_volume = "90"
volume_normalisation = true
normalisation_pregain = -10

autoplay = true
zeroconf_port = 1234
# proxy = "http://proxy.example.org:8080"
device_type = "speaker"

This is my spotifyd.service file, stored at /etc/systemd/system/spotifyd.service:

[Unit]
Description=A spotify playing daemon
Documentation=https://github.com/Spotifyd/spotifyd
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/spotifyd --config-path ~/.config/spotifyd/spotifyd.conf --no-daemon --verbose
Restart=always
RestartSec=12

[Install]
WantedBy=default.target
eladyn commented 1 year ago

Okay, I think there might be several things wrong here, but we'll start small. You can check by doing journalctl -u spotifyd.service -e, but my guess is that spotifyd can't find the --config-file, since systemd doesn't expand the ~ properly. You'll have to write that out.

(Currently the session you run from your terminal uses your credentials while the other enables discovery. It's a different question, why you can't see that from your phone, but that might a firewall problem or other network issue.)

If it recognizes the config file, the next problem might be that you are starting spotifyd as a system service so it won't be able to find a session d-bus to connect to for keyring and MPRIS functionality, but that are just wild guesses and predictions.

So I hope this gets you a bit futher.

KSaiAkshit commented 1 year ago

The ~ expansion seemed to be the problem, thanks for the input!