dj95 / zjstatus

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

zjstatus breaks zellij #87

Closed brandondrew closed 1 month ago

brandondrew commented 1 month ago

Describe the bug

Every attempt to use zjstatus has caused Zellij to fail to open, giving me the message "Received empty message from server".

To Reproduce

Steps to reproduce the behavior:

  1. Replace "zellij:status-bar" with "https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm" in config.kdl
  2. Start Zellij
  3. Observe message, and failure to open.

Here's what the plugin section of your configuration will look like after the change described above:

plugins {
  tab-bar         location="zellij:tab-bar"
  // status-bar      location="zellij:status-bar"
  status-bar      location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm"
  strider         location="zellij:strider"
  compact-bar     location="zellij:compact-bar"
  session-manager location="zellij:session-manager"
  welcome-screen  location="zellij:session-manager" {
    welcome_screen true
  }
  filepicker      location="zellij:strider" {
    cwd "/"
  }
}

Expected behavior

I expected Zellij to open with the new status bar.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Layout

There's no layout to show, because Zellij fails to open.

dj95 commented 1 month ago

Hi and thanks for your bug report.

Have you tried loading zjstatus from file? Loading it via https (especially on macOS) is in my experience unreliable in zellij. That's why I added warnings for the https locations into the documentation.

When the crash is before the permission prompt, it is a bug in zellij itself and I cannot really do much about it on the zjstatus side. AFAIK there's a change in the http client in the next release. Maybe this one will help to make it more reliable.

brandondrew commented 1 month ago

Thanks for your response!

I tested with a manually downloaded wasm file, and with a more detailed configuration for zjstatus, and it worked perfectly. So perhaps the problem is with Zellij's built-in downloading 🤷🏼‍♂️.