rustowl icon indicating copy to clipboard operation
rustowl copied to clipboard

RustOwl toolchain setup failed (exit code 1)

Open gerard-ryan-immersaview opened this issue 6 months ago • 1 comments

Bug Description

When launching the default cargo project, I get: Image

Environment

  • OS: Windows 11 and WSL Ubuntu 24.04.2 LTS
  • rustc: 1.86.0 (05f9846f8 2025-03-31)
  • rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
  • RustOwl: 0.3.2
  • Editor: VSCode WSL remote

gerard-ryan-immersaview avatar May 13 '25 02:05 gerard-ryan-immersaview

Running the following showed me the information I likely need to fix my issue, it'd be nice if it were more accessible

$HOME/.vscode-server/data/User/globalStorage/cordx56.rustowl-vscode/rustowl toolchain install

This is probably more a feature request rather than a bug at this point

gerard-ryan-immersaview avatar May 13 '25 02:05 gerard-ryan-immersaview

Each time I launch a rust project in vscode, rustowl will download a new rustowl toolchain. Is it normal?

chiiydd avatar Jun 12 '25 08:06 chiiydd

Each time I launch a rust project in vscode, rustowl will download a new rustowl toolchain. Is it normal?

Not. Please tell me what environment you use.

cordx56 avatar Jun 12 '25 09:06 cordx56

Not. Please tell me what environment you use.

I just close the project, and open it again in vscode. It will setup RustOwl toolchain, and start downloading. Image

I try downloading the toolchain in command.

rustowl toolchain install 

But it doesn't work.

Environment

  • OS: Arch Linux x86_64
  • rustc 1.87.0 (17067e9ac 2025-05-09)
  • rustup 1.28.2 (2025-06-02)
  • RustOwl v0.3.4 (from aur rustowl-bin)
  • vscode 1.100.3

chiiydd avatar Jun 12 '25 10:06 chiiydd

It seems there is a problem with the rustowl-bin repo. @MuntasirSZN Please investigate the cause of this problem after you get fine.

cordx56 avatar Jun 12 '25 12:06 cordx56

@chiiydd Thanks for reporting. To verify, can you go to a rust project, run rustowl check, and share some logs from start? In the logs, it will say if rustowl found it, or not, or something else.

MuntasirSZN avatar Jun 12 '25 15:06 MuntasirSZN

Is there a folder in home directory named rustowl-runtime?

MuntasirSZN avatar Jun 12 '25 15:06 MuntasirSZN

@chiiydd Thanks for reporting. To verify, can you go to a rust project, run rustowl check, and share some logs from start? In the logs, it will say if rustowl found it, or not, or something else.

@MuntasirSZN Thanks for reply. The logs are as follows.

 ~/repository/test-proj ❯ rustowl check                                                                       
2025-06-12T16:20:43.064Z INFO  [rustowl::lsp::backend] add /home/chiiydd/repository/test-proj to watch list
2025-06-12T16:20:43.065Z INFO  [rustowl::lsp::backend] wait 100ms for rust-analyzer
2025-06-12T16:20:43.166Z INFO  [rustowl::lsp::backend] stop running analysis processes
2025-06-12T16:20:43.166Z INFO  [rustowl::lsp::backend] start analysis
2025-06-12T16:20:43.229Z INFO  [rustowl::lsp::backend] clear cargo cache
2025-06-12T16:20:43.434Z INFO  [rustowl::toolchain] rustc_driver found: /home/chiiydd/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-9c23edfdcf82221e.so
2025-06-12T16:20:43.435Z INFO  [rustowl::toolchain] select sysroot dir from rustup installed: /home/chiiydd/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
2025-06-12T16:20:43.435Z INFO  [rustowl::lsp::backend] using default cargo
2025-06-12T16:20:43.435Z INFO  [rustowl::toolchain] rustowlc is selected in the same directory as rustowl executable
2025-06-12T16:20:43.567Z INFO  [rustowl::toolchain] rustc_driver found: /home/chiiydd/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-9c23edfdcf82221e.so
2025-06-12T16:20:43.567Z INFO  [rustowl::lsp::backend] start checking /home/chiiydd/repository/test-proj
    Checking test-proj v0.1.0 (/home/chiiydd/repository/test-proj)
