tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.46k stars 115 forks source link

VSCodium Extension crashes when used on remote Linux host (glibc) due to old NodeJS #703

Open Link87 opened 3 days ago

Link87 commented 3 days ago

The VSCode Extension keeps crashing on my machine immediately after opening a toml file. It tries starting five times and eventually gives up. The output is as follows:

RuntimeError: unreachable
    at __rust_start_panic (wasm://wasm/065ed00a:wasm-function[63493]:0x12ec0f3)
    at rust_panic (wasm://wasm/065ed00a:wasm-function[56261]:0x12dbf09)
    at std::panicking::rust_panic_with_hook::h8e8556df5e46d2ff (wasm://wasm/065ed00a:wasm-function[20551]:0xfc8742)
    at std::panicking::begin_panic_handler::{{closure}}::h142b9f459ded72d9 (wasm://wasm/065ed00a:wasm-function[25954]:0x10c54f1)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h1c0d3278570375be (wasm://wasm/065ed00a:wasm-function[61550]:0x12e9f20)
    at rust_begin_unwind (wasm://wasm/065ed00a:wasm-function[42801]:0x12744d7)
    at core::panicking::panic_fmt::hbea4287e435ed8a3 (wasm://wasm/065ed00a:wasm-function[43645]:0x1280e86)
    at core::result::unwrap_failed::hee432a5bb1c04b28 (wasm://wasm/065ed00a:wasm-function[29393]:0x1141e8c)
    at core::result::Result<T,E>::expect::hd2a41b23557f815c (wasm://wasm/065ed00a:wasm-function[29516]:0x1145cd9)
    at ahash::random_state::get_fixed_seeds::{{closure}}::hd3a5a3ca69a6d0bf (wasm://wasm/065ed00a:wasm-function[2050]:0x77cd28)
[Error - 10:39:56 AM] Server process exited with code 1.
[Error - 10:39:56 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:39:56 AM] The Even Better TOML LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 10:39:56 AM] Even Better TOML LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:39:56 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

If the issue is within the ahash crate, maybe a dependency update is enough?

panekj commented 3 days ago

What version of extension and VSCode is used?

Link87 commented 3 days ago

I'm using VSCodium 1.95.3 and extension version 0.21.0.

panekj commented 3 days ago

A bit buggy here and there but it doesn't crash for me so I'm going to need more info and maybe you'll need to re-install extension, reload editor and make sure it's fully updated.

Link87 commented 2 days ago

Apparently the problem only occurs over SSH (with the "Open Remote - SSH" extension) with the latest version 0.21.0. Version 0.19.1 works over SSH and both versions work locally.

IzawGithub commented 1 day ago

Hello,

I'm getting the exact same stack trace and crash. Using VSCodium 1.95.3, Open Remote SSH 0.0.47, with Even Better TOML version 0.21 from OpenVSIX. Client and SSH machine are both Ubuntu 24.10.

The extension works fine when not using remote SSH, but crash when on remote. Reverting back to an older version works but I'm getting a bug where I can't select a schema 😅

I've also tried to install Taplo directly using Cargo and the current stable Rust (1.82), instead of using the embedded version, and I'm also getting the same problem.

No idea how to debug more since WASM doesn't seem to give very detailed stack trace, let me know if there are more ways I can help.

panekj commented 1 day ago

I can't do anything about it, vscodium-server for glibc is built with NodeJS 16 which is not supported, it has to be at least NodeJS 19 for working webCrypto

panekj commented 1 day ago

https://github.com/VSCodium/vscodium/blob/52601b91bf3262bede2e058476b44cb1883b2ea7/package_linux_reh.sh#L20