Skip to content

Commit

Permalink
uv_pipe_open error when starting code-insiders from WSL microsoft/vsc…
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 17, 2019
1 parent 74bcfa3 commit 945d678
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/win32/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ if grep -qi Microsoft /proc/version; then
WSL_EXT_ID="ms-vscode-remote.remote-wsl"

if [ $WSL_BUILD -ge 41955 -a $WSL_BUILD -lt 41959 ]; then
# WSL2 in workaround for https://github.com/microsoft/WSL/issues/4337
# WSL2 workaround for https://github.com/microsoft/WSL/issues/4337
CWD="$(pwd)"
cd "$VSCODE_PATH"
cmd.exe /C ".\\bin\\$APP_NAME.cmd --locate-extension $WSL_EXT_ID >remote-wsl-loc.txt"
WSL_EXT_WLOC="$(cat ./remote-wsl-loc.txt)"
rm remote-wsl-loc.txt
cmd.exe /C ".\\bin\\$APP_NAME.cmd --locate-extension $WSL_EXT_ID >%TEMP%\\remote-wsl-loc.txt"
WSL_EXT_WLOC=$(cmd.exe /C type %TEMP%\\remote-wsl-loc.txt)
cd "$CWD"
else
WSL_EXT_WLOC=$(ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID)
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID >/tmp/remote-wsl-loc.txt
WSL_EXT_WLOC=$(cat /tmp/remote-wsl-loc.txt)
fi
if [ -n "$WSL_EXT_WLOC" ]; then
# replace \r\n with \n in WSL_EXT_WLOC
Expand Down

10 comments on commit 945d678

@pcolmer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I find this file on a Windows system? I want to determine whether or not it has been incorporated into the Insiders build as I'm still getting the error with the latest update to Insiders.

@aeschli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no build yet with the fix as we had to hold back todays insider build due to some other issues.

@aeschli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get the file path do which code-insiders in a WSL shell.

@pcolmer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no build yet with the fix as we had to hold back todays insider build due to some other issues.

OK - thank you.

To get the file path do which code-insiders in a WSL shell.

I tried that but I cannot find code.sh anywhere within the installation location of code-insiders. It isn't particularly important/urgent - more a "nice to know" :)

@aeschli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is code.sh in the source repo ends up as code-insiders in the built product.

@pcolmer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is code.sh in the source repo ends up as code-insiders in the built product.

Ah! 💡

Thank you for that!

@pcolmer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aeschli I've definitely got this version of the script on my computer and I'm still getting the uv_pipe_open error.

@aeschli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right there are still some issues. For me it always works when there's no VSCode windows open. If there is already a window open, it sometimes fails, but not always. I'm not able to always repro the failure.
Does it always fail for you?
Maybe it's caused when the Electron process also writes to stderr.

Can you add 2>/dev/null to line 37?
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID >/tmp/remote-wsl-loc.txt 2>/dev/null

@pcolmer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it always fail for you?

Yes.

Can you add 2>/dev/null to line 37?

Done. That certainly hides the output :)

@aeschli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And is the window that opens a Remote-WSL window (statusbar lower left shows WSL: Ubuntu)?

Please sign in to comment.