💾 Archived View for bbs.geminispace.org › s › Lagrange-Issues › 33 captured on 2024-05-10 at 11:29:30. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-03-21)
-=-=-=-=-=-=-
Two or three bugs with streamed gemtext in Lagrange (latest dev branch).
Occasionally, the streamed page is truncated in the output, even though the connection to server stays alive. It seems to always show complete lines, but sometimes all lines after some point are not shown, even if the stream is appended to. Test case:
gemini://sggs.thegonz.net/infstreamtest
This is running the following cgi shell script:
printf "20 text/gemini\r\n" n=0 while true; do echo "$((n++))" if [ $((n%500)) -eq 0 ]; then sleep 1 fi sleep 0.01 done
Running this locally, I find Lagrange truncates the page after some random number of lines, normally around 5-40. Without the "sleep 0.01" it sometimes gets into the thousands.
The CGI script continues running, and the tls connection is still up, and I can see from tcpdump that the network traffic continues. The connection closes once the tab is closed in lagrange.
If I refresh a streaming page, Lagrange seems to consider it as a request to refresh the *previous* url. If that was itself a streaming page, another refresh will cause it to refresh the url before, and so on backwards through history. This seems unlikely to be what's wanted!
One more thing, though not so clearly a bug. If the stream is appended to
while the user isn't scrolled down to the end, the only way the user can tell
is if they pay careful attention to the scroll bar. This is a problem for
things like SGGS or mozz's chat thingy, which append to the stream as a way of
notifying the user.
🐞 Issue #33 in s/Lagrange-Issues
2023-06-11 · 11 months ago
🕹️ skyjake [mod...] · 2023-06-11 at 09:41:
I'm adding a #feature tag because there should be an officially recognized UI state where the tab is understood to be in streaming mode. The current behavior is mostly a side effect of waiting for a slow response to come in.
In the streaming mode the document updates could be done differently, perhaps even notifying the user somehow about new additions after a pause.
🚀 mbays [OP] · 2023-06-11 at 10:35:
@skyjake Hmm, I guess also if there's a lengthy pause due to network delays the user could want to know when new data comes in.
🚀 mbays [OP] · 2023-06-18 at 07:32:
This infstreamtest test seems to work fine on Android (I don't know what Lagrange version, but could find out). It remain broken with latest dev on my linux machine.
🚀 mbays [OP] · 2023-07-31 at 22:40:
Now I have seen the same truncation bug on Android (not with the test script linked above, but with something else similar which prints more on each line). The client becomes entirely unresponsive and needs to be restarted. (This may have been a fairly old version of lagrange for android, but the same bug is still observed on linux desktop with yesterday's latest git.)
Commit 6be6c24d · Workarounds for issues with streaming requests
2023-08-11 · 9 months ago
🕹️ skyjake [mod...] · 2023-08-11 at 15:28:
v1.16.7 has a workaround for Bug 1 and resolves Bug 2.
Testing with Gemski, sometimes the updated content has a partial line, with incomplete ANSI sequences of course. I should still improve this to ensure that during streaming updates only complete lines are included in the page.