zellij: Zellij crashing when making web request in plugin

Issue description

When I run a plugin that tries to make a HTTP request using the web_request command, it crashes zellij and the following error is outputted in the logs:

WARN   |zellij_utils::ipc        | 2023-12-28 11:29:29.029 [router    ] [zellij-utils/src/ipc.rs:223]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }) 
ERROR  |zellij_client            | 2023-12-28 11:29:29.030 [router    ] [zellij-client/src/lib.rs:356]: Received empty message from server 

Minimal reproduction

https://github.com/lannonbr/zellij-http-plugin-example

I’m running it by compiling the plugin with cargo build and then running it in an active zellij session with the zellij plugin command.

zellij plugin -- file:./target/wasm32-wasi/debug/zellij-http-plugin-example.wasm

Other relevant information

Zellij verison: 0.39.2

Rustc --version --verbose output:

rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: aarch64-apple-darwin
release: 1.74.0
LLVM version: 17.0.4

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 36 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@rcalimlim Thank you, that fixed it!

@kinsomicrote Can you confirm that you rebuilt zellij after installing the Apple Silicon version of curl? Truthfully, I’m a bit ignorant of the compilation/linking process for deps, but I’m pretty sure the issue is that your zellij is still using the bad curl because it was originally built/installed before you downloaded the correct curl binary.

I would try this:

  1. backup your zellij config (for me this is ~/$HOME/.config/zellij
  2. uninstall zellij using the package manager that you installed it with
  3. confirm once more that curl -V produced the correct Apple Silicon version
  4. download and build zellij from cargo with
cargo install zellij --locked
  1. try to reproduce the issue with this newly built version of zellij (hopefully this should fix it)

First @rcalimlim - I’m sorry for just now replying to this directly, I have been referring to your great comment above for a while. So first - thanks for looking into this! This has already helped quite a few people out of some trouble.

Second - @jaeheonji - do you think we can somehow pin the curl version as @rcalimlim suggested in the comment above? This has the effect of sometimes failing the http(s) request either when loading a plugin from the web or when performing an http(s) request from a plugin. I think I saw curl-sys has some sort of macos configuration parameter that might be related? If you have the time to look into this that would be great!!