Fish shell crashing on startup
Dupe Check
- [X] I have searched Warp bugs and there are no duplicates
Describe the bug
Fish shell used to work in Warp, but now crashes on startup if it's set as my default shell. If I try to "warpify" fish when I start it from another shell, I get the following error (which I'm assuming is the same issue causing it to fail to start up when it's the default):
[ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q zsh && unsetopt ZLE && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; setopt hist_ignore_space; unsetopt ZLE; WARP_IS_SUBSHELL=1; 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\", \"is_subshell\": true}}" | command -p od -An -v -tx1 | command -p tr -d " \n"); printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' "$_msg"; unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q bash && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; command -p stty raw;unset PROMPT_COMMAND;HISTCONTROL=ignorespace;HISTIGNORE=" *";WARP_IS_SUBSHELL=1;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\": \"bash\", \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"is_subshell\": true}}" | command -p od -An -v -tx1 | command -p tr -d " \n");printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' $_msg;unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && [ $FISH_VERSION ] && eval 'export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;'
command: Unknown option '-p'
(Type 'help command' for related documentation)
command: Unknown option '-p'
(Type 'help command' for related documentation)
fish: Expected a variable name after this $.
export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;
^
fish: Expected a variable name after this $.
export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;
^
fish: Expected a variable name after this $.
export WARP_HONOR_PS1=0; export WARP_COMBINED_PROMPT_COMMAND_GRID=1; set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;
^
To reproduce
Set fish as default shell:
chsh -s /usr/local/bin/fish
Open a new Warp tab
Expected behavior
The fish shell starts up and you land in the interactive prompt
Screenshots
Fish shell starting up...
Fish shell unable to start and no interactive prompt available...
Operating system
MacOS
Operating system and version
14.5.0
Shell Version
fish, version 3.7.1
Current Warp version
v0.2024.07.16.08.02.stable_02
Regression
Yes, this bug started recently or with an X Warp version
Recent working Warp date
No response
Additional context
No response
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
Hi @josephschmitt. Yikes! This is a frustrating issue. We did make some changes to fish shell in this release. I'm looking into it.
In the meantime, you can use an older build as a workaround. Unfortunately, you'll have to ignore the update banner. Sorry for the inconvenience.
https://releases.warp.dev/stable/v0.2024.07.09.08.01.stable_00/Warp.dmg
@josephschmitt Are you able to share your ~/.config/fish/config.fish here?
If you comment out your whole fish config, does the problem go away?
@josephschmitt Are you able to share your
~/.config/fish/config.fishhere?If you comment out your whole fish config, does the problem go away?
@acarl005 Nope, deleted my entire config and still getting the same behavior. The shell starts up normally in Terminal.app, iTerm, and VS Code's shell. I actually deleted all of my ~/.config/fish directory just in case, same issue.
Hi @josephschmitt. Yikes! This is a frustrating issue. We did make some changes to fish shell in this release. I'm looking into it.
In the meantime, you can use an older build as a workaround. Unfortunately, you'll have to ignore the update banner. Sorry for the inconvenience.
https://releases.warp.dev/stable/v0.2024.07.09.08.01.stable_00/Warp.dmg
@acarl005 confirmed this version of Warp works for me as intended. Let me know how else I can help you repro the issue.
Thanks for the info. We'll need to try something else. There's a hidden option to show shell errors in Warp on session creation. Can you run this command in a terminal:
defaults write dev.warp.Warp-Stable ShouldShowBootstrapBlock true
Then, open the latest Warp with fish again to trigger the problem. There should be a bunch of logs in your new session.
Thanks for the info. We'll need to try something else. There's a hidden option to show shell errors in Warp on session creation. Can you run this command in a terminal:
defaults write dev.warp.Warp-Stable ShouldShowBootstrapBlock trueThen, open the latest Warp with fish again to trigger the problem. There should be a bunch of logs in your new session.
@acarl005 Here's the output:
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
josephschmitt@W2TD37NJKN:~
➤ source /var/folders/sb/1ht43yg57fb71gclqv4v_lvw0000gp/T/.tmpEEexdp
set: Unknown option '-f'
/var/folders/sb/1ht43yg57fb71gclqv4v_lvw0000gp/T/.tmpEEexdp (line 108):
set -f exit_code $status
^
in function 'warp_precmd'
called on line 351 of file /var/folders/sb/1ht43yg57fb71gclqv4v_lvw0000gp/T/.tmpEEexdp
from sourcing file /var/folders/sb/1ht43yg57fb71gclqv4v_lvw0000gp/T/.tmpEEexdp
(Type 'help set' for related documentation)
set: Unknown option '-f'
/var/folders/sb/1ht43yg57fb71gclqv4v_lvw0000gp/T/.tmpEEexdp (line 108):
set -f exit_code $status
^
in function 'warp_precmd'
in event handler: handler for generic event 'fish_prompt'
(Type 'help set' for related documentation)
@acarl005 How do I disable auto-update? Each time I open Warp it's broken again 😅
Hello, @acarl005.
I have the same problem, but I use::
Ubuntu 22.04.4 LTS
FIsh version 3.3.1
Warp version 0.2024.07.16.08.02.stable.02
Ok I think I see the problem. I'll test things out and update on this thread when I'm sure.
How do I disable auto-update?
Sadly I don't have a good answer for that!
How do I disable auto-update?
@josephschmitt It's a request we're tracking here #1991
Same here! (Ubuntu 22.04)
Love Warp btw :)
Hey @josephschmitt and @gustavo-fior - what version of fish are you running?
It looks like the problem is that we're using a fish feature which is only available on 3.6 or later. We're putting out a patch release to fix the issue. Alternatively, if you want to work around the issue sooner than that, you might be able to update your fish version.
UPDATE: actually, fish 3.4 or later.
When I enter into an EndeavourOS virtual machine with Warp the following happens. I use fish in Endeavouros. I cannot login using Warp. Wezterm does not have this issue. EndeavourOS and macOS are both using fish 3.7.1. Fish in macOS 14.5 + Warp works fine.
ssh user@endeavouros
user@endeavouros's password:
fish: Unsupported use of '='. In fish, please use 'set hook $(printf "{\"hook\": \"SSH\", \"value\": {\"socket_path\": \"~/.ssh/17301\", \"remote_shell\": \"%s\"}}" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \n")'.
hook=$(printf "{\"hook\": \"SSH\", \"value\": {\"socket_path\": \"~/.ssh/17301\", \"remote_shell\": \"%s\"}}" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Connection to endeavouros closed.
Hope this comment helps and the bug is correct here and not incorrectly assigned.
Edit: Thanks to @vorporeal I could solve my issue with disabling the ssh wrapper.
It looks like the problem is that we're using a fish feature which is only available on 3.6 or later. We're putting out a patch release to fix the issue. Alternatively, if you want to work around the issue sooner than that, you might be able to update your fish version.
@acarl005 fwiw I updated to fish 3.7.1 and still seeing the issue
How do I disable auto-update?
@josephschmitt It's a request we're tracking here #1991
@dannyneira fwiw I normally do want it on, it's just that right now with this particular bug it's breaking every time I quit and re-open Warp since I'm trying to stay on the older working version 😂
Hi @rhsev - that's a different issue; Warp's ssh wrapper doesn't currently support ssh-ing into fish. Please subscribe to https://github.com/warpdotdev/Warp/issues/871 for updates on that one!
@josephschmitt - just to triple-check, can you run echo $FISH_VERSION from inside the shell on the working (older) version of Warp? set: Unknown option '-f' pretty clearly implies that your fish binary doesn't understand that argument to set, and the fish documentation shows that the argument was added in the 3.6.x branch (and should exist in the 3.7.x branch, as per the current docs).
v0.2024.07.16.08.02.stable_03 is now live; please download the latest version and let me know if you're still experiencing the problem or if we can close this issue!
I am no longer having the issue, I am Fish version 3.7.1