Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warp SSH Warpper makes connection to Windows disconnect immediately #4850

Open
1 task done
MsRCAtN opened this issue Apr 29, 2024 · 1 comment
Open
1 task done

Warp SSH Warpper makes connection to Windows disconnect immediately #4850

MsRCAtN opened this issue Apr 29, 2024 · 1 comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes SSH SSH Related Issues

Comments

@MsRCAtN
Copy link

MsRCAtN commented Apr 29, 2024

Discord username (optional)

No response

Operating System

MacOS

Operating System and Version

macOS 14.4

Local Shell Version

zsh 5.9

Remote Shell Version

windows conhost prompt(CMD) Version 10.0.19045.2965

Warp Version

v0.2024.04.23.08.01.stable_03

I have tried commenting out my system & user rcfiles and warp still will not bootstrap

  • Yes

Screenshots

Connection would be closed immediately after successful establishing and output a large blank block.
image

disabled Warp SSH Warpper makes it work but still a large blank
image

Include shell xtrace output

WARP_DEBUG_MODE=1 ssh ... command does't show anything, here is set -x output

ssh sa46l@ms06
+_warp_zshaddhistory:1> _is_warp_generator_command $'ssh sa46l@ms06\n'
+_is_warp_generator_command:1> [[ $'ssh sa46l@ms06\n' != *warp_run_generator_command* ]]
+warp_set_title_active_on_preexec:1> [[ '' != true ]]
+warp_set_title_active_on_preexec:2> emulate -L zsh
+warp_set_title_active_on_preexec:3> setopt extended_glob
+warp_set_title_active_on_preexec:4> local -a cmdargs
+warp_set_title_active_on_preexec:5> cmdargs=( ssh sa46l@ms06 )
+warp_set_title_active_on_preexec:6> [[ ssh = fg ]]
+warp_set_title_active_on_preexec:25> local CMD=sa46l@ms06
+warp_set_title_active_on_preexec:26> local LINE='ssh sa46l@ms06'
+warp_set_title_active_on_preexec:27> warp_title sa46l@ms06
+warp_title:1> DISABLE_AUTO_TITLE=true
+warp_title:2> setopt localoptions nopromptsubst
+warp_title:3> [[ -n '' ]]
+warp_title:4> title='%25<..<sa46l@ms06'
+warp_title:5> print -Pn '\e]0;%25\<..\<sa46l@ms06\a'
+iterm2_preexec:2> PS1=$'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}'
+iterm2_preexec:3> ITERM2_SHOULD_DECORATE_PROMPT=1
+iterm2_preexec:4> iterm2_before_cmd_executes
+iterm2_before_cmd_executes:1> [ WarpTerminal '=' iTerm.app ']'
+iterm2_before_cmd_executes:4> printf '\033]133;C;\007'
+warp_preexec:1> warp_escape_json 'ssh sa46l@ms06'
+warp_escape_json:1> tr -d '\n'
+warp_escape_json:1> sed -E $'s/(["\\\\])/\\\\\\1/g; s/\C-H/\\\\b/g; s/\t/\\\\t/g; s/\C-L/\\\\f/g; s/\C-M/\\\\r/g; $!s/$/\\\\n/'
+warp_preexec:1> local warp_escaped_command='ssh sa46l@ms06'
+warp_preexec:2> warp_send_json_message '{"hook": "Preexec", "value": {"command": "ssh sa46l@ms06"}}'
+warp_send_json_message:1> warp_hex_encode_string '{"hook": "Preexec", "value": {"command": "ssh sa46l@ms06"}}'
+warp_hex_encode_string:1> printf %s '{"hook": "Preexec", "value": {"command": "ssh sa46l@ms06"}}'
+warp_hex_encode_string:1> od -An -v -tx1
+warp_hex_encode_string:1> tr -d ' \n'
+warp_send_json_message:1> local msg=7b22686f6f6b223a202250726565786563222c202276616c7565223a207b22636f6d6d616e64223a202273736820736134366c406d733036227d7d
+warp_send_json_message:2> printf %b%b%s%b $'\C-[P$' d 7b22686f6f6b223a202250726565786563222c202276616c7565223a207b22636f6d6d616e64223a202273736820736134366c406d733036227d7d $'\M-\C-\'
+warp_preexec:3> _is_warp_generator_command 'ssh sa46l@ms06'
+_is_warp_generator_command:1> [[ 'ssh sa46l@ms06' != *warp_run_generator_command* ]]
+warp_preexec:3> [[ -f /var/folders/54/vqf625f568927b2d2sjtrm4m0000gn/T/tmp.aSCFPYMS0Y ]]
+warp_preexec:3> [[ -f /var/folders/54/vqf625f568927b2d2sjtrm4m0000gn/T/tmp.heenCATVE6 ]]
+warp_preexec:5> pids=+warp_preexec:5> comm -23 /var/folders/54/vqf625f568927b2d2sjtrm4m0000gn/T/tmp.aSCFPYMS0Y /var/folders/54/vqf625f568927b2d2sjtrm4m0000gn/T/tmp.heenCATVE6
+warp_preexec:5> pids=( )
+warp_preexec:6> [[ ! -z '' ]]
+-zsh:500> ssh sa46l@ms06
+ssh:1> is_interactive_ssh_session sa46l@ms06
+is_interactive_ssh_session:1> ARGS=( )
+is_interactive_ssh_session:2> [ 1 -gt 0 ']'
+is_interactive_ssh_session:3> OPTIND=1
+is_interactive_ssh_session:4> getopts :1246AaCfgKkMNnqsTtVvXxYyb:c:D:e:F:i:L:l:m:O:o:p:R:S:W:w: OPTION
+is_interactive_ssh_session:12> [ 0 -eq 0 ']'
+is_interactive_ssh_session:13> [ 1 -gt 1 ']'
+is_interactive_ssh_session:14> shift 0
+is_interactive_ssh_session:15> ARGS+=( sa46l@ms06 )
+is_interactive_ssh_session:16> shift
+is_interactive_ssh_session:2> [ 0 -gt 0 ']'
+is_interactive_ssh_session:18> [[ 1 -ne 1 ]]
+ssh:2> warp_send_json_message '{"hook": "PreInteractiveSSHSession", "value": {}}'
+warp_send_json_message:1> warp_hex_encode_string '{"hook": "PreInteractiveSSHSession", "value": {}}'
+warp_hex_encode_string:1> printf %s '{"hook": "PreInteractiveSSHSession", "value": {}}'
+warp_hex_encode_string:1> od -An -v -tx1
+warp_hex_encode_string:1> tr -d ' \n'
+warp_send_json_message:1> local msg=7b22686f6f6b223a2022507265496e74657261637469766553534853657373696f6e222c202276616c7565223a207b7d7d
+warp_send_json_message:2> printf %b%b%s%b $'\C-[P$' d 7b22686f6f6b223a2022507265496e74657261637469766553534853657373696f6e222c202276616c7565223a207b7d7d $'\M-\C-\'
+ssh:3> [ 1 '=' 1 ']'
+ssh:4> local TRACE_FLAG_IF_WARP_DEBUG_MODE=''
+ssh:5> [[ '' == 1 ]]
+ssh:8> warp_ssh_helper sa46l@ms06
+warp_ssh_helper:1> printf %s 'unsetopt ZLE; unset RCS; unset GLOBAL_RCS; WARP_SESSION_ID="$(command -p date +%s)$RANDOM"; _hostname=$(command -pv hostname >/dev/null 2>&1 && command -p hostname 2>/dev/null || command -p uname -n); _user=$(command -pv whoami >/dev/null 2>&1 && command -p whoami 2>/dev/null || echo $USER); _msg=$(printf "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"shell\": \"zsh\", \"user\": \"$_user\", \"hostname\": \"$_hostname\"}}" | command -p od -An -v -tx1 | command -p tr -d '\'' \n'\''); printf '\''\x1b\x50\x24\x64%s\x9c'\'' $_msg; unset _hostname _user _msg'
+warp_ssh_helper:1> od -An -v -tx1
+warp_ssh_helper:1> tr -d ' \n'
+warp_ssh_helper:1> local zsh_env_script=756e7365746f7074205a4c453b20756e736574205243533b20756e73657420474c4f42414c5f5243533b20574152505f53455353494f4e5f49443d222428636f6d6d616e64202d702064617465202b2573292452414e444f4d223b205f686f73746e616d653d2428636f6d6d616e64202d707620686f73746e616d65203e2f6465762f6e756c6c20323e263120262620636f6d6d616e64202d7020686f73746e616d6520323e2f6465762f6e756c6c207c7c20636f6d6d616e64202d7020756e616d65202d6e293b205f757365723d2428636f6d6d616e64202d70762077686f616d69203e2f6465762f6e756c6c20323e263120262620636f6d6d616e64202d702077686f616d6920323e2f6465762f6e756c6c207c7c206563686f202455534552293b205f6d73673d24287072696e746620227b5c22686f6f6b5c223a205c22496e69745368656c6c5c222c205c2276616c75655c223a207b5c2273657373696f6e5f69645c223a2024574152505f53455353494f4e5f49442c205c227368656c6c5c223a205c227a73685c222c205c22757365725c223a205c22245f757365725c222c205c22686f73746e616d655c223a205c22245f686f73746e616d655c227d7d22207c20636f6d6d616e64202d70206f64202d416e202d76202d747831207c20636f6d6d616e64202d70207472202d642027205c6e27293b207072696e746620275c7831625c7835305c7832345c78363425735c7839632720245f6d73673b20756e736574205f686f73746e616d65205f75736572205f6d7367
+warp_ssh_helper:2> ssh -o 'ControlMaster=yes' -o 'ControlPath=~/.ssh/17143935167549' -t sa46l@ms06 $'\nexport TERM_PROGRAM=\'WarpTerminal\'\nhook=$(printf "{\\"hook\\": \\"SSH\\", \\"value\\": {\\"socket_path\\": \\"~/.ssh/17143935167549\\", \\"remote_shell\\": \\"%s\\"}}" "${SHELL##*/}" | command -p od -An -v -tx1 | command -p tr -d " \\n")\nprintf \'\C-[P$d%s\M-\C-\\' $hook\nif test "${SHELL##*/}" != "bash" -a "${SHELL##*/}" != "zsh"; then\n if test ! -e $HOME/.hushlogin; then\n if test -r /etc/motd; then\n command -p cat /etc/motd\n elif test -r /run/motd; then\n command -p cat /run/motd\n elif test -r /run/motd.dynamic; then\n command -p cat /run/motd.dynamic\n elif test -r /usr/lib/motd; then\n command -p cat /usr/lib/motd\n elif test -r /usr/lib/motd.dynamic; then\n command -p cat /usr/lib/motd.dynamic\n fi\n fi\n if test -r /etc/profile; then\n . /etc/profile\n fi\n exec $SHELL\nfi\ncase ${SHELL##*/} in\n bash)\n exec -a bash bash --rcfile <(echo \'\n command -p stty raw\n HISTCONTROL=ignorespace\n HISTIGNORE=" *"\n WARP_SESSION_ID="$(command -p date +%s)$RANDOM"\n WARP_COMBINED_PROMPT_COMMAND_GRID="0"\n WARP_HONOR_PS1="1"\n _hostname=$(command -pv hostname >/dev/null 2>&1 && command -p hostname 2>/dev/null || command -p uname -n)\n _user=$(command -pv whoami >/dev/null 2>&1 && command -p whoami 2>/dev/null || echo $USER)\n _msg=$(printf "{\\"hook\\": \\"InitShell\\", \\"value\\": {\\"session_id\\": $WARP_SESSION_ID, \\"shell\\": \\"bash\\", \\"user\\": \\"$_user\\", \\"hostname\\": \\"$_hostname\\"}}" | command -p od -An -v -tx1 | command -p tr -d " \\n")\n printf \'\\\'\'\\eP$d%s\\x9c\'\\\'\' "$_msg"\'\n unset _hostname _user _msg\n )\n ;;\n zsh) WARP_TMP_DIR=$(command -p mktemp -d warptmp.XXXXXX)\n local ZSH_ENV_SCRIPT=\'756e7365746f7074205a4c453b20756e736574205243533b20756e73657420474c4f42414c5f5243533b20574152505f53455353494f4e5f49443d222428636f6d6d616e64202d702064617465202b2573292452414e444f4d223b205f686f73746e616d653d2428636f6d6d616e64202d707620686f73746e616d65203e2f6465762f6e756c6c20323e263120262620636f6d6d616e64202d7020686f73746e616d6520323e2f6465762f6e756c6c207c7c20636f6d6d616e64202d7020756e616d65202d6e293b205f757365723d2428636f6d6d616e64202d70762077686f616d69203e2f6465762f6e756c6c20323e263120262620636f6d6d616e64202d702077686f616d6920323e2f6465762f6e756c6c207c7c206563686f202455534552293b205f6d73673d24287072696e746620227b5c22686f6f6b5c223a205c22496e69745368656c6c5c222c205c2276616c75655c223a207b5c2273657373696f6e5f69645c223a2024574152505f53455353494f4e5f49442c205c227368656c6c5c223a205c227a73685c222c205c22757365725c223a205c22245f757365725c222c205c22686f73746e616d655c223a205c22245f686f73746e616d655c227d7d22207c20636f6d6d616e64202d70206f64202d416e202d76202d747831207c20636f6d6d616e64202d70207472202d642027205c6e27293b207072696e746620275c7831625c7835305c7832345c78363425735c7839632720245f6d73673b20756e736574205f686f73746e616d65205f75736572205f6d7367\'\n local WARP_COMBINED_PROMPT_COMMAND_GRID=\'0\'\n local WARP_HONOR_PS1=\'1\'\n if [[ $? == 0 ]]; then\n if command -pv xxd >/dev/null 2>&1; then\n echo $ZSH_ENV_SCRIPT | command -p xxd -p -r > $WARP_TMP_DIR/.zshenv\n else\n for i in {0..$((${#ZSH_ENV_SCRIPT} - 1))..2}; do\n builtin printf "\\x${ZSH_ENV_SCRIPT:$i:2}"\n done > $WARP_TMP_DIR/.zshenv\n fi\n else\n echo "Failed to bootstrap warp. Continuing with a non-bootstrapped shell."\n fi\n TMPPREFIX=$HOME/.zshtmp- WARP_SSH_RCFILES=${ZDOTDIR:-$HOME} WARP_COMBINED_PROMPT_COMMAND_GRID=$WARP_COMBINED_PROMPT_COMMAND_GRID WARP_HONOR_PS1=$WARP_HONOR_PS1 ZDOTDIR=$WARP_TMP_DIR exec -l zsh -g \n ;;\nesac\n'
sa46l@ms06's password:

Connection to ms06 closed.
+warp_set_title_idle_on_precmd:1> [[ '' != true ]]
+warp_set_title_idle_on_precmd:2> [[ 1 == 1 ]]
+warp_set_title_idle_on_precmd:3> warp_title '%~'
+warp_title:1> DISABLE_AUTO_TITLE=true
+warp_title:2> setopt localoptions nopromptsubst
+warp_title:3> [[ -n '' ]]
+warp_title:4> title='%25<..<%~'
+warp_title:5> print -Pn '\e]0;%25\<..\<%~\a'
+iterm2_precmd:1> local STATUS=0
+iterm2_precmd:2> [ -z 1 ']'
+iterm2_precmd:11> iterm2_after_cmd_executes 0
+iterm2_after_cmd_executes:1> printf '\033]133;D;%s\007' 0
+iterm2_after_cmd_executes:2> iterm2_print_state_data
+iterm2_print_state_data:1> local _iterm2_hostname=''
+iterm2_print_state_data:2> [ -z '' ']'
+iterm2_print_state_data:3> _iterm2_hostname=+iterm2_print_state_data:3> hostname -f
+iterm2_print_state_data:3> _iterm2_hostname=Ibuki
+iterm2_print_state_data:5> printf '\033]1337;RemoteHost=%s@%s\007' retro Ibuki
+iterm2_print_state_data:6> printf '\033]1337;CurrentDir=%s\007' /Users/retro
+iterm2_print_state_data:7> iterm2_print_user_vars
+iterm2_print_user_vars:1> true
+iterm2_precmd:13> [ -n 1 ']'
+iterm2_precmd:14> iterm2_decorate_prompt
+iterm2_decorate_prompt:3> ITERM2_PRECMD_PS1=$'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}'
+iterm2_decorate_prompt:4> ITERM2_SHOULD_DECORATE_PROMPT=''
+iterm2_decorate_prompt:9> local PREFIX=''
+iterm2_decorate_prompt:10> [[ $'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}' == +iterm2_decorate_prompt:10> iterm2_prompt_mark
+iterm2_prompt_mark:1> printf '\033]133;A\007'
+iterm2_decorate_prompt:10> [[ $'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}' == *]133;A*+iterm2_decorate_prompt:10> iterm2_prompt_mark
+iterm2_prompt_mark:1> printf '\033]133;A\007'
+iterm2_decorate_prompt:10> [[ $'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}' == *]133;A* ]]
+iterm2_decorate_prompt:11> PREFIX=''
+iterm2_decorate_prompt:17> PS1=+iterm2_decorate_prompt:17> iterm2_prompt_end
+iterm2_prompt_end:1> printf '\033]133;B\007'
+iterm2_decorate_prompt:17> PS1=$'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}%{\C-[]133;B\C-G%}'
+iterm2_decorate_prompt:18> ITERM2_DECORATED_PS1=$'%{\C-[]133;A\C-G%n@%m %1~ %# \C-[]133;B\C-G%}%{\C-[]133;B\C-G%}'
+warp_precmd:1> local exit_code=0
+warp_precmd:2> warp_send_json_message '{"hook": "CommandFinished", "value": {"exit_code": 0, "next_block_id": "precmd-17143935167549-11"}}'
+warp_send_json_message:1> warp_hex_encode_string '{"hook": "CommandFinished", "value": {"exit_code": 0, "next_block_id": "precmd-17143935167549-11"}}'
+warp_hex_encode_string:1> printf %s '{"hook": "CommandFinished", "value": {"exit_code": 0, "next_block_id": "precmd-17143935167549-11"}}'
+warp_hex_encode_string:1> od -An -v -tx1
+warp_hex_encode_string:1> tr -d ' \n'
+warp_send_json_message:1> local msg=7b22686f6f6b223a2022436f6d6d616e6446696e6973686564222c202276616c7565223a207b22657869745f636f6465223a20302c20226e6578745f626c6f636b5f6964223a2022707265636d642d31373134333933353136373534392d3131227d7d
+warp_send_json_message:2> printf %b%b%s%b $'\C-[P$' d 7b22686f6f6b223a2022436f6d6d616e6446696e6973686564222c202276616c7565223a207b22657869745f636f6465223a20302c20226e6578745f626c6f636b5f6964223a2022707265636d642d31373134333933353136373534392d3131227d7d $'\M-\C-\'

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:e7dfaa84-5fdb-4a00-b754-d8912da923fa

None

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

@MsRCAtN MsRCAtN added Bugs Bugs, Hangs, Crash, and Freezes SSH SSH Related Issues labels Apr 29, 2024
@MsRCAtN
Copy link
Author

MsRCAtN commented Apr 29, 2024

I noticed that it seems like an abnormally character parsing, this is an normal connection pipe

[2J�[m�[HMicrosoft Windows [Version 10.0.19045.2965]�]0;C:\Windows\system32\conhost.exe��[?25h
(c) 2019 Microsoft Corporation. All rights reserved.
�[52X
sa46l@MS06 C:\Users\sa46l>�[26X�]0;Administrator: C:\Windows\system32\conhost.exe�e
sa46l@MS06 C:\Users\sa46l>

and this is issue case

�P$d7b22686f6f6b223a2022507265496e74657261637469766553534853657373696f6e222c202276616c7565223a207b7d7d��[2J�[m�[H�]0;C:\Windows\system32\conhost.exe��[?25h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes SSH SSH Related Issues
Projects
None yet
Development

No branches or pull requests

1 participant