dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
358 stars 6 forks source link

Unable to install #72

Open rafaelrinaldi opened 2 weeks ago

rafaelrinaldi commented 2 weeks ago

Describe the bug I am unable to install the plugin.

With an empty configuration file, if I just add the default layout file as suggested in the readme, I am unable to open Zellij and see a "Received empty message from server" message.

To Reproduce Steps to reproduce the behavior:

  1. Empty Zellij config to ensure nothing is interfering with plugin installation
  2. Copy and paste layout code into layouts/default.kdl
  3. Run zellij -s test in the terminal
  4. See error: "Received empty message from server" message

Expected behavior Zellij opens normally and I am able to see a status bar rendered by zjstatus.

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

Desktop (please complete the following information):

Layout

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="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" {
        format_left   "{mode} #[fg=#89B4FA,bold]{session}"
        format_center "{tabs}"
        format_right  "{command_git_branch} {datetime}"
        format_space  ""

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

        hide_frame_for_single_pane "true"

        mode_normal  "#[bg=blue] "
        mode_tmux    "#[bg=#ffc387] "

        tab_normal   "#[fg=#6C7086] {name} "
        tab_active   "#[fg=#9399B2,bold,italic] {name} "

        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=#6C7086,bold] {format} "
        datetime_format "%A, %d %b %Y %H:%M"
        datetime_timezone "Europe/Berlin"
      }
    }
  }
}

Additional context N/A

dj95 commented 2 weeks ago

Hi and thanks for the bug report.

Can you please try to load zjstatus via file? On macOS the https locations sometimes seem to be buggy.

PatschD commented 1 week ago

get the same error on macos, even when i load a file

dj95 commented 1 week ago

Have you also tried to clean the cache? What does the logs of zellij say?

PatschD commented 1 week ago

do you know where the logs are located on macos? i cleared cache and that didnt help

dj95 commented 1 week ago

You'll find the details here: https://zellij.dev/documentation/plugin-api-logging.html?highlight=logs#plugin-api---logging

Which version of zjstatus do you use? Unfortunately I cannot reproduce the issue on 2 MacBooks.

PatschD commented 1 week ago

ERROR |zellij_server::plugins | 2024-06-21 14:50:47.736 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:51:48.083 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:52:48.415 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:53:48.752 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:54:49.061 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:55:49.376 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:56:49.684 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:57:49.969 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:58:50.280 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 14:59:50.605 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 15:00:50.927 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 15:01:51.242 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 15:02:51.538 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 15:03:51.817 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found ERROR |zellij_server::plugins | 2024-06-21 15:04:52.095 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found INFO |zellij_client | 2024-06-21 15:05:10.737 [main ] [zellij-client/src/lib.rs:178]: Starting Zellij client! INFO |zellij_server | 2024-06-21 15:05:10.751 [main ] [zellij-server/src/lib.rs:284]: Starting Zellij server! ERROR |zellij_client::stdin_ansi| 2024-06-21 15:05:10.809 [stdin_handler] [zellij-client/src/stdin_ansi_parser.rs:124]: Failed to open STDIN cache file: Os { code: 2, kind: NotFound, message: "No such file or directory" } INFO |zellij_server | 2024-06-21 15:05:10.808 [main ] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift INFO |zellij_server::plugins | 2024-06-21 15:05:10.809 [wasm ] [zellij-server/src/plugins/mod.rs:203]: Wasm main thread starts WARN |zellij_utils::ipc | 2024-06-21 15:05:10.832 [router ] [zellij-utils/src/ipc.rs:226]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }) ERROR |zellij_client | 2024-06-21 15:05:10.832 [router ] [zellij-client/src/lib.rs:375]: Received empty message from server ERROR |zellij_server::plugins | 2024-06-21 15:05:52.428 [wasm ] [zellij-server/src/plugins/mod.rs:784]: Plugin with id: 0 not found

dj95 commented 1 week ago

After you've cleared the cache, does the permission request pop up? Does the error occur before the permissions or after you've granted them?

Which zjstatus version are you using?

PatschD commented 1 week ago
image image

layout { default_tab_template { children pane size=1 borderless=true { plugin location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" { format_left "#[fg=0,bg=10][{session}] {tabs}" format_right "#[fg=0,bg=10]{mode}" format_space "#[bg=10]"

            mode_normal        "{name} "
            mode_tmux          "{name} "
            mode_locked        "{name} "
            mode_resize        "{name} "
            mode_pane          "{name} "
            mode_tab           "{name} "
            mode_scroll        "{name} "
            mode_enter_search  "{name} "
            mode_search        "{name} "
            mode_rename_tab    "{name} "
            mode_rename_pane   "{name} "
            mode_session       "{name} "
            mode_move          "{name} "

            tab_normal   "{index}:{name}  "
            tab_active   "{index}:{name}* "
        }
    }
}

}

PatschD commented 1 week ago

no permission request just error in plugin

dj95 commented 1 week ago

Please do not use https as location. Please download it and use the file location with an absolute path like.

plugin location="file:/home/username/Download/zjstatus.wasm" {

https locations are bugged in zellij on macOS and won't work properly. You're experiencing download issues.

PatschD commented 1 week ago

indeed this works! thanks. i initially tried it with local file but i added an additional dot. i copied from your docs:

image

as

file:./path

rather than

file:/path
dj95 commented 1 week ago

Switched it now to ~/path/, such that it will be able to load the file relative to the home directory. Relative path's also work, but I guess only when you open zellij near the layout kdl file.