0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

急にCursorからWSLに繋がらなくなった件

Last updated at Posted at 2025-03-18

背景

普段通りCursorでWSLを立ち上げようとしたところ、失敗した。なんか左下の >< GitHub とか表示されるところに、△WSL: Ubuntu-24.024から切断されました と表示されている。

スクリーンショット 2025-02-17 212229.png

なお、その状態でもターミナルからwslに入ることはできた。

エラー内容

ログを確認する:

Filesync
[error] Failed to fetch fsConfig File sync is disabled

FileSyncに関するエラー。WSLの直接の問題ではない。

ウィンドウ
[error] No remote extension installed to resolve wsl.:
CodeExpectedError: No remote extension installed to resolve wsl.

WSL を扱う Remote - WSL 拡張機能がインストールされていない か、正常に動作していない。

ターミナル
[warning]
RemoteTerminalBackend#getTerminalLayoutInfo Error
["No remote extension installed to resolve wsl."]

ターミナルが WSL に接続できない理由として、WSL のリモート環境がセットアップされていない。

リモートトンネルサービス
[error] Missing 'tunnelApplicationConfig' or 'tunnelApplicationName' in product.json. Remote tunneling is not available.

Remote トンネル (リモート開発用の接続機能) が壊れている可能性。

解決策

Remote -WSL拡張を再インストール

  1. Remote - WSLをアンインストール
  2. Cursorを再起動
  3. Remote -WSLをインストール
  4. WSLに接続

ここで接続に成功した。

Ref

ChatGPT にエラー内容全部投げて質問した。
Remote -WSLをアンストして再インストールは一度やったが、成功したときは一々Cursorの再起動したからそれのお陰だと思う。

たぶんエラーログにあったとおりWSL拡張機能が正常に動作してなかったんだと思う。

~/.vscode-remote-containers/dist$ la
vscode-remote-containers-server-0.385.0.js
vscode-remote-containers-server-0.394.0.js

上記コマンドを試してみると、vscode-remote-containers-server-0/XXX.0.js が失敗したときは2種類あった。正常に動いているときは1つだけだったので、このファイルが競合したかも。

WSLが動かなくなると困るので、また今度同じようなエラーが発生したら試してみることにする。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?