symfony / panther

A browser testing and web crawling library for PHP and Symfony
MIT License
2.91k stars 213 forks source link

Running chrome in headed mode - help needed #631

Open papppeter opened 3 weeks ago

papppeter commented 3 weeks ago

Hi,

i have fully working setup, the only part is missing to start panther in --no-headless mode.

symfony app is inside a docker container, my dev environment is in windows wsl2. i can start chrome from my terminal, which opens up a chrome browser. I cannot start chrome inside my container. I can start playwright with ui from a docker container as well. it looks like my dev env is correct.

i am not totally sure my issue, or question is related to panther, so if you think so, just close it down please.

there are already similar issues like: https://github.com/symfony/panther/issues/505

Could somebody write up, or give an example how to run it?

I did setup DISPLAY env variable to: :0 with and without host.docker.internal I did attached volume /tmp/.X11-unix:/tmp/.X11-unix I did run xhost +local:docker I have 1000:1000 uid:gid in my docker container, and wsl2

I asume chrome still cannot reach display:0 from container I did not tried vnc solution I did made work selenium client but did not liked it

So any help would be greate how to run chrome from inside a container, which can connect to desplay on my wsl2.

thanks!