wslg icon indicating copy to clipboard operation
wslg copied to clipboard

Chrome shows transparent (click through) window in when running selenium

Open stefanrybacki opened this issue 4 years ago • 4 comments

Environment

Windows build number: Microsoft Windows [Version 10.0.22478.1012]
Your Distribution version:  Ubuntu 20.04
Your WSLg version: 1.0.27

Steps to reproduce

  1. install chrome
  2. start a selenium session using chrome

WSL logs:

Logs

Expected behavior

see chrome

Actual behavior

It looks like this after trying to resize to see if this helps image

Note: Chrome works fine when not run through selenium

stefanrybacki avatar Oct 20 '21 07:10 stefanrybacki

Having pretty much the same issue. It was working fine when I followed this guide: https://shouv.medium.com/how-to-run-cypress-on-wsl2-989b83795fb6 But now I'm trying to get it working with default window server and Chrome shows transparent window when running from cli. I did fresh install of Ubuntu 22.04.2 did update/upgrade and followed guide from https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-google-chrome-for-linux - doesn't help, still transparent window. Running as sudo or root didn't help.

Maxim-Mazurok avatar Mar 27 '23 06:03 Maxim-Mazurok

Having pretty much the same issue. It was working fine when I followed this guide: https://shouv.medium.com/how-to-run-cypress-on-wsl2-989b83795fb6 But now I'm trying to get it working with default window server and Chrome shows transparent window when running from cli. I did fresh install of Ubuntu 22.04.2 did update/upgrade and followed guide from https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-google-chrome-for-linux - doesn't help, still transparent window. Running as sudo or root didn't help.

I have the same problem running chrome as root. Try running it with "--disable-gpu" parameter. It worked for me

Swordy777 avatar Mar 27 '23 09:03 Swordy777

Try running it with "--disable-gpu" parameter. It worked for me

This worked for me even without root, thank you!

Maxim-Mazurok avatar Mar 27 '23 21:03 Maxim-Mazurok

Thanks so much for this. A similar issue was happening for me when running google-chrome-stable directly from the command line using WSL 2 in Windows, but adding the --disable-gpu parameter makes the browser appear normally.

enderandpeter avatar Jul 31 '24 19:07 enderandpeter