wslbridge: Does not work with WSL 2

Was working perfectly, but just updated windows to the latest insider build for WSL 2 support

C:\Users\3vilp\ver

Microsoft Windows [Version 10.0.18917.1000]
C:\Users\3vilp\AppData\Local\wsltty\bin>wslbridge.exe
wslbridge error: failed to start backend process
note: backend error output: wslbridge-backend: wslbridge-backend.cc:45: int {anonymous}::connectSocket(int, const string&): Assertion `connectRet == 0' failed.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 27
  • Comments: 22

Most upvoted comments

A different error occur on WSL 2 with Windows 10 18945.1001.

C:\Users\brigh\AppData\Local\wsltty\bin>wslbridge
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file

I just ended up bypassing the WSL bridge. Tested on WSL 1 & 2.

set PATH="%ConEmuBaseDirShort%\wsl";%PATH% & wsl -d ubuntu -u lester -cur_console:t:"Ubuntu" -- boot.sh

The boot.sh I run is of course optional, and could be removed or replaced with some other command you want to run. I’ve just used one for a long time with ConEmu to instantiate ANSI support so my powerline and boot splash look puuuurdy (some of it is prob superfluous).

#!/bin/bash
cat /mnt/d/some/long/path/conemu-maximus5/ConEmu/boot.ans
cd ~
screenfetch
bash -l -i

Fyi I started having this problem today on Windows 10.0.18363.1082 (aka release 1909).

Not quite sure how to implement hheavener-kyd’s solution as I’ve been using wsltty. Screenshot: https://imgur.com/a/8Ughyan

Apologies for my ignorance - I don’t understand all of the puzzle-pieces well enough. How can I make conemu use wslbridge2? I’m currently on Windows Insider build 18980, and started hitting this problem a few builds back.

For WSL 1 users (possibly WSL 2 but I don’t know), I found a solution that seems to work pretty good. Similar to the answer posted by @LesterCovax, this bypasses the bridge, but it’s less complicated. Now, it should be said, this is not my area of expertise and I figured this out with the help of someone in my group who is more savvy but, to my understanding, this uses the Windows terminal to access WSL instead of going through the bridge which seems to be a more efficient route anyway.

Instead of set PATH="%ConEmuBaseDirShort%\wsl..., use wsl.exe -new_console:d:C:\<path_you_want_to_default_to>.

I hope this helps.

@dseven Thank you for the question. I will add a detailed instructions in my repo and let you know.

Theoratically, No backend, no extra code needed 🎉 Just type wsl.exe. One thing must be noted. The cygwin is now in test build so there are some issues.

Cygwin now has Windows ConPTY support. See this commit. Released in Cygwin 3.1.0-0.3 test build. So, wsl.exe and other Windows console programs can be executed directly in mintty, no need to use wslbridge or winpty related programs.

If you want to test I’ve done something here: https://github.com/Biswa96/wslbridge2/releases

BTW on build Microsoft Windows [Version 10.0.18975.1000] and for WSL1 I still get

wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''

it might be related to latest build changes… is there any options to checkout logs or that backend output?