2025-06-12T16:20:43.642Z INFO  [rustowlc::core] start borrowck of DefId(0:3 ~ test_proj[0218]::main)
2025-06-12T16:20:43.642Z INFO  [rustowlc::core] start borrowck of DefId(0:3 ~ test_proj[92df]::main)
2025-06-12T16:20:43.642Z INFO  [rustowlc::core::analyze] facts of DefId(0:3 ~ test_proj[92df]::main) prepared; start analyze of DefId(0:3 ~ test_proj[92df]::main)
2025-06-12T16:20:43.642Z INFO  [rustowlc::core::analyze] facts of DefId(0:3 ~ test_proj[0218]::main) prepared; start analyze of DefId(0:3 ~ test_proj[0218]::main)
2025-06-12T16:20:43.644Z INFO  [rustowlc::core] borrow checked: 1 / 1
2025-06-12T16:20:43.644Z INFO  [rustowlc::core::analyze] start re-computing borrow check with dump: true
2025-06-12T16:20:43.644Z INFO  [rustowlc::core::analyze] borrow check finished
2025-06-12T16:20:43.644Z INFO  [rustowlc::core] borrow checked: 1 / 2
2025-06-12T16:20:43.644Z INFO  [rustowlc::core::analyze] start re-computing borrow check with dump: true
2025-06-12T16:20:43.644Z INFO  [rustowlc::core] start borrowck of DefId(0:4 ~ test_proj[92df]::main#1)
2025-06-12T16:20:43.644Z INFO  [rustowlc::core::analyze] borrow check finished
2025-06-12T16:20:43.646Z INFO  [rustowlc::core::analyze] facts of DefId(0:4 ~ test_proj[92df]::main#1) prepared; start analyze of DefId(0:4 ~ test_proj[92df]::main#1)
2025-06-12T16:20:43.646Z INFO  [rustowlc::core] borrow checked: 2 / 2
2025-06-12T16:20:43.646Z INFO  [rustowlc::core::analyze] start re-computing borrow check with dump: true
2025-06-12T16:20:43.646Z INFO  [rustowlc::core::analyze] borrow check finished
2025-06-12T16:20:43.650Z INFO  [rustowlc::core] analyzed one item of /home/chiiydd/repository/test-proj/src/main.rs
2025-06-12T16:20:43.650Z INFO  [rustowlc::core] analyzed one item of /home/chiiydd/repository/test-proj/src/main.rs
2025-06-12T16:20:43.650Z INFO  [rustowlc::core] analyzed one item of /home/chiiydd/repository/test-proj/src/main.rs
2025-06-12T16:20:43.655Z INFO  [rustowl::lsp::backend] 1 crates checked                                                                       
2025-06-12T16:20:43.656Z INFO  [rustowl::lsp::backend] 2 crates checked    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s

2025-06-12T16:20:43.658Z INFO  [rustowl::lsp::backend] check finished
2025-06-12T16:20:43.658Z INFO  [rustowl] Successfully analyzed

Is there a folder in home directory named rustowl-runtime?

No, the directory rustowl-runtime is located in /usr/bin. I changed the permissions of the /usr/bin/rustowl-runtime directory to allow the toolchain to install properly.

Perhaps the problem is that RUSTOWL_RUNTIME_DIRS is not set. I didn't find any environment variables related to rustowl.

chiiydd avatar Jun 12 '25 16:06 chiiydd

@chiiydd I suspect that the rustowl command version does not correspond to the VS Code extension version. Can you tell me about each of the two versions?

cordx56 avatar Jun 13 '25 02:06 cordx56

@chiiydd I suspect that the rustowl command version does not correspond to the VS Code extension version.

@cordx56 I tried both the version from the extension marketplace and the one built from source . The issue persists in both cases.

Below is the version I installed from the extension marketplace.

VS Code Extension version

  • Identifier: cordx56.rustowl-vscode
  • Version : 0.3.4
  • Last Updated : 2025-06-13, 10:47:49
  • Size : 465.83KB

RustOwl: v0.3.4

chiiydd avatar Jun 13 '25 14:06 chiiydd

@chiiydd can you share the result of running rustowl --version -q?

cordx56 avatar Jun 17 '25 10:06 cordx56

@cordx56 The version is exactly v0.3.4 .

 ~ ❯ rustowl --version -q                                                                                                      
v0.3.4
~ ❯ rustowl --version                                                                                                         
RustOwl v0.3.4

chiiydd avatar Jun 17 '25 15:06 chiiydd

🤖 Bot: Issue has not seen activity in 30 days and will therefore be marked as stale. It will be closed in 7 days if no further response is found.

github-actions[bot] avatar Jul 19 '25 07:07 github-actions[bot]

bump

gerard-ryan-immersaview avatar Jul 21 '25 02:07 gerard-ryan-immersaview

I have the same problem, I installed rustowl-bin and when I start VS Code I get this error

UPDATE:

I managed to solve the problem, I tried running the rustowl toolchain install command and got an error

2025-07-26T09:31:28.313Z INFO  [rustowl::toolchain]  99% received
2025-07-26T09:31:28.400Z INFO  [rustowl::toolchain] 100% received
2025-07-26T09:31:28.400Z INFO  [rustowl::toolchain] download finished
2025-07-26T09:31:28.400Z ERROR [rustowl::toolchain] failed to create toolchain directory

I thought that there were problems with the rights, so I ran this command with sudo and after that everything was installed correctly, I started VSCode and everything works!

@gerard-ryan-immersaview maybe you should try my solution?

Mauladen avatar Jul 26 '25 09:07 Mauladen

I am on newest VS Code, and had it fail multiple times at 98% from the command line: $HOME/.vscode-server/data/User/globalStorage/cordx56.rustowl-vscode/rustowl toolchain install I am behind a proxy though.. but I just saw the filename and used: wget https://github.com/cordx56/rustowl/releases/download/v0.3.4/rustowl-x86_64-unknown-linux-gnu.tar.gz. I unzipped into the directory from the command line, and it works fine..

It MAY have something to do with your HTTP client code? I am not positive.. just giving information about my experience..

mikeggh avatar Jul 28 '25 01:07 mikeggh

Hi @mikeggh, it happens because we had default-features = false and this disabled system-proxy in reqwest, this gets a fix in #352. Also enabled socks if anyone uses it....

MuntasirSZN avatar Jul 28 '25 07:07 MuntasirSZN

For me, this Issue was about the quality of the error code, not the specific error. Providing some kind of detailed error in the UI would be my preference, but a link to a log file would also work.

Otherwise, this issue will be about every possible error that may occur.

gerard-ryan-immersaview avatar Aug 01 '25 05:08 gerard-ryan-immersaview

🤖 Bot: Issue has not seen activity in 30 days and will therefore be marked as stale. It will be closed in 7 days if no further response is found.

github-actions[bot] avatar Sep 10 '25 07:09 github-actions[bot]

Use cargo-binstall instead

stokesaidan420-arch avatar Oct 10 '25 22:10 stokesaidan420-arch