dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
489 stars 9 forks source link

Plugin errors out after updating to zellij 0.41 and persists after a rollback to zellij 0.40 #54

Closed BigJayToDaIzo closed 6 months ago

BigJayToDaIzo commented 6 months ago

Describe the bug In attempting to assist a zellij user reproduce a possible bug I cloned and built zellij 0.41 from source. Upon loading the plugin errors out using both automatic and manual installation methods (https: & file:)

To Reproduce Steps to reproduce the behavior:

  1. Exit zellij, delete cache and do cargo uninstall zellij.
  2. clone zellij repo, build zellij 0.41 from source and install it with cargo
  3. load zellij with my configs layout that contains the tab template with my zjstatus configuration
  4. plugin errors out and tells me to check logs image I was unable to find any logs in /var/logs, ~/.config/zellij/plugins or its parent. Unsure where else I could look.

Expected behavior Expect plugin to load in status bar

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

How does the layout look like? Please copy it into a code block.

layout {
  default_tab_template {
    children
    pane size=1 borderless=true {
      plugin location="http://github.com/dj95/zjstatus/releases/download/v0.14./zjstatus.wasm" {
        format_left   "{mode} #[fg=#89b4fa,bold]{session}"
        format_center "{tabs}"
        format_right  "{command_git_branch} {datetime}{notifications}"
        format_space  ""

        border_enabled  "false"
        border_char     "─"
        border_format   "#[fg=#6c7086]{char}"
        border_position "top"

        notification_format_unread           "#[fg=#89b4fa,bg=#181825,blink]  #[fg=#89b4fa,bg=#181825] {message} "
        notification_format_no_notifications "#[fg=#89b4fa,bg=#181825,dim]   "
        notification_show_interval           "10"

        hide_frame_for_single_pane "true"

        mode_normal  "#[fg=#CF142B,bg=green]  UNLOCKED "
        mode_locked "#[bg=#CF142B]  LOCKED "
        mode_session "#[fg=#333333,bg=green] 🖳 {name} "
        mode_resize "#[fg=#333333,bg=#FF6700]  {name} "
        mode_pane "#[fg=#333333,bg=green]  {name} "
        mode_tab "#[fg=#333333,bg=green] ⭾ {name} "
        mode_scroll "#[fg=#333333,bg=green] 󰭜 {name} "
        mode_enter_search "#[fg=#333333,bg=green]  {name} "
        mode_search "#[fg=#333333,bg=green]  {name} "
        mode_rename_tab "#[fg=#333333,bg=#FF6700] ⭾ {name} "
        mode_rename_pane "#[fg=#333333,bg=#FF6700]  {name} "
        mode_move "#[fg=#333333,bg=green]  {name} "
        mode_prompt "#[fg=#333333,bg=green]  {name} "
        mode_default_to_mode "locked"

        tab_normal   "#[fg=#6C7086] {index}::{name} "
        tab_normal_fullscreen "#[fg=#6C7086] {index}::{name}  "
        tab_normal_sync "#[fg=#6C7086] {index}::{name}  "

        tab_active   "#[fg=#89B4FA,bold,italic] {name} "
        tab_active_fullscreen "#[fg=#89B4FA,bold,italic] {name}  "
        tab_active_sync "#[fg=#89B4FA,bold,italic] {name}  "

        tab_separator "#[fg=#89B4FA]❯"

        command_git_branch_command     "git rev-parse --abbrev-ref head"
        command_git_branch_format      "#[fg=blue] {stdout} "
        command_git_branch_interval    "10"
        command_git_branch_rendermode  "static"

        datetime        "#[fg=#89b4fa,bold] {format} "
        datetime_format "%A, %d %b %Y %H:%M"
        datetime_timezone "America/Chicago"
      }
    }
  }
  tab name="Overview" focus=true cwd="~/.config/" {
    pane split_direction="horizontal" {
      pane {
        size "75%"
        focus true
        borderless true
        command "nvim"
      }
      pane 
    }
  }
  tab name="Neovim" cwd="~/.config/nvim" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "init.lua"
      }
      pane 
    }
  }
  tab name="Fish Shell" cwd="~/.config/fish" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "config.fish"
      }
      pane 
    }
  }
  tab name="Hyprland" cwd="~/.config/hypr" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "hyprland.conf"
      }
      pane 
    }
  }
  tab name="Kitty" cwd="~/.config/kitty" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "kitty.conf"
      }
      pane 
    }
  }
  tab name="Starship" cwd="~/.config/starship" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "starship.toml"
      }
      pane 
    }
  }
  tab name="Waybar" cwd="~/.config/waybar" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
        args "config"
      }
      pane 
    }
  }
  tab name="Yazi" cwd="~/.config/yazi" {
    pane split_direction="horizontal" {
      pane {
        start_suspended true
        size "75%"
        focus true
        borderless true
        command "nvim"
      }
      pane 
    }
  }
}

Additional context Add any other context about the problem here. Other plugins from the ecosystem continue to work and seem uneffected by the attempted upgrade and rollback. Plugins checked: image

imsnif commented 6 months ago

Any chance for a minimal reproduction? :)

BigJayToDaIzo commented 6 months ago

I managed to make a mess out of my cache and some rogue plugin path was botching things all up. Many thanks for the guidance!

olekspickle commented 4 months ago

Hey! Care to post a remedy? Getting the same thing with zj v0.40.0 Clearing .cache/zellij/* doesn't seem to help

BigJayToDaIzo commented 4 months ago

Hey! Care to post a remedy? Getting the same thing with zj v0.40.0 Clearing .cache/zellij/* doesn't seem to help

There isn't really a remedy except to remove the http protocol for now. Or ensure when you try to load a plugin with the http protocol, you don't have multiple tabs/panes also using the protocol. https://github.com/zellij-org/zellij/issues/3479

I'm nearly certain it's being worked on, but don't hold your breath and you'd probably do yourself a real favor and just use file protocol and manually update for now.

If you REALLY want to stick to http, you can TRY to load a layout with only a single tab / plugin install / perms check attempt FIRST after clearing your cache. Let the plugin install, and give it perms, then it seems to be safe to load the other ones. They seem to grab the cached local wasm instead of trying all the parallel downloading/installing that seems to break everything.

olekspickle commented 4 months ago

no I mean I see this error even with local file:/ route #78

BigJayToDaIzo commented 4 months ago

no I mean I see this error even with local file:/ route #78

My issue was with using the http protocol. If you aren't, my guess is you aren't getting the cache cleaned properly. Make sure you LOOK in the directory after you delete it. If you have other sessions running you will NOT actually clear the cache as your open sessions will rewrite it immediately (or near so). Make sure all zellij processes are closed. Double check all cache is deleted. Make sure you reboot your machine after you confirm your cache is clear. And if that doesn't get it done I cant offer any other advice than to submit an issue or try to get help on the Zellij discord.

Cheers!

dj95 commented 4 months ago

For the sake of completeness, problem with

Hey! Care to post a remedy? Getting the same thing with zj v0.40.0 Clearing .cache/zellij/* doesn't seem to help

was, that the download via curl wrote an empty file caused by a redirect from GitHub. Downloading with wget or curl -L resolved the issue.