warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.33k stars 372 forks source link

Warp not react to the keyboard input #5137

Open Akiyamka opened 3 months ago

Akiyamka commented 3 months ago

Dupe Check

Describe the bug

After launch warp not react on keyboard input. In simple words - I can't use keyboard input in a window with warp

To reproduce

  1. Go to https://www.warp.dev/
  2. Download .rpm
  3. Install it
  4. Open warp
  5. Try to type something - see nothing happens

Expected behavior

I expect that I can type in terminal window

Screenshots

image

Operating system

Linux

Operating system and version

Fedora Linux 40 (Workstation Edition) x86_64

Shell Version

zsh 5.9 (x86_64-redhat-linux-gnu)

Current Warp version

warp-terminal-v0.2024.07.09.08.01.stable_00-1.x86_64

Regression

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

Recent working Warp date

No response

Additional context

I see a very strange thing in the logs - warp registers each key press as a KeyDown press

 dispatching typed action: KeyDown
Full wrap log here ``` 2024-07-18T09:36:55Z [WARN] redraw_frame was called 2 times before the frame was drawn 2024-07-18T09:36:56Z [INFO] Successfully flushed events to segment from disk 2024-07-18T09:36:56Z [INFO] notifying view observers and updating windows for timer id 0 2024-07-18T09:36:56Z [WARN] redraw_frame was called 2 times before the frame was drawn 2024-07-18T09:36:56Z [INFO] active window changed: None 2024-07-18T09:36:56Z [INFO] dispatching global action for root_view:update_quake_mode_state 2024-07-18T09:36:56Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:36:56Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:37:02Z [WARN] Bootstrapping failed for shell "zsh" on ssh false 2024-07-18T09:37:02Z [WARN] Showing bootstrap slow toast 2024-07-18T09:37:25Z [INFO] active window changed: Some(WindowId(0)) 2024-07-18T09:37:25Z [INFO] Checking for update on channel stable_release. Update id is PZ845IF 2024-07-18T09:37:25Z [INFO] Fetching channel versions (without changelogs) from Warp server 2024-07-18T09:37:25Z [INFO] dispatching global action for root_view:update_quake_mode_state 2024-07-18T09:37:25Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:37:25Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:37:25Z [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.07.15.08.02.dev_00", update_by: None, soft_cutoff: Some("v0.2023.05.12.08.03.dev_00") }, overrides: [] }; preview: ChannelVersion { version_info: VersionInfo { version: "v0.2024.07.15.08.02.preview_00", update_by: None, soft_cutoff: None }, overrides: [] }; canary: ChannelVersion { version_info: VersionInfo { version: "v0.2022.09.29.08.08.canary_00", update_by: None, soft_cutoff: None }, overrides: [] }; beta: ChannelVersion { version_info: VersionInfo { version: "v0.2024.07.09.08.02.beta_00", update_by: None, soft_cutoff: None }, overrides: [] }; stable: ChannelVersion { version_info: VersionInfo { version: "v0.2024.07.09.08.01.stable_00", update_by: None, soft_cutoff: Some("v0.2024.05.21.16.09.stable_02") }, overrides: [] } 2024-07-18T09:37:25Z [INFO] No update available 2024-07-18T09:37:25Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:37:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:37:25Z [INFO] Flushed telemetry events. 2024-07-18T09:37:31Z [INFO] dispatching typed action: AltMouseAction(MouseState { button: Left, action: Pressed, point: Some(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } }) 2024-07-18T09:37:31Z [INFO] dispatching typed action: MaybeClearAltSelect 2024-07-18T09:37:31Z [INFO] dispatching typed action: Focus 2024-07-18T09:37:31Z [INFO] dispatching typed action: AltMouseAction(MouseState { button: Left, action: Released, point: Some(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } }) 2024-07-18T09:37:31Z [INFO] dispatching typed action: MaybeLinkClick { position: AltScreen(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } } 2024-07-18T09:37:33Z [INFO] dispatching typed action: AltMouseAction(MouseState { button: Left, action: Pressed, point: Some(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } }) 2024-07-18T09:37:33Z [INFO] dispatching typed action: MaybeClearAltSelect 2024-07-18T09:37:33Z [INFO] dispatching typed action: Focus 2024-07-18T09:37:33Z [WARN] redraw_frame was called 2 times before the frame was drawn 2024-07-18T09:37:33Z [INFO] dispatching typed action: AltMouseAction(MouseState { button: Left, action: Released, point: Some(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } }) 2024-07-18T09:37:33Z [INFO] dispatching typed action: MaybeLinkClick { position: AltScreen(Point { row: 14, col: 94 }), modifiers: ModifiersState { alt: false, cmd: false, shift: false, ctrl: false } } 2024-07-18T09:37:35Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:35Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:36Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:36Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:42Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:43Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:43Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:44Z [INFO] dispatching typed action: KeyDown 2024-07-18T09:37:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:37:51Z [INFO] active window changed: None 2024-07-18T09:37:51Z [INFO] dispatching global action for root_view:update_quake_mode_state 2024-07-18T09:37:51Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:37:51Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:37:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:37:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:37:55Z [INFO] Flushed telemetry events. 2024-07-18T09:38:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:38:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:38:25Z [INFO] Flushed telemetry events. 2024-07-18T09:38:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:38:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:38:55Z [INFO] Flushed telemetry events. 2024-07-18T09:39:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:39:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:39:25Z [INFO] Flushed telemetry events. 2024-07-18T09:39:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:39:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:39:55Z [INFO] Flushed telemetry events. 2024-07-18T09:40:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:40:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:40:25Z [INFO] Flushed telemetry events. 2024-07-18T09:40:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:40:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:40:55Z [INFO] Flushed telemetry events. 2024-07-18T09:41:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:41:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:41:25Z [INFO] Flushed telemetry events. 2024-07-18T09:41:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:41:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:41:55Z [INFO] Flushed telemetry events. 2024-07-18T09:42:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:42:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:42:25Z [INFO] Flushed telemetry events. 2024-07-18T09:42:48Z [INFO] active window changed: Some(WindowId(0)) 2024-07-18T09:42:48Z [INFO] dispatching global action for root_view:update_quake_mode_state 2024-07-18T09:42:48Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:42:48Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:48Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:50Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:42:55Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:42:55Z [INFO] Dropping empty telemetry batch 2024-07-18T09:42:55Z [INFO] Flushed telemetry events. 2024-07-18T09:42:59Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:11Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:11Z [INFO] dispatching typed action: HyperlinkClick(HyperlinkUrl { url: "https://docs.warp.dev/help/known-issues" }) 2024-07-18T09:43:12Z [INFO] dispatching typed action: EndResizing 2024-07-18T09:43:12Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:43:12Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:12Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:13Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:14Z [INFO] active window changed: None 2024-07-18T09:43:14Z [INFO] dispatching global action for root_view:update_quake_mode_state 2024-07-18T09:43:14Z [INFO] dispatching global action for workspace:save_app 2024-07-18T09:43:14Z [WARN] Expected to have session for session ID SessionId(172129541515080), but doesn't exist 2024-07-18T09:43:25Z [INFO] Start to flush telemetry events to Segment 2024-07-18T09:43:25Z [INFO] Dropping empty telemetry batch 2024-07-18T09:43:25Z [INFO] Flushed telemetry events. ```

