Testing extension's vscode-test tests on wsl fails with 'bash: cannot set terminal process group (-1): Invalid argument'

Viewed 567

I am unable to run VS Code tests (that are using the vscode-tests package) as in the helloworld-test-sample on wsl to locally reproduce build failures.

I think I got close, I overcame this error:

(code:3265): Gtk-WARNING **: 09:21:36.493: cannot open display: 192.168.xxx.xxx:0

But am getting some errors from bash from somewhere inside the npm test and then the xvfb-run hangs forever.

This is what I've done so far. I configured wsl with Ubuntu-18.04 distro on my Windows 10 Enterprise 1803.

  1. Installed Git, Node and NPM.
  2. Cloned the repo inside WSL
  3. Run npm install and npm test

Got this error:

.vscode-test/vscode-1.43.2/VSCode-linux-x64/code: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

Followed https://askubuntu.com/questions/1123722/error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-objec:

Eventually, I had to install all of these (I went one by one to find the minimal set):

sudo apt-get install x11-common \ 
  libx11-xcb1 \ 
  libxcomposite1 \
  libxcursor1 \
  libxdamage1 \
  libxi6 \
  libxtst6 \
  libnss3 \
  libgtk-3-0 \
  libxss1 \
  libasound2 

Then npm test gets further, but hits another error:

(code:3121): Gtk-WARNING **: 09:14:00.878: cannot open display:

Exit code:   1
Done

Trying hints from https://blog.root.cz/petrkrcmar/gtk-warning-cannot-open-display/

export DISPLAY=:0.0

Trying hints from: https://askubuntu.com/questions/1123722/error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-objec

export DISPLAY=<your windows ip>:0

Used ipconfig on Windows to find the IP address. With multiple adapters and VPN installed, there are many virtual adapters. I started with the address of my hardware ethernet adapter and eventually tried them all.

Still getting this error:

(code:3265): Gtk-WARNING **: 09:21:36.493: cannot open display: 192.168.xxx.xxx:0

Exit code:   1

I realized that I followed the Visual Studio > Working with Extensions > Continuous Integration guide, which on GitHub using the GabrielBB/xvfb-action@v1.0 build task to run my npm test. Looking at the build log file, it seems to first call:

/usr/bin/sudo apt-get install xvfb

And then it runs the test by xvfb-run:

/usr/bin/xvfb-run --auto-servernum npm test

I did exactly that. But then I am still getting following errors into the output:

> node ./out/test/runTest.js

Found .vscode-test/vscode-1.43.2. Skipping download.
Warning: 'sandbox' is not in the list of known options, but still passed to Electron/Chromium.

[main 2020-04-02T08:40:03.893Z] [File Watcher (node.js)] Error: ENOENT: no such file or directory, stat '/home/<user>/.config/Code/User'

[main 2020-04-02T08:40:04.346Z] update#setState idle

bash: cannot set terminal process group (-1): Invalid argument
bash: no job control in this shell

[main 2020-04-02T08:40:34.347Z] update#setState checking for updates

[main 2020-04-02T08:40:35.324Z] update#setState idle

And it hangs forever.

Now I am wondering what do these errors mean:

bash: cannot set terminal process group (-1): Invalid argument
bash: no job control in this shell

Can anyone help?

0 Answers
Related