romkatv / gitstatus

Git status for Bash and Zsh prompt
GNU General Public License v3.0
1.68k stars 106 forks source link

[ERROR]: gitstatus failed to initialize #396

Closed trongrg closed 1 year ago

trongrg commented 1 year ago

I am getting this error message.

Following is the log output obtained via GITSTATUS_LOG_LEVEL=DEBUG

I tried to look into the logs but couldn't figure out much

Thanks!


Zsh log (/private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.xtrace.log):

    +(anon):7> setopt monitor
    +(anon):9> ((  ! _GITSTATUS_STATE_POWERLEVEL9K  ))
    +(anon):10> [[ -r /proc/version ]]
    +(anon):13> print -rn
    +(anon):14> zsystem flock -f lock_fd /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.lock
    +(anon):15> [[ 16 == <1-> ]]
    +(anon):18> typeset -gi '_GITSTATUS_LOCK_FD_POWERLEVEL9K=lock_fd'
    +(anon):20> [[ darwin22.0 == cygwin* ]]
    +(anon):41> sysopen -r -o cloexec -u resp_fd /dev/fd/15
    +(anon):44> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=10253'
    +(anon):46> [[ 18 == <1-> ]]
    +(anon):47> typeset -gi '_GITSTATUS_RESP_FD_POWERLEVEL9K=resp_fd'
    +(anon):48> typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=1'
    +(anon):51> ((  ! async  ))
    +(anon):41> _gitstatus_daemon_p9k_
    +_gitstatus_daemon_p9k_:1> local -i pipe_fd
    +(anon):7> setopt monitor
    +(anon):9> ((  ! _GITSTATUS_STATE_POWERLEVEL9K  ))
    +(anon):51> ((  ! async  ))
    +(anon):52> ((  _GITSTATUS_CLIENT_PID_POWERLEVEL9K == sysparams[pid]  ))
    +(anon):54> local pgid
    +(anon):55> ((  0 < 20  ))
    +(anon):56> [[ -t 18 ]]
    +(anon):57> sysread -s 20 -t 10.0000000000 -i 18 'pgid[$#pgid+1]'
    +(anon):55> ((  20 < 20  ))
    +(anon):59> [[ '               10253' == \ #<1-> ]]
    +(anon):60> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=pgid'
    +(anon):62> sysopen -w -o cloexec -u req_fd -- /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.fifo
    +(anon):63> [[ 14 == <1-> ]]
    +(anon):64> typeset -gi '_GITSTATUS_REQ_FD_POWERLEVEL9K=req_fd'
    +(anon):66> print -nru 14 -- $'}hello\C-_\C-^'
    +(anon):67> local expected=$'}hello\C-_0\C-^' actual
    +(anon):68> ((  1  ))
    +(anon):68> [[ ! -t 1 ]]
    +(anon):71> local -F deadline=1
    +(anon):73> true
    +(anon):74> [[ -t 18 ]]
    +(anon):75> sysread -s 1 -t 10.0000000000 -i 18 actual
    +(anon):75> return

  Daemon log (/private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.daemon.log):

    +_gitstatus_daemon_p9k_:3> local pgid=10253
    +_gitstatus_daemon_p9k_:4> [[ 10253 == <1-> ]]
    +_gitstatus_daemon_p9k_:5> cd -q /
    +_gitstatus_daemon_p9k_:9> trap '' PIPE
    +_gitstatus_daemon_p9k_:90> ((  lock_fd == -1  ))
    +_gitstatus_daemon_p9k_:11> local uname_sm
    +_gitstatus_daemon_p9k_:93> zsystem flock -- /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.lock
    +_gitstatus_daemon_p9k_:12> uname_sm=+_gitstatus_daemon_p9k_:12> uname -sm
    +_gitstatus_daemon_p9k_:12> uname_sm='darwin arm64'
    +_gitstatus_daemon_p9k_:13> [[ 'darwin arm64' == [^\ ]##\ [^\ ]## ]]
    +_gitstatus_daemon_p9k_:14> local uname_s=darwin
    +_gitstatus_daemon_p9k_:15> local uname_m=arm64
    +_gitstatus_daemon_p9k_:17> [[ '' == <1-> ]]
    +_gitstatus_daemon_p9k_:20> local cpus
    +_gitstatus_daemon_p9k_:21> ((  ! 1  ))
    +_gitstatus_daemon_p9k_:21> [[ darwin == linux ]]
    +_gitstatus_daemon_p9k_:22> cpus=+_gitstatus_daemon_p9k_:22> sysctl -n hw.ncpu
    +_gitstatus_daemon_p9k_:22> cpus=10
    +_gitstatus_daemon_p9k_:27> args+=( -t 20 )
    +_gitstatus_daemon_p9k_:30> mkfifo -- /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.fifo
    +_gitstatus_daemon_p9k_:31> print -rnu 13 -- '               10253'
    +_gitstatus_daemon_p9k_:33> zf_rm -- /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.fifo
    +_gitstatus_daemon_p9k_:35> local _gitstatus_zsh_daemon _gitstatus_zsh_version _gitstatus_zsh_downloaded
    +_gitstatus_daemon_p9k_:43> local gitstatus_plugin_dir_var=_gitstatus_plugin_dir_p9k_
    +_gitstatus_daemon_p9k_:44> local gitstatus_plugin_dir=/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus
    +_gitstatus_daemon_p9k_:45> set -- -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_daemon_p9k_:47> [[ 1 == (|-|+)<1-> ]]
    +_gitstatus_daemon_p9k_:48> source /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/install
    +/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/install:472> [ -z '' ']'
    +/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/install:473> _gitstatus_install_main /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:1> [ -n 5.9 ']'
    +_gitstatus_install_main:2> emulate -L sh -o no_unset
    +_gitstatus_install_main:7> local argv1=/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus
    +_gitstatus_install_main:8> shift
    +_gitstatus_install_main:10> local no_check='' no_install='' uname_s='' uname_m='' gitstatus_dir='' dl_status='' e=''
    +_gitstatus_install_main:11> local opt='' OPTARG='' OPTIND=1
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:14> case d (h)
    +_gitstatus_install_main:14> case d (n)
    +_gitstatus_install_main:14> case d (f)
    +_gitstatus_install_main:14> case d (d)
    +_gitstatus_install_main:55> [ -n '' ']'
    +_gitstatus_install_main:59> [ -z /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus ']'
    +_gitstatus_install_main:63> gitstatus_dir=/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:14> case s (h)
    +_gitstatus_install_main:14> case s (n)
    +_gitstatus_install_main:14> case s (f)
    +_gitstatus_install_main:14> case s (d)
    +_gitstatus_install_main:14> case s (p)
    +_gitstatus_install_main:14> case s (e)
    +_gitstatus_install_main:14> case s (m)
    +_gitstatus_install_main:14> case s (s)
    +_gitstatus_install_main:99> [ -n '' ']'
    +_gitstatus_install_main:103> [ -z darwin ']'
    +_gitstatus_install_main:107> uname_s=darwin
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:14> case m (h)
    +_gitstatus_install_main:14> case m (n)
    +_gitstatus_install_main:14> case m (f)
    +_gitstatus_install_main:14> case m (d)
    +_gitstatus_install_main:14> case m (p)
    +_gitstatus_install_main:14> case m (e)
    +_gitstatus_install_main:14> case m (m)
    +_gitstatus_install_main:88> [ -n '' ']'
    +_gitstatus_install_main:92> [ -z arm64 ']'
    +_gitstatus_install_main:96> uname_m=arm64
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:14> case p (h)
    +_gitstatus_install_main:14> case p (n)
    +_gitstatus_install_main:14> case p (f)
    +_gitstatus_install_main:14> case p (d)
    +_gitstatus_install_main:14> case p (p)
    +_gitstatus_install_main:66> [ -n '' ']'
    +_gitstatus_install_main:70> [ -z 'printf '\''\001'\'' >&13' ']'
    +_gitstatus_install_main:74> dl_status='printf '\''\001'\'' >&13'
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:14> case e (h)
    +_gitstatus_install_main:14> case e (n)
    +_gitstatus_install_main:14> case e (f)
    +_gitstatus_install_main:14> case e (d)
    +_gitstatus_install_main:14> case e (p)
    +_gitstatus_install_main:14> case e (e)
    +_gitstatus_install_main:77> [ -n '' ']'
    +_gitstatus_install_main:81> [ -z 13 ']'
    +_gitstatus_install_main:85> e=13
    +_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus -s darwin -m arm64 -p 'printf '\''\001'\'' >&13' -e 13 -- _gitstatus_set_daemon_p9k_
    +_gitstatus_install_main:115> shift 11
    +_gitstatus_install_main:117> : 13
    +_gitstatus_install_main:118> : /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus
    +_gitstatus_install_main:120> [ -n '' -a -n '' ']'
    +_gitstatus_install_main:125> [ -z darwin ']'
    +_gitstatus_install_main:129> [ -z arm64 ']'
    +_gitstatus_install_main:134> local daemon=''
    +_gitstatus_install_main:135> local cache_dir=/Users/trongtran/.cache/gitstatus
    +_gitstatus_install_main:137> [ -z '' ']'
    +_gitstatus_install_main:138> [ -n '' ']'
    +_gitstatus_install_main:142> [ -z '' -a -e /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd ']'
    +_gitstatus_install_main:143> daemon=/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd
    +_gitstatus_install_main:145> [ -n /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd ']'
    +_gitstatus_install_main:146> local gitstatus_version='' libgit2_version=''
    +_gitstatus_install_main:147> . /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/build.info
    +/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/build.info:6> gitstatus_version=v1.5.4
    +/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/build.info:21> libgit2_version=tag-0ad3d776aa86dd607dc86dcd7f77ad3ed7ebec61
    +/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/build.info:22> libgit2_sha256=c5d0117ae74d3ef244c26f10cce022019077dbc4563e6251fa9f56d36868ce74
    +_gitstatus_install_main:151> [ -z v1.5.4 ']'
    +_gitstatus_install_main:155> local version=v1.5.4
    +_gitstatus_install_main:156> _gitstatus_install_daemon_found 0 _gitstatus_set_daemon_p9k_
    +_gitstatus_install_daemon_found:1> local installed=0
    +_gitstatus_install_daemon_found:2> shift
    +_gitstatus_install_daemon_found:3> [ 1 '=' 0 ']'
    +_gitstatus_install_daemon_found:3> _gitstatus_set_daemon_p9k_ /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd v1.5.4 0
    +_gitstatus_set_daemon_p9k_:1> _gitstatus_zsh_daemon=/Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd
    +_gitstatus_set_daemon_p9k_:2> _gitstatus_zsh_version=v1.5.4
    +_gitstatus_set_daemon_p9k_:3> _gitstatus_zsh_downloaded=0
    +_gitstatus_install_main:157> return
    +_gitstatus_daemon_p9k_:49> [[ -n /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd ]]
    +_gitstatus_daemon_p9k_:50> [[ -n v1.5.4 ]]
    +_gitstatus_daemon_p9k_:51> [[ 0 == [01] ]]
    +_gitstatus_daemon_p9k_:53> ((  UID == EUID  ))
    +_gitstatus_daemon_p9k_:54> local home=/Users/trongtran
    +_gitstatus_daemon_p9k_:62> [[ -x /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd ]]
    +_gitstatus_daemon_p9k_:63> HOME=/Users/trongtran /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd -G v1.5.4 -s -1 -u -1 -d -1 -c -1 -m -1 -v DEBUG -t 20
    Version mismatch. Wanted (pattern): "v1.5.4". Actual: "v1.5.3".
    +_gitstatus_daemon_p9k_:64> local -i ret=11
    +_gitstatus_daemon_p9k_:65> [[ 11 == (0|129|130|131|137|141|143|159) ]]
    +_gitstatus_daemon_p9k_:68> ((  ! _gitstatus_zsh_downloaded  ))
    +_gitstatus_daemon_p9k_:69> [[ 1 == (|-|+)<1-> ]]
    +_gitstatus_daemon_p9k_:70> [[ /Users/trongtran/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd == /Users/trongtran/.cache/gitstatus/* ]]
    +_gitstatus_daemon_p9k_:71> return
    +_gitstatus_daemon_p9k_:84> local -i ret=1
    +_gitstatus_daemon_p9k_:85> zf_rm -f -- /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.lock /private/var/folders/7d/0n7jbgl905n_zhx1w4gtzs3m0000gn/T/gitstatus.POWERLEVEL9K.501.10228.1690533602.1.fifo
    +_gitstatus_daemon_p9k_:86> kill -- -10253

  System information:

    zsh:      5.9
    uname -a: Darwin Trongs-Mac-Studio.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64````
trongrg commented 1 year ago

speak too soon

the logs says Version mismatch. Wanted (pattern): "v1.5.4". Actual: "v1.5.3"

~/.yadr/zsh/prezto/modules/prompt/external/powerlevel10k/gitstatus/usrbin/gitstatusd --version shows v1.5.3

So I just delete the binary and let powerlevel10k download the new one.

Issue resolved

romkatv commented 1 year ago

So I just delete the binary and let powerlevel10k download the new one.

That's the way. Basically, if you compile the binary yourself (as I presume you've done in the past), then it's your responsibility to recompile it after updating the shell part of gitstatus. The error message says that the shell part is incompatible with the compiled binary.