Host: Framework 16 (AMD Ryzen 7040 Series) (AJ) Kernel: Linux 6.9.7-200.fc40.x86_64 Shell: zsh 5.9 DE: GNOME 46.3.1 WM: Mutter (Wayland) CPU: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics (16) @ 5 GPU 1: AMD Radeon RX 7700S @ 0.36 GHz [Discrete] GPU 2: AMD Radeon 780M @ 0.80 GHz [Integrated] Memory: 7.24 GiB / 30.65 GiB (24%)

Additional software that affects shell from the start:

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

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

vorporeal commented 3 months ago

Hey @Akiyamka - sorry to hear you're running into issues! The banner at the top "Seems like your shell is taking a while to start" indicates that something (likely in your rcfiles) is interfering with our shell bootstrapping logic.

Mind sharing the contents of your .zshrc file (and any other relevant files like .zprofile and .zshenv, if you use any of them)? Feel free to redact any sensitive information that wouldn't be relevant.

Additionally, what tool are you using that adds the status bar at the bottom? Haven't seen it before, and I think it's pretty likely that it's doing something that we're not properly handling/are robust to.

Akiyamka commented 3 months ago

Mind sharing the contents of your .zshrc file (and any other relevant files like .zprofile and .zshenv, if you use any of them)? Feel free to redact any sensitive information that wouldn't be relevant.

Sure:

