I am attempting to run headless Chrome on my MacBook, but when I run it according to the instructions here the Chrome app just opens normally, with its GUI. I am running:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
-–headless \
--disable-gpu \
http://localhost:8080
This is a Node/Express app that I want to run inside a Docker container with headless Chrome. But I am running the above command by hand, in the terminal. And I just get the browser, as normal. I get the same result even if I leave out a specific url, opening at the default page.
Interestingly, if I pass -headless
(one dash) instead of --headless
(two dashes) the app opens in Chrome in another tab but the tab I see is at http://xn--headless-rn3d/
. Whatever that is.
I have Chrome version 105.0.5195.125. MacOS Catalina 10.15.7. What am I doing wrong? Am I misunderstanding how headless mode is meant to work?