Open dmartin opened 2 years ago
Ugh. That does not look great. :( I wonder if all of these are caused by the same core issue. It sounds like I'm not resetting the Zmodem state correctly at the right times.
Thank you very much for this bug report. I really appreciate your attention to detail. It was very, very helpful.
Here's a test build: https://github.com/sorenisanerd/gotty/actions/runs/2976008354
Can you take it for a spin? Thanks!
Hi @sorenisanerd, it seems like there are some improvements with that build, still seeing some issues with sz
handling though.
rz
uploads does work now!sz
-initiated download.sz
modal now seems to work the same as choosing "Decline" but encounters the same issues.Ugh. It works for me. I guess I'm looking for a race condition. Thanks for checking! I'll get back to you when I've dug deeper :)
Thanks for looking into it, but please don't stress too much on my account! This is not blocking any work for me, just something I ran into while testing out terminal-sharing tools.
Same problem
I've spent a lot of time trying to reliably reproduce this. It happens sometimes, but I've been unable to trigger it while running either gotty
, bash
, or sz
under strace
. I've tried many other ways to observe what is happening, but whenever I get close, it stops happening. What I have been able to observe is that occasionally, the terminating OO
from sz
gets swallowed SOMEWHERE, but it's a bit of a mystery where or why. The gotty process on the server simply does not see it, so it can't pass it along to the frontend.
Are you doing anything interesting with your command prompt? $PS1 trickery? PROMPT_COMMAND doing anything cool? I don't know. I'll keep digging, but even if this turns out to be a bug in lrzsz or something, we have to support existing versions of it, so I'll whip up a patch for zmodemjs to fix it.
Fwiw, we're not alone: https://github.com/tsl0922/ttyd/issues/239 https://github.com/tsl0922/ttyd/issues/279 https://github.com/Eugeny/tabby/issues/6259 https://github.com/cferdinandi/tabby/issues/132 https://github.com/Eugeny/tabby/issues/5196 https://github.com/trzsz/tabby-trzsz/issues/2 https://github.com/Eugeny/tabby/issues/5132
What version of GoTTY are you using (
gotty --version
)?1.4.0
What operating system and browser are you using?
Ubuntu 22.04, Chrome
What did you do?
If possible, please provide the command you ran.
./gotty -p 7681 -w bash
What did you expect to see?
rz
, cancel upload (close modal)rz
exits and terminal prompt advancessz <filename>
, click Acceptsz <filename>
, click Declinesz
exits and terminal prompt advancessz <filename>
, close modalsz
exits and terminal prompt advancesWhat did you see instead?
If possible, please provide the output of the command and your browser's console output.
rz
, cancel upload (close modal)rz waiting to receive.**B0100000023be50
sz <filename>
, click Accept**B00000000000000
, JavaScript console reports errors:Uncaught PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: ...
atzsession.js:563
sz <filename>
, click DeclineUncaught PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: ...
,sz: skipped: <filename>
is written to terminal but prompt is stucksz <filename>
, close modal**B00000000000000
until it eventually times out