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
- home: add curl for https://github.com/zellij-org/zellij/issues/3036#issuecomment-2024214955 — committed to ascandella/dotfiles by ascandella 2 years ago
@rcalimlim Thank you, that fixed it!
@kinsomicrote Can you confirm that you rebuilt
zellijafter installing the Apple Silicon version ofcurl? Truthfully, I’m a bit ignorant of the compilation/linking process for deps, but I’m pretty sure the issue is that yourzellijis still using the badcurlbecause it was originally built/installed before you downloaded the correct curl binary.I would try this:
zellijconfig (for me this is~/$HOME/.config/zellijcurl -Vproduced the correct Apple Silicon versioncargowithFirst @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
curlversion 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!!