badaix / snapcast

Synchronous multiroom audio player
GNU General Public License v3.0
6.08k stars 451 forks source link

Error reading message header of length 0: End of file #1056

Closed Bram-diederik closed 1 year ago

Bram-diederik commented 1 year ago

I have setup a multi room environment with mpd and snapcast with a raspberry pi that works fine. Only now i want to add some streams to the system like spotify but that is failing due to librespot death. I found a workaround my using my laptop to directly connect to snapcast. by setting up snapcast to my pulse audio

 pacmd load-module module-pipe-sink file=/tmp/snapfifo sink_name=Snapcast format=s16le rate=48000
pacmd update-sink-proplist Snapcast device.description=Snapcast

but i get an Error reading message header of length 0: End of file

2022-09-19 21-27-31.125 [Info] (Snapserver) Version 0.25.0
2022-09-19 21-27-31.125 [Info] (Snapserver) Adding source: pipe:///tmp/snapfifo?name=Snapcast
2022-09-19 21-27-31.125 [Notice] (init) Settings file: "/home/daft/.config/snapserver/server.json"
2022-09-19 21-27-31.128 [Info] (Avahi) Adding service 'Snapcast'
2022-09-19 21-27-31.130 [Info] (PcmStream) PcmStream: Snapcast, sampleFormat: 48000:16:2
2022-09-19 21-27-31.130 [Info] (PcmStream) Stream: Snapcast, metadata={
2022-09-19 21-27-31.130 [Info] (PcmStream)     "STREAM": "Snapcast"
2022-09-19 21-27-31.130 [Info] (PcmStream) }
2022-09-19 21-27-31.130 [Info] (Server) onMetaChanged (Snapcast)
2022-09-19 21-27-31.130 [Info] (PipeStream) PipeStream mode: create
2022-09-19 21-27-31.130 [Info] (Server) Stream: {"fragment":"","host":"","path":"/tmp/snapfifo","query":{"chunk_ms":"20","codec":"flac","name":"Snapcast","sampleformat":"48000:16:2"},"raw":"pipe:////tmp/snapfifo?chunk_ms=20&codec=flac&name=Snapcast&sampleformat=48000:16:2","scheme":"pipe"}
2022-09-19 21-27-31.130 [Info] (FlacEnc) Init - compression level: 2
2022-09-19 21-27-31.130 [Info] (ControlServer) Creating TCP acceptor for address: 0.0.0.0, port: 1705
2022-09-19 21-27-31.130 [Info] (ControlServer) Creating HTTP acceptor for address: 0.0.0.0, port: 1780
2022-09-19 21-27-31.130 [Info] (StreamServer) Creating stream acceptor for address: 0.0.0.0, port: 1704
2022-09-19 21-27-31.130 [Info] (Snapserver) Number of threads: 4, hw threads: 12
2022-09-19 21-27-31.650 [Info] (PcmStream) State changed: Snapcast, state: idle => playing
2022-09-19 21-27-31.650 [Info] (Server) onStateChanged (Snapcast): playing
2022-09-19 21-27-32.084 [Info] (Avahi) Service 'Snapcast' successfully established.
2022-09-19 21-27-42.028 [Notice] (StreamServer) StreamServer::NewConnection: 192.168.5.208
2022-09-19 21-27-42.030 [Info] (Server) Hello from fd40e5b1-67b2-457d-ac12-c705e3dbdfcd, host: SM-G780F, v0.26.0, ClientName: Snapclient, OS: Android 12, Arch: arm64-v8a, Protocol version: 2
2022-09-19 21-27-47.975 [Error] (StreamSessionTCP) Error reading message header of length 0: End of file
2022-09-19 21-27-47.975 [Info] (StreamServer) onDisconnect: fd40e5b1-67b2-457d-ac12-c705e3dbdfcd
2022-09-19 21-28-03.704 [Notice] (StreamServer) StreamServer::NewConnection: 192.168.5.208
2022-09-19 21-28-03.707 [Info] (Server) Hello from fd40e5b1-67b2-457d-ac12-c705e3dbdfcd, host: SM-G780F, v0.26.0, ClientName: Snapclient, OS: Android 12, Arch: arm64-v8a, Protocol version: 2
2022-09-19 21-28-07.069 [Error] (StreamSessionTCP) Error reading message header of length 0: End of file
2022-09-19 21-28-07.069 [Info] (StreamServer) onDisconnect: fd40e5b1-67b2-457d-ac12-c705e3dbdfcd
2022-09-19 21-28-23.429 [Notice] (StreamServer) StreamServer::NewConnection: 192.168.5.208
2022-09-19 21-28-23.436 [Info] (Server) Hello from fd40e5b1-67b2-457d-ac12-c705e3dbdfcd, host: SM-G780F, v0.26.0, ClientName: Snapclient, OS: Android 12, Arch: arm64-v8a, Protocol version: 2
2022-09-19 21-28-33.325 [Error] (StreamSessionTCP) Error reading message header of length 0: End of file
badaix commented 1 year ago

this means that the connection of your StreamSessionTCP has been closed. Maybe discussions is a better place for this.