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.51k stars 376 forks source link

warp does not starting " starting zsh..." indefinitely #4479

Open hachache opened 8 months ago

hachache commented 8 months ago

Discord username (optional)

No response

Describe the bug

With an Apple M2 Pro chip, when opening Warp, I remain stuck on 'starting zsh' indefinitely, making it impossible to use the terminal. At the top, there's a small message saying 'seems like your shell is taking a while to start.

To reproduce

its just doesn't work

Expected behavior

to work

Screenshots

warp

Operating system

MacOS

Operating system and version

14.2.1

Shell Version

~ zsh --version zsh 5.9 (x86_64-apple-darwin23.0) ➜ ~ bash --version GNU bash, version 5.2.26(1)

Current Warp version

v0.2024.02.27.08.01.stable_03

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?

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

dannyneira commented 8 months ago

Hi @hachache sorry to hear about this. Try running which zsh and put the result into your Settings > Features > Session > Startup shell for new sessions > Custom to see if that helps. If the issue persists, then you can check whether it’s something in your dotfiles by setting up clean configs: Run echo 'ZDOTDIR=/' > ~/.zshenv and open a new session. This forces Zsh to run with zero configs.

A common culprit is the iterm2_shell_integration. We have a list of incompatible tools here: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools

You can disable parts of your dotfiles just for Warp by using this conditional statement:

# Bash and Zsh
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
# > What you want to disable here <
fi

Please let us know if this helps or if the issues persist please post a redacted(no personal info), copy of your .zshrc file.

KevinNizet commented 8 months ago

Hi @dannyneira, I had the exact same issue than @hachache. It occured when I try to add Termium (from Codeium) to terminal. When I deleted lines related to Codeium from .zshrc file (and also from .zprofile), everything worked fine again.

hachache commented 8 months ago

This is my .zshrc file

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
#ZSH_THEME="robbyrussell"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled  # disable automatic updates
# zstyle ':omz:update' mode auto      # update automatically without asking
# zstyle ':omz:update' mode reminder  # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias va='ansible-vault view'
alias ve='ansible-vault edit'

I already runned this echo 'ZDOTDIR=/' > ~/.zshenv but it doesn't work.

it doesn't work with the bash shell too.

MacBook Pro 16 M2 Pro chip MacOS Sonoma 14.2.1

I tried to uninstall OH MY ZSH it doesn't work too, same problem

starting zsh ... and it doesn't work

same with bash ...

dannyneira commented 8 months ago

Hey @hachache check your .zprofile, .profile, and .bash_profile. I found a recent integration with Termium completely breaks Warp and prevents it from loading. You should see something like the following in the top and bottom of the files:

### Added by Codeium. These lines cannot be automatically removed if modified
if command -v termium > /dev/null 2>&1; then
  eval "$(termium shell-hook show pre)"
fi
### End of Codeium integration

### Added by Codeium. These lines cannot be automatically removed if modified
if command -v termium > /dev/null 2>&1; then
  eval "$(termium shell-hook show post)"
fi
### End of Codeium integration

Either wrap in the conditional I mentioned above, or delete it entirely.

hachache commented 8 months ago

➜ ~ cat .zprofile eval "$(/opt/homebrew/bin/brew shellenv)"

➜ ~ cat .bash_profile ➜ ~ cat .profile ➜ ~

here my files in my macbook pro 16 M2 pro , it doesn't work.

I tested to run warp with my macbook air M1 and it worked with no issues.

uxinnuendo commented 6 months ago

I have this issue - 100% reproducible, but only when opening a new warp tab from a specific project folder (CTRL+T).

Opening a new warp instance, and opening a new tab from any other folder works Ok.

I have no idea what it is about this project folder, that could cause an issue with warp initialisation (there's no warp config file).

dereklucas commented 5 months ago

My issue was an old line in my .zshrc: export PATH="$(yarn global bin):$PATH"

Not sure if it was related to yarn global no longer existing, or something around calling yarn with asdf, but removing it fixed my issue entirely.

arhirani commented 4 months ago

I was facing this issue as well only for the project folder. I looked into .zshrc and what worked for me was disabling the Yarn's global binary directories in the PATH environment variable.