Thanks for getting in touch. We were able to replicate the issue on a Windows machine using WSL2 running Ubuntu 20.04. We’ve created issue #491 to track this – we’ve made some assumptions on what version of Windows and WSL you were running.
To unblock your progress in working with the xk6-browser, we suggest you work with it outside of WSL using the pre-built binary and also working with our docs (which are still WIP).
@prasannasd We looked into this issue, and found that it happens if you installed the chromium-browser package on Ubuntu, which is a transitional Snap package, and doesn’t work with xk6-browser. Can you confirm if you also have this package installed in your WSL2 Ubuntu installation?
In this case the solution, or workaround rather, is to install Chromium from a native package. Since Ubuntu doesn’t provide one, you’ll have to install it from an external repository. Google has a generic one for Debian and Ubuntu that you can use. See these instructions for details.
You can also manually download and install the package with:
The package “google-chrome-stable/stable,now 104.0.5112.79-1 amd64” is installed and the package “chromium-browser” is not installed on. And it did not work.
I did a workaround. Installed k6 extension on Windows Chrome and used har-to-k6 convertor to get the script.
This is working fine for me for now via regular k6.