warp icon indicating copy to clipboard operation
warp copied to clipboard

SSH disconnect makes commands prefix / suffix with 00~ and 01~

Open lewismacnow opened this issue 2 years ago • 26 comments

Discord username (optional)

No response

Describe the bug

When connected to a remote ssh server and the session disconnects "client_loop: send disconnect: Broken pipe" Further commands on the local machine are prefix / suffix with 00~ and 01~

To reproduce

Using macos

  1. ssh to ubuntu server
  2. reset network interface / router etc
  3. you are now disconnected from the remote server - see "client_loop: send disconnect: Broken pipe"
  4. try to ssh to same server ... or try any other command
  5. commands are prefixed with '00~' so always fail.

Expected behavior

No response

Screenshots

image

Operating system

MacOS

Operating system and version

14.3 (23D56)

Shell Version

GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)

Current Warp version

v0.2024.01.16.16.31.stable_01

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

lewismacnow avatar Feb 05 '24 18:02 lewismacnow

I'm also facing this same issue. I have to close that session and open a new one every time

priyank-trivedi avatar Feb 07 '24 06:02 priyank-trivedi

I'm also facing this same issue. I have to close that session and open a new one every time

Yes me too. I usually just restart in a new tab. I have not worked out a way to recover from the issue in the same tab/session.

lewismacnow avatar Feb 08 '24 12:02 lewismacnow

I have same issue

OlegYarmolenko avatar Feb 15 '24 08:02 OlegYarmolenko

+1 also experiencing this issue

larsenweigle avatar Feb 27 '24 05:02 larsenweigle

+1 here as well

pixel-wraith avatar Mar 01 '24 12:03 pixel-wraith

I have same issue.

daftu avatar Mar 03 '24 12:03 daftu

+1

kei-eniblock avatar Mar 11 '24 13:03 kei-eniblock

+1

davidbaranek avatar Mar 17 '24 11:03 davidbaranek

+1

eugui avatar Mar 19 '24 19:03 eugui

I moved over to iterm2. This bug is too frustrating to continue use.

lewismacnow avatar Apr 17 '24 11:04 lewismacnow

Same here. I am also having problems when I simply use exit to end a ssh connection. The CLI just stops working as a whole. It's really frustrating because I absolutely love Warp, but not enough to deal with all the bugs that arise when using ssh :(

larsenweigle avatar Apr 18 '24 21:04 larsenweigle

+1. Looking forward to a fix.

DennisFaucher avatar Apr 18 '24 22:04 DennisFaucher

Same here. I am also having problems when I simply use exit to end a ssh connection. The CLI just stops working as a whole. It's really frustrating because I absolutely love Warp, but not enough to deal with all the bugs that arise when using ssh :(

There are an unfortunate number of confusing and worrying issues beyond these.

For example, when using 'glances' (popular python system monitor) with Warp, I get a 'segmentation fault'. I am not smart enought to know why Warp + SSH + python causes memory related problems on the remote host which do not exist with other terminal emulators.

But it worries me enough to forego using Warp ever again.

lewismacnow avatar Apr 19 '24 08:04 lewismacnow

@dannyneira the same issue I've mentioned in #4645 Hopefully you find the time to investigate it 🙌🏼

bartosik-hep avatar Apr 19 '24 10:04 bartosik-hep

I have same issue

Sophikitis avatar Apr 20 '24 19:04 Sophikitis

+1, same issue

sasquanaut avatar May 03 '24 16:05 sasquanaut

Hey all - I've figured out what's going wrong here, and should have a fix out in next week's release. :)

The issue occurs when you SSH from a shell that doesn't support the bracketed paste mode (e.g.: the macOS system bash, /bin/bash, as it's ~15 years old) into one that does (e.g.: a modern bash or zsh). The remote shell enables the bracketed paste mode when the line editor is active, and when the SSH connection is suddenly disconnected, nothing ever resets bracketed paste mode back to off. This causes Warp to send bracketed paste control sequences (\x1b[200~ and \x1b[201~) to the local shell, which doesn't understand them, leading to the odd 00~ and 01~ wrappers around commands.

vorporeal avatar May 17 '24 17:05 vorporeal

That's great news. Thank you.

DennisFaucher avatar May 17 '24 17:05 DennisFaucher

@vorporeal Yes, you're right. After switching to zsh in my local terminal I don't have the issue any more. Thank you looking into this!

bartosik-hep avatar May 18 '24 08:05 bartosik-hep

I wonder if upgrading bash using homebrew bash would also solve the problem.

DennisFaucher avatar May 18 '24 11:05 DennisFaucher