.zshrc ```bash export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="fino" plugins=(git z zsh-autosuggestions) source $ZSH/oh-my-zsh.sh export PATH=$HOME/.local/bin:$PATH if [ -d ~/.bashrc.d ]; then for rc in ~/.bashrc.d/*; do if [ -f "$rc" ]; then . "$rc" fi done fi unset rc ```
oh-my-zsh.sh ```bash # ANSI formatting function (\033[m) # 0: reset, 1: bold, 4: underline, 22: no bold, 24: no underline, 31: red, 33: yellow omz_f() { [ $# -gt 0 ] || return IFS=";" printf "\033[%sm" $* } # If stdout is not a terminal ignore all formatting [ -t 1 ] || omz_f() { :; } # Protect against non-zsh execution of Oh My Zsh (use POSIX syntax here) [ -n "$ZSH_VERSION" ] || { omz_ptree() { # Get process tree of the current process pid=$$; pids="$pid" while [ ${pid-0} -ne 1 ] && ppid=$(ps -e -o pid,ppid | awk "\$1 == $pid { print \$2 }"); do pids="$pids $pid"; pid=$ppid done # Show process tree case "$(uname)" in Linux) ps -o ppid,pid,command -f -p $pids 2>/dev/null ;; Darwin|*) ps -o ppid,pid,command -p $pids 2>/dev/null ;; esac # If ps command failed, try Busybox ps [ $? -eq 0 ] || ps -o ppid,pid,comm | awk "NR == 1 || index(\"$pids\", \$2) != 0" } { shell=$(ps -o pid,comm | awk "\$1 == $$ { print \$2 }") printf "$(omz_f 1 31)Error:$(omz_f 22) Oh My Zsh can't be loaded from: $(omz_f 1)${shell}$(omz_f 22). " printf "You need to run $(omz_f 1)zsh$(omz_f 22) instead.$(omz_f 0)\n" printf "$(omz_f 33)Here's the process tree:$(omz_f 22)\n\n" omz_ptree printf "$(omz_f 0)\n" } >&2 return 1 } # Check if in emulation mode, if so early return # https://github.com/ohmyzsh/ohmyzsh/issues/11686 [[ "$(emulate)" = zsh ]] || { printf "$(omz_f 1 31)Error:$(omz_f 22) Oh My Zsh can't be loaded in \`$(emulate)\` emulation mode.$(omz_f 0)\n" >&2 return 1 } unset -f omz_f # If ZSH is not defined, use the current script's directory. [[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}" # Load all of the lib files in ~/oh-my-zsh/lib that end in .zsh # TIP: Add files you don't want in git to .gitignore for lib_file ("$ZSH"/lib/*.zsh); do _omz_source "lib/${lib_file:t}" done unset lib_file # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do _omz_source "plugins/$plugin/$plugin.plugin.zsh" done unset plugin # Load all of your custom configurations from custom/ for config_file ("$ZSH_CUSTOM"/*.zsh(N)); do source "$config_file" done unset config_file # Load the theme is_theme() { local base_dir=$1 local name=$2 builtin test -f $base_dir/$name.zsh-theme } if [[ -n "$ZSH_THEME" ]]; then if is_theme "$ZSH_CUSTOM" "$ZSH_THEME"; then source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" elif is_theme "$ZSH_CUSTOM/themes" "$ZSH_THEME"; then source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" elif is_theme "$ZSH/themes" "$ZSH_THEME"; then source "$ZSH/themes/$ZSH_THEME.zsh-theme" else echo "[oh-my-zsh] theme '$ZSH_THEME' not found" fi fi # set completion colors to be the same as `ls`, after theme has been loaded [[ -z "$LS_COLORS" ]] || zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" ```
.bashrc.d (I omit some unrelated files that just changes $PATH and setup some aliases) ```bash # 10-nix.bashrc if [ -e /home/akiyamka/.nix-profile/etc/profile.d/nix.sh ]; then . /home/akiyamka/.nix-profile/etc/profile.d/nix.sh; fi # atuin.bashrc . "$HOME/.atuin/bin/env" eval "$(atuin init zsh --disable-up-arrow)" # dircolors.bashrc eval "$(dircolors ~/.dircolors)"; # nnn.bashrc n3() { # Block nesting of nnn in subshells if [[ "${NNNLVL:-0}" -ge 1 ]]; then echo "nnn is already running" return fi # The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set) # If NNN_TMPFILE is set to a custom path, it must be exported for nnn to # see. To cd on quit only on ^G, remove the "export" and make sure not to # use a custom path, i.e. set NNN_TMPFILE *exactly* as follows: # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" export export NNN_OPENER=micro # The backslash allows one to alias n to nnn if desired without making an # infinitely recursive alias \nnn "$@" -c if [ -f "$NNN_TMPFILE" ]; then . "$NNN_TMPFILE" rm -f "$NNN_TMPFILE" > /dev/null fi } # zellij.bashrc alias zel=zellij eval "$(zellij setup --generate-auto-start zsh)" ```

Additionally, what tool are you using that adds the status bar at the bottom? Haven't seen it before, and I think it's pretty likely that it's doing something that we're not properly handling/are robust to.

It is zellij - terminal multiplexer (introduction screencast)

plef commented 1 month ago

Same issue on macOS - upon launch, I always have to use mouse to make app obtain focus. There is also strange glitch in menus - within "File" menu, generic items like "About Warp" are in disabled state ("Settings" menu items are entirely disabled). I've never met such a strange state in general, so I have no glue what is the issue of Warp app here.

image image

Once I click into command line area, all turns fine.

Unfortunately, I have no idea how to reproduce the bug - it just happens at some time, and it seems that the only keyboard shortcut the app responds to is - Command+Q (i.e. system wide ones). But launching it again does not help - one just has to click into command line area (and then, if app is quit and started again, the bug does not occur, i.e. app hac focus and reacts to keyboard shortcuts as expected, until some unpredicted events occur again to make the bug reappear)

Version: image