Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install #72

Closed
rafaelrinaldi opened this issue Jun 19, 2024 · 16 comments
Closed

Unable to install #72

rafaelrinaldi opened this issue Jun 19, 2024 · 16 comments
Labels
bug Something isn't working cannot reproduce

Comments

@rafaelrinaldi
Copy link

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):

  • OS: macOS Sonoma 14.5
  • Zellij version v0.40.1

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

@rafaelrinaldi rafaelrinaldi added the bug Something isn't working label Jun 19, 2024
@dj95
Copy link
Owner

dj95 commented Jun 19, 2024

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
Copy link

PatschD commented Jun 20, 2024

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

@dj95
Copy link
Owner

dj95 commented Jun 20, 2024

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

@PatschD
Copy link

PatschD commented Jun 21, 2024

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

@dj95
Copy link
Owner

dj95 commented Jun 21, 2024

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
Copy link

PatschD commented Jun 21, 2024

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
Copy link
Owner

dj95 commented Jun 21, 2024

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
Copy link

PatschD commented Jun 21, 2024

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
Copy link

PatschD commented Jun 21, 2024

no permission request just error in plugin

@dj95
Copy link
Owner

dj95 commented Jun 21, 2024

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
Copy link

PatschD commented Jun 21, 2024

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
Copy link
Owner

dj95 commented Jun 21, 2024

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.

@dj95
Copy link
Owner

dj95 commented Jul 6, 2024

Found another issue within zellij, if multiple tabs are loaded in parallel without a cache zjstatus version.

@rafaelrinaldi It would be great if you can confirm that loading the plugin via file works.

@dj95
Copy link
Owner

dj95 commented Jul 19, 2024

As there's no response, I assume, that there is no further issue, when setting it via the file: protocol and will close the issue.

Feel free to add any details in case something is missing.

@dj95 dj95 closed this as completed Jul 19, 2024
@rafaelrinaldi
Copy link
Author

@dj95 I was finally able to revisit this and it still doesn't work. I have manually downloaded the wasm file and moved it to ~/dev/zjstatus.wasm with this config (under ~/.config/zellij/layouts/default.kdl):

layout {
  pane split_direction="vertical" {
    pane
  }

  pane size=1 borderless=true {
    plugin location="file:~/dev/zjstatus.wasm" {
      hide_frame_for_single_pane "true"

      format_left  "{mode}#[fg=#89B4FA,bg=#181825,bold] {session}#[bg=#181825] {tabs}"
      format_right "{command_kubectx}#[fg=#424554,bg=#181825]::{command_kubens}{datetime}"
      format_space "#[bg=#181825]"

      mode_normal          "#[bg=#89B4FA] "
      mode_tmux            "#[bg=#ffc387] "
      mode_default_to_mode "tmux"

      tab_normal               "#[fg=#6C7086,bg=#181825] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
      tab_active               "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} {fullscreen_indicator}{sync_indicator}{floating_indicator}"
      tab_fullscreen_indicator "□ "
      tab_sync_indicator       "  "
      tab_floating_indicator   "󰉈 "

      command_kubectx_command  "kubectx -c"
      command_kubectx_format   "#[fg=#6C7086,bg=#181825,italic] {stdout}"
      command_kubectx_interval "2"

      command_kubens_command  "kubens -c"
      command_kubens_format   "#[fg=#6C7086,bg=#181825]{stdout} "
      command_kubens_interval "2"

      datetime          "#[fg=#9399B2,bg=#181825] {format} "
      datetime_format   "%A, %d %b %Y %H:%M"
      datetime_timezone "Europe/Berlin"
    }
  }
}

Zellij renders but I see an error message at the bottom that says:

ERROR IN PLUGIN - check logs for more info

I can't seem to find where these logs are being stored. They're not being piped to stderr.

@dj95
Copy link
Owner

dj95 commented Aug 1, 2024

Hi @rafaelrinaldi

Can you see something in zellij log? It's somewhere hidden in /var.

Does the error on your side pop up before or after granting permissions to zjstatus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot reproduce
Projects
None yet
Development

No branches or pull requests

3 participants