Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Got `cut: stdin: Illegal byte sequence` Error After Upgrading to `v0.2022.05.30.09.10.stable_01` on macOS 12.4 (M1 Max)

Open pseudoyu opened this issue 3 years ago • 14 comments

Discord username (optional)

Yu ZHANG#9323

Describe the bug

Got `cut: stdin: Illegal byte sequence` Error After Upgrading to `v0.2022.05.30.09.10.stable_01` on macOS 12.4 (M1 Max)

To Reproduce

Steps to reproduce:

  1. Open/Reopen the Warp
  2. It shows the error info

Expected behaviour

No response

Screenshots

warp_error

Operating System

MacOS

OS Version

12.4

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Additional context

No response

Warp Internal (ignore): linear-label:24888f54-df93-45d5-9bdd-e38f740cac19

No response

pseudoyu avatar Jun 02 '22 02:06 pseudoyu

Thanks for reporting. Will report back when there are updates

elviskahoro avatar Jul 09 '22 06:07 elviskahoro

Hey @pseudoyu, is this still an issue for you?

vorporeal avatar Dec 02 '22 21:12 vorporeal

Still an issue for me

zmarouf avatar Dec 06 '22 09:12 zmarouf

Hey @pseudoyu, is this still an issue for you?

Yes, I tried just now and it's still an issue.

pseudoyu avatar Dec 06 '22 09:12 pseudoyu

Gotcha. Mind posting the output of these two commands?

  1. echo "all: '$LC_ALL', ctype: '$LC_CTYPE'"
  2. builtin print -l -- ${(ok)functions} (zsh-only)

vorporeal avatar Dec 06 '22 18:12 vorporeal

Sure, here is the output.

warp_test_output

pseudoyu avatar Dec 07 '22 03:12 pseudoyu

Thanks for the quick response! Could you send the full output of the second command? (Either paste it here as text or a Warp shared block link.)

vorporeal avatar Dec 07 '22 16:12 vorporeal

Thanks for the quick response! Could you send the full output of the second command? (Either paste it here as text or a Warp shared block link.)

Here is the full output: https://app.warp.dev/block/gOiknBoOFmQBBhsGO4KKUk

lol I almost forgot this convenient shared block link feature :)

Thank you for your efforts!!!

pseudoyu avatar Dec 07 '22 16:12 pseudoyu

Ok, one more question - what's the output of running locale, both in Warp and in either iTerm or Terminal.app?

vorporeal avatar Dec 08 '22 22:12 vorporeal

Ok, one more question - what's the output of running locale, both in Warp and in either iTerm or Terminal.app?

Good catch. It needed LC_ALL to be set in my case.

zmarouf avatar Jan 03 '23 01:01 zmarouf

Ok, one more question - what's the output of running locale, both in Warp and in either iTerm or Terminal.app? @vorporeal iterm2 CleanShot2023-05-24at09 52 53@2x warp CleanShot2023-05-24at09 53 21@2x

Przeblysk avatar May 24 '23 01:05 Przeblysk

Ok, one more question - what's the output of running locale, both in Warp and in either iTerm or Terminal.app? @vorporeal iterm2 CleanShot2023-05-24at09 52 53@2x warp CleanShot2023-05-24at09 53 21@2x

I have the same configuration

Ma-k-w avatar Jul 05 '23 10:07 Ma-k-w

Ok, one more question - what's the output of running locale, both in Warp and in either iTerm or Terminal.app? @vorporeal iterm2 CleanShot2023-05-24at09 52 53@2x warp CleanShot2023-05-24at09 53 21@2x

I have the same configuration

+1

MonkeyInWind0 avatar Oct 23 '23 07:10 MonkeyInWind0

image

Mine, too, has this prompt every time warp is opened. It is still not possible to reinstall it. 我的也是,每次warp 打开都有这个提示,重新安装还是不行

fxzer avatar Jun 28 '24 10:06 fxzer

我发现删除 zimfw 自动插入的相关配置,就没有这个错误提示,删除 .zshrc 中的:

I found that deleting the relevant configuration of zimfw automatic insertion does not have this error prompt, deleting '.zshrc`:

# Start configuration added by Zim install {{{
#
# User configuration sourced by interactive shells
#

# -----------------
# Zsh configuration
# -----------------

#
# History
#

# Remove older command from the history if a duplicate is to be added.
setopt HIST_IGNORE_ALL_DUPS

#
# Input/output
#

# Set editor default keymap to emacs (`-e`) or vi (`-v`)
bindkey -e

# Prompt for spelling correction of commands.
#setopt CORRECT

# Customize spelling correction prompt.
#SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '

