node-sonos-http-api
node-sonos-http-api copied to clipboard
clip errors on pi5
Hi @jishi! thanks again for your api which I'm using from so many years. I have a strange issue with my new pi5 Debian GNU/Linux Bookworm (12) installation. clip and clippreset are stopping the server as per below. however say and saypreset are still working as expected. Any hints on this?
node:_http_server:345 throw new ERR_HTTP_HEADERS_SENT('write'); ^
Error [ERR_HTTP_HEADERS_SENT]: Cannot write headers after they are sent to the client
at ServerResponse.writeHead (node:_http_server:345:11)
at Server.finish (/home/cristi/TTS server/node_modules/node-static/lib/node-static.js:125:17)
at finish (/home/cristi/TTS server/node_modules/node-static/lib/node-static.js:170:14)
at /home/cristi/TTS server/node_modules/node-static/lib/node-static.js:337:13
at streamFile (/home/cristi/TTS server/node_modules/node-static/lib/node-static.js:382:13)
at ReadStream.
Node.js v20.12.2
Sounds related to this: https://github.com/cloudhead/node-static/issues/241
Seems like the consumer you are using is issuing a ranged request and the node-static library doesn't deal with this properly, and seems like there is no viable fix (also, node-static seems a bit abandoned).
node-static is only used for serving clips and tts files (and also the documentation) so any static implementation (or just implement it yourself) should do. I don't really have time to do it right now though, but I would accept a decent PR for it.