Open
Description
Describe the bug
My terminal session is breaking when printing non-small amount of data into terminal. Websocket is closed with code 1006 without additional info provided. This happens only when ttyd server is configured to use https with --ssl
To Reproduce
Steps to reproduce the behavior:
- Open terminal via server provided by ttyd with https
--ssl
option + related - Run
dd if=/dev/urandom count=1000 | stdbuf -o20K base64
this should print around 700kb random data in 20kb chunks. This amount resulted in very reliable bug reproduction for me.
Expected behavior
Terminal session does not break
Environment:
- OS: Ubuntu 22.04
- Browser: Firefox 135.0.1 AND Chrome 129.0.6668.89
- ttyd 1.7.4 installed by apt on Ubuntu 24.04 (I haven't tested with newest version, but read changelog and didn't find anything that looked related)
Additional context
The ttyd server with -d 100
logs printed this during the breakage
[2025/03/06 12:09:44:5068] N: GOAWAY: last sid 0, error 0x00000001, string ''
[2025/03/06 12:09:44:5087] N: WS closed from xx.xx.xx.xx, clients: 0
When I inspected the situation in firefox "about:logging" I found these lines I think are relevant:
2025-03-06 10:23:23.180376 UTC - [Parent 5989: Socket Thread]: I/nsHttp Got frame too large 0x0043F2
2025-03-06 10:23:23.180392 UTC - [Parent 5989: Socket Thread]: I/nsHttp Http2Session::SessionError 7f126c381400 reason=0x1 mPeerGoAwayReason=0x1f
When I inspected the messages via browser console, the largest successful message I've seen was little over 12kb