# Remove path separator from WORDCHARS.
WORDCHARS=${WORDCHARS//[\/]}

# -----------------
# Zim configuration
# -----------------

# Use degit instead of git as the default tool to install and update modules.
#zstyle ':zim:zmodule' use 'degit'

# --------------------
# Module configuration
# --------------------

#
# git
#

# Set a custom prefix for the generated aliases. The default prefix is 'G'.
#zstyle ':zim:git' aliases-prefix 'g'

#
# input
#

# Append `../` to your input for each `.` you type after an initial `..`
#zstyle ':zim:input' double-dot-expand yes

#
# termtitle
#

# Set a custom terminal title format using prompt expansion escape sequences.
# See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# If none is provided, the default '%n@%m: %~' is used.
#zstyle ':zim:termtitle' format '%1~'

#
# zsh-autosuggestions
#

# Disable automatic widget re-binding on each precmd. This can be set when
# zsh-users/zsh-autosuggestions is the last module in your ~/.zimrc.
ZSH_AUTOSUGGEST_MANUAL_REBIND=1

# Customize the style that the suggestions are shown with.
# See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style
#ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=242'

#
# zsh-syntax-highlighting
#

# Set what highlighters will be used.
# See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)

# Customize the main highlighter styles.
# See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md#how-to-tweak-it
#typeset -A ZSH_HIGHLIGHT_STYLES
#ZSH_HIGHLIGHT_STYLES[comment]='fg=242'

# ------------------
# Initialize modules
# ------------------

ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
  if (( ${+commands[curl]} )); then
    curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  else
    mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  fi
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
  source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules.
source ${ZIM_HOME}/init.zsh

# ------------------------------
# Post-init module configuration
# ------------------------------

#
# zsh-history-substring-search
#

zmodload -F zsh/terminfo +p:terminfo
# Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init
for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up
for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down
for key ('k') bindkey -M vicmd ${key} history-substring-search-up
for key ('j') bindkey -M vicmd ${key} history-substring-search-down
unset key
# }}} End configuration added by Zim install

所以我的想法是: 判断终端是是 warp ,则不加载 zim,只能这样暂时解决,暂停在warp 中使用 zimfw 插件的功能

Therefore, my idea is: if the terminal is judged to be warp, zim will not be loaded. it can only be temporarily solved in this way and the function of using zimfw plug-in in warp will be suspended.

#  echo 'current Terminal:' $TERM_PROGRAM          
if [ "$TERM_PROGRAM" != "WarpTerminal" ]; then                  #  <----------------------------

  # Start configuration added by Zim install {{{
  #
  # User configuration sourced by interactive shells
  #

  # -----------------
  # Zsh configuration
  # -----------------

  #
  # History
  #

  # Remove older command from the history if a duplicate is to be added.
  setopt HIST_IGNORE_ALL_DUPS

  #
  # Input/output
  #

  # Set editor default keymap to emacs (`-e`) or vi (`-v`)
  bindkey -e

  # Prompt for spelling correction of commands.
  #setopt CORRECT

  # Customize spelling correction prompt.
  #SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '

  # Remove path separator from WORDCHARS.
  WORDCHARS=${WORDCHARS//[\/]}

  # -----------------
  # Zim configuration
  # -----------------

  # Use degit instead of git as the default tool to install and update modules.
  #zstyle ':zim:zmodule' use 'degit'

  # --------------------
  # Module configuration
  # --------------------

  #
  # git
  #

  # Set a custom prefix for the generated aliases. The default prefix is 'G'.
  #zstyle ':zim:git' aliases-prefix 'g'

  #
  # input
  #

  # Append `../` to your input for each `.` you type after an initial `..`
  #zstyle ':zim:input' double-dot-expand yes

  #
  # termtitle
  #

  # Set a custom terminal title format using prompt expansion escape sequences.
  # See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
  # If none is provided, the default '%n@%m: %~' is used.
  #zstyle ':zim:termtitle' format '%1~'

  #
  # zsh-autosuggestions
  #

  # Disable automatic widget re-binding on each precmd. This can be set when
  # zsh-users/zsh-autosuggestions is the last module in your ~/.zimrc.
  ZSH_AUTOSUGGEST_MANUAL_REBIND=1

  # Customize the style that the suggestions are shown with.
  # See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style
  #ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=242'

  #
  # zsh-syntax-highlighting
  #

  # Set what highlighters will be used.
  # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
  ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)

  # Customize the main highlighter styles.
  # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md#how-to-tweak-it
  #typeset -A ZSH_HIGHLIGHT_STYLES
  #ZSH_HIGHLIGHT_STYLES[comment]='fg=242'

  # ------------------
  # Initialize modules
  # ------------------

  ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
  # Download zimfw plugin manager if missing.
  if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
    if (( ${+commands[curl]} )); then
      curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
          https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
    else
      mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \
          https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
    fi
  fi
  # Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
  if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
    source ${ZIM_HOME}/zimfw.zsh init -q
  fi
  # Initialize modules.
  source ${ZIM_HOME}/init.zsh

  # ------------------------------
  # Post-init module configuration
  # ------------------------------

  #
  # zsh-history-substring-search
  #

  zmodload -F zsh/terminfo +p:terminfo
  # Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init
  for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up
  for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down
  for key ('k') bindkey -M vicmd ${key} history-substring-search-up
  for key ('j') bindkey -M vicmd ${key} history-substring-search-down
  unset key
  # }}} End configuration added by Zim install
  # echo 'zim is loaded'
fi													 #  <----------------------------

fxzer avatar Jul 04 '24 01:07 fxzer

I still have same issue when using warp how can you resolve it ?

masayomitan avatar Nov 04 '25 07:11 masayomitan