Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wslbridge error #49

Open
soundnotation opened this issue Sep 10, 2020 · 4 comments · May be fixed by #50
Open

wslbridge error #49

soundnotation opened this issue Sep 10, 2020 · 4 comments · May be fixed by #50

Comments

@soundnotation
Copy link

I'm using ConEmu to open bash. I use to call it via a link to ConEmu with the following target:
"C:\Program Files\ConEmu\ConEmu64.exe" /cmd @dev.txt
My dev.txt is under C:\Program Files\ConEmu and contains the following line, as described here:
>bash --rcfile <(echo '. ~/.bashrc; some_command_that_connects_to_another_server') -cur_console:n

After the last Windows 10 update, my ConEmu bash window disappears right after calling it.
From what I can see before it goes away, it puts a line that says:
/bin/bash: '.: no such file or directory
Before today, it worked without issues.

Plus, I get the following error when trying to open bash within an open instance of ConEmu:

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


ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

I believe this has something to do with wslbridge specifically.

My ConEmu task for {Bash::bash} is set as following:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt

@BrandtHill
Copy link

I have the same issue as of today after a Windows update.

A workaround I found is to change the ConEmu task to:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & wsl -cur_console:pm:/mnt

@soundnotation
Copy link
Author

@BrandtHill regarding the task, your workaround works, thanks.
Regarding my problem, I changed the command in the .txt file as follows:
>bash -c ". ~/.bashrc; ssh server; bash" -cur_console:n (final bash is to let the console stay open)
It works, but this makes the following dialog appear when trying to close the console:

drawing

which didn't appear before.

@soundnotation
Copy link
Author

soundnotation commented Sep 16, 2020

It works, but this makes the following dialog appear when trying to close the console:

drawing

which didn't appear before.

is solved by https://superuser.com/a/1365351 and changing the content of the .txt file to

>bash -c ". ~/.bashrc; some_command_that_connects_to_another_server; bash" -cur_console:n

But:

Plus, I get the following error when trying to open bash within an open instance of ConEmu:

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


ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...

is still valid, unfortunately. As @BrandtHill and I said before,

A workaround I found is to change the ConEmu task to:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & wsl -cur_console:pm:/mnt

works, but I believe there's something wrong with %ConEmuBaseDirShort%\conemu-cyg-64.exe when using

set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt

as ConEmu task for {Bash::bash}.

@gnaggnoyil
Copy link

The root cause seems to be a behavior change of base.exe after Windows 10 Update KB4576484, as I mentioned in microsoft/WSL#5932 . Therefore in frontend/wslbridge.cc, this in the end causes cmdLine which has bashCmdLine appended and quoted got misinterpreted by bash.exe, effectively causing this error.

I'm not sure if such behavior change of bash.exe is expected, but I would then by this chance propose a solution where command line strings that are passed into CreateProcess shall be processed and quoted in a manner that obeys the logic mentioned in msdn thus could be parsed and understood by cmd/CommandLineToArgvW .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants