Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clip errors on pi5 #888

Open
crissmil opened this issue May 3, 2024 · 1 comment
Open

clip errors on pi5 #888

crissmil opened this issue May 3, 2024 · 1 comment

Comments

@crissmil
Copy link
Contributor

crissmil commented May 3, 2024

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. (/home/cristi/TTS server/node_modules/node-static/lib/node-static.js:375:17)
at ReadStream.emit (node:events:518:28)
at ReadStream.emit (node:domain:488:12)
at emitCloseNT (node:internal/streams/destroy:147:10)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 'ERR_HTTP_HEADERS_SENT'
}

Node.js v20.12.2

@jishi
Copy link
Owner

jishi commented May 6, 2024

Sounds related to this: cloudhead/node-static#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants