code-server icon indicating copy to clipboard operation
code-server copied to clipboard

restored terminal from browser reload may append 2R0;276;0c some times

Open futurist opened this issue 3 years ago • 13 comments

OS/Web Information

  • Web Browser: Chrome
  • Local OS: MacOS 10.15
  • Remote OS: Debian9
  • Remote Architecture: x64
  • code-server --version: 3.10.2

Steps to Reproduce

  1. Open Terminal
  2. Run some random commands
  3. Reload Tab, wait for terminal restore
  4. The restored terminal may append 2R0;276;0c some times.

Expected

Terminal should keep as is when restored after a reload

Actual

Sometimes there's some chars appeared in terminal.

Screenshot

image

Notes

This issue can be reproduced in VS Code:No

futurist avatar Jun 23 '21 07:06 futurist

Also observed that the chars will be appended continually in many terminals(even it's not in front focus) for every time tab refreshing, as below image:

image

Above image is a hidden terminal not in front, after switched into it, found above image.

futurist avatar Jun 23 '21 09:06 futurist

When using dash as shell, the extra chars will be below:

image

futurist avatar Jun 24 '21 03:06 futurist

Bump, I've noticed this (within the Coder product)

greyscaled avatar Jun 24 '21 03:06 greyscaled

Have you solved it? I have a similar problem in the form of characters [%]

xiaoice avatar Oct 09 '21 07:10 xiaoice

Just facing the same issue with code-server version 3.10.2, envirionment infomation on my side list below:

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Windows 10
  • Remote OS: SUSE Linux Enterprise Server 12 SP5(Docker container)
  • Remote Architecture: x64
  • code-server --version: 3.10.2

Steps to Reproduce

  1. Open Terminal(tried bash, zsh)
  2. Run any commands with output
  3. Leave it alone for a while(about 10 minutes)
  4. Reload window, wait for terminal restore
  5. The restored terminal may append 2R0;276;0c some times.

This issue also happends on other code-server instances with different shell configs and environment variables, so I don't think it's a env specified issue.

icy-fish avatar Mar 01 '22 09:03 icy-fish

Hi @vapurrmaid , it's there any suggestion for this issue? I found something relevant which points out that some extra may need be done with xterm.js:

  • https://github.com/sagemathinc/cocalc/issues/1269
  • https://github.com/sagemathinc/cocalc/issues/3277

But I'm not sure what code-server can do on this scenario, could you please take a look and confirm, thanks.

icy-fish avatar Mar 01 '22 10:03 icy-fish

Any solutions to this? Not a super problematic issue to go up a line and erase the previous command, but it's quite annoying.

scottmudge avatar Nov 14 '22 14:11 scottmudge

@scottmudge what version of code-server are you using? And can you reproduce it in Codespaces or Gitpod?

jsjoeio avatar Nov 30 '22 16:11 jsjoeio

code-server: 3.10.2 vs code: 1.56.1

Unfortunately I am just a user of this deployment and do not admin rights to upgrade or deploy different services. Was hoping there might be a way to correct the issue from a configuration/user-space side of things.

scottmudge avatar Nov 30 '22 17:11 scottmudge

Hmm...that's pretty old. You might be able to play with terminal GPU rendering or something in the VS Code settings. I'm not sure what else would work unfortunately 😢

jsjoeio avatar Nov 30 '22 18:11 jsjoeio

This happens, if the recorded terminal data contains requests, which the terminal will respond to (here DA2).

To fix that - replay first on the new terminal, then connect to the PTY. This way the responses get not sent again to the PTY.

jerch avatar Nov 06 '23 13:11 jerch

This happens, if the recorded terminal data contains requests, which the terminal will respond to (here DA2).

To fix that - replay first on the new terminal, then connect to the PTY. This way the responses get not sent again to the PTY.

Have you solved it? How to do it? Looking forward to your reply

Bona-ai avatar Nov 22 '23 01:11 Bona-ai

No I have not solved it, as I dont had the issue. I've posted here, because we got a similar question in the xterm.js repo.

jerch avatar Nov 22 '23 11:11 jerch

We are closing out old issues, but let me know if this is still an issue. It seems unlikely to be in code-server though, all the replay logic is in VS Code core.

code-asher avatar Jul 11 '24 23:07 code-asher