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

"Received empty message from server" for Ctrl+h, Ctrl+j and Ctrl+l #3319

Closed
b0lle opened this issue May 3, 2024 · 7 comments
Closed

"Received empty message from server" for Ctrl+h, Ctrl+j and Ctrl+l #3319

b0lle opened this issue May 3, 2024 · 7 comments

Comments

@b0lle
Copy link

b0lle commented May 3, 2024

2. Issues with the Zellij UI / behavior / crash

Issue description

When binding Ctrl+h, Ctrl+j and Ctrl+l to the vim-zellij-navigator plugin with

keybinds {
    shared_except "locked" {
        bind "Ctrl h" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/latest/download/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "left";
            };
        }

        bind "Ctrl j" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/latest/download/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "down";
            };
        }

        bind "Ctrl k" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/latest/download/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "up";
            };
        }

        bind "Ctrl l" {
            MessagePlugin "https://github.com/hiasr/vim-zellij-navigator/releases/latest/download/vim-zellij-navigator.wasm" {
                name "move_focus";
                payload "right";
            };
        }
    }
}

I receive

Received empty message from server 

Minimal reproduction

Install the plugin, as mentioned above.

Other relevant information

zellij v0.40.1
MacOS Sonoma v14.0

zellij log

ERROR  |zellij::sessions         | 2024-05-03 11:37:49.337 [main      ] [src/sessions.rs:90]: Failed to read session_info cache folder: ""/Users/julianfrenzel/Library/Caches/org.Zellij-Contributors.Zellij/0.40.1/session_info"": Os { code: 2, kind: NotFound, message: "No such file or directory" } 
ERROR  |zellij::sessions         | 2024-05-03 11:37:49.338 [main      ] [src/sessions.rs:90]: Failed to read session_info cache folder: ""/Users/julianfrenzel/Library/Caches/org.Zellij-Contributors.Zellij/0.40.1/session_info"": Os { code: 2, kind: NotFound, message: "No such file or directory" } 
INFO   |zellij_client            | 2024-05-03 11:37:49.338 [main      ] [zellij-client/src/lib.rs:178]: Starting Zellij client! 
INFO   |zellij_server            | 2024-05-03 11:37:49.352 [main      ] [zellij-server/src/lib.rs:284]: Starting Zellij server! 
ERROR  |zellij_client::stdin_ansi| 2024-05-03 11:37:49.411 [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" } 
WARN   |zellij_server::route     | 2024-05-03 11:37:49.412 [server_router] [zellij-server/src/route.rs:1037]: Server not ready, trying to place instruction in retry queue... 
INFO   |zellij_server            | 2024-05-03 11:37:49.413 [main      ] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift 
INFO   |zellij_server::plugins   | 2024-05-03 11:37:49.413 [wasm      ] [zellij-server/src/plugins/mod.rs:203]: Wasm main thread starts 
WARN   |zellij_utils::input::layo| 2024-05-03 11:37:49.414 [wasm      ] [zellij-utils/src/input/layout.rs:105]: Overriding plugin alias 
WARN   |zellij_utils::input::layo| 2024-05-03 11:37:49.414 [wasm      ] [zellij-utils/src/input/layout.rs:105]: Overriding plugin alias 
INFO   |zellij_server::plugins::p| 2024-05-03 11:37:49.800 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:574]: Compiled plugin 'tab-bar' in 376.400458ms 
INFO   |zellij_server            | 2024-05-03 11:37:49.800 [async-std/runti] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift 
WARN   |zellij_server::route     | 2024-05-03 11:37:49.926 [server_router] [zellij-server/src/route.rs:1138]: Server ready, retrying sending instruction. 
INFO   |zellij_server::plugins::p| 2024-05-03 11:37:50.239 [async-std/runti] [zellij-server/src/plugins/plugin_loader.rs:574]: Compiled plugin 'status-bar' in 444.584791ms 
INFO   |zellij_server            | 2024-05-03 11:37:50.239 [async-std/runti] [zellij-server/src/lib.rs:1068]: Compiling plugins using Cranelift 
WARN   |zellij_utils::ipc        | 2024-05-03 11:37:52.377 [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-05-03 11:37:52.377 [router    ] [zellij-client/src/lib.rs:375]: Received empty message from server 

There was already a discussion with the owner of the plugin here, which mentioned that this could be a zellij issue.

@imsnif
Copy link
Member

imsnif commented May 3, 2024

Hey, I'm not reproducing this. Not saying it's not an issue, but saying I might need some more info. Have you tried in other terminals? Does this happen on startup? Just when you press the key?

@b0lle
Copy link
Author

b0lle commented May 3, 2024

Hey, I tested with iTerm2 and warp. It happens when I press the mentioned keys. In fact it also happen with ctrl+k, but all other ctrl commands works as expected.

@imsnif
Copy link
Member

imsnif commented May 3, 2024

Does it happen if you bind these keys to something else? Not a MessageToPlugin just anything else. Does it happen if you download the plugins and bind these keys to the same thing but with a file:/path/to/my/plugin.wasm url instead?

@b0lle
Copy link
Author

b0lle commented May 3, 2024

Ok I binded the keys to other functions, which worked:
bind "Ctrl j" { SwitchToMode "Session"; }

I also downloaded the plugin and changed the reference to local

        bind "Ctrl l" { MessagePlugin "/Users/julianfrenzel/Downloads/vim-zellij-navigator.wasm" {
            name "move_focus";
            payload "right";
        }; 
        }
        bind "Ctrl h" { MessagePlugin "/Users/julianfrenzel/Downloads/vim-zellij-navigator.wasm" {
            name "move_focus";
            payload "left";
        }; 
        }

At least this didnt cause my error.
Seems to be related to the download of the plugin ...

@imsnif
Copy link
Member

imsnif commented May 3, 2024

At least this didnt cause my error. Seems to be related to the download of the plugin ...

Didn't cause your error but I guess also didn't work? I think you need to prefix this with file:, as in file:/Users/...

@imsnif
Copy link
Member

imsnif commented May 3, 2024

My guess btw is that it will work with the file: url and that this is a build issue, specifically: #3036 (comment)

If it works with the file: URL, you can follow the instructions in the issue or download the precompiled Zellij version from the release.

@b0lle
Copy link
Author

b0lle commented May 3, 2024

True, it didn´t work. After adding the "file:" prefix, it worked as expected.
Thank you very much for your kind support. I will have a look into #3036 and going to sponsor your project. Zellij is just awesome and I appreciate your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants