smallcloudai / refact-vscode

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for VS Code
https://refact.ai
BSD 3-Clause "New" or "Revised" License
59 stars 19 forks source link

[VS Code] Error: The RUST LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. #83

Closed avk1702 closed 5 months ago

avk1702 commented 5 months ago

Hello, after installing Refact.ai v2.0.118 in Visual Studio Code 1.74.3, Windows 10 22H2 the following messages are displayed: The RUST LSP server crashed 5 times in the last 3 minutes. The server will not be restarted.

A request has failed. See the output for more information.

Connection to server got closed. Server will restart. [Info - 6:12:16 PM] Connection to server got closed. Server will restart. [Info - 6:12:16 PM] Connection to server got closed. Server will restart. [Error - 6:12:17 PM] Connection to server got closed. Server will not be restarted. Refact.ai is not working. How to fix it?

olegklimov commented 5 months ago

Hi @avk1702 , can you find any logs here:

tail -f -n 1000 ~/.cache/refact/logs/rustbinary.2024-01-12

? If there's nothing, maybe you can find anything useful in VS Code: "Help" / "Toggle Developer Tools" / "Console" ? Another thing to try: find refact-lsp executable, it's ./.vscode/extensions/smallcloud.codify-2.0.119-darwin-arm64/assets/refact-lsp on my computer, and just try to run it, for example with "--help", will it run at all?

olegklimov commented 5 months ago

Thanks for reporting!

avk1702 commented 5 months ago

Hello. I am attaching screenshots. log screen

olegklimov commented 5 months ago

Awesome! Thank you for reporting!

smallcloudai-bountybot commented 5 months ago

Possible fix:

[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = ["-C", "target-feature=+crt-static"]
avk1702 commented 5 months ago

Hello. Where and how to fix the above?

reymondzzzz commented 5 months ago

Hi! I made fix for that https://github.com/smallcloudai/refact-lsp/commit/b8cf282d0cae33f158dc87463c221b2a941bdc04 ... So I think new version of plugin will be in few days

avk1702 commented 5 months ago

Hello, thanks, I'll wait

olegklimov commented 5 months ago
image

Hi @avk1702 , can you please test this version, it should fix the dll problem.

olegklimov commented 5 months ago

2.0.120

avk1702 commented 5 months ago

Hello. I installed version 2.0.120. The error disappeared. Refact.ai works. Thank you very much

olegklimov commented 5 months ago

Don't forget to give us a 5-star rating if you like the product!

https://marketplace.visualstudio.com/items?itemName=smallcloud.codify