DevTools not working on localhost:9222 on Windows

6,889 views
Skip to first unread message

nite...@gmail.com

unread,
Jul 26, 2017, 1:12:23 AM7/26/17
to headless-dev
I have Chrome 60 stable on Windows 10.
After running "chrome --headless --disable-gpu --remote-debugging-port=9222 https://www.chromestatus.com", navigating to "localhost:9222" on another browser I can see the page, but once I click on it to inspect, the page is blank.
I can see the URL changing to something which starts with "https://chrome-devtools-frontend.appspot.com/"



nite...@gmail.com

unread,
Jul 26, 2017, 1:22:18 AM7/26/17
to headless-dev, nite...@gmail.com
I can see in console this error:

TypeError: document.registerElement is not a function

dvallet (Chromium)

unread,
Jul 26, 2017, 1:34:02 AM7/26/17
to nite...@gmail.com, headless-dev
Sorry I can't reproduce the error, this is what I executed (in powershell): 
& 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' --headless --disable-gpu https://www.chromestatus.com/ --remote-debugging-port=9222

Looks like it may be an issue with loading the devtools frontend (I've sometimes had this issue due to being behind a proxy). Try using chromre-remote-interface --inspect to see if the devtools port is working. 

If it's still not working, you could test it with Chrome canary, if that works maybe there was a significant change that didn't made it to stable 60

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/eb6a93f2-6897-42de-9321-7cc8ddabb7e7%40chromium.org.

nite...@gmail.com

unread,
Jul 26, 2017, 1:51:33 AM7/26/17
to headless-dev, nite...@gmail.com
Thanks. 

I'm not behind a proxy. I switched firewall off. I also tried on another Windows PC, same error.

Here's how the error looks in Firefox:



On Edge, it has same JS function error and another one:


dvallet (Chromium)

unread,
Jul 26, 2017, 1:58:42 AM7/26/17
to nite...@gmail.com, headless-dev
Gotcha! Internet explorer doesn't work for me, so it could be that the headless chrome devtools UI doesn't work for those browsers :)

Try instead installing Chrome Beta/Canary and running that to browser localhost. 

Note that the UI is just a convenience/debug feature, most of the interaction is done through the devtools protocol

PhistucK

unread,
Jul 26, 2017, 2:02:04 AM7/26/17
to nite...@gmail.com, headless-dev
The Developer Tools feature (headless or not) is supported in Chrome or any other browser supports several WebKit specific, Blink specific, modern and cutting edge features (like Shadow DOM).
I am not sure there is a non-recent-Chromium-based-browser that can render the Developer Tools feature successfully at the moment. Perhaps the latest Safari beta (11) and maybe not even it.
It does not use polyfills for most of the things, because it assumes that the browser supports everything, since it is only intended for its corresponding Chrome/Chromium version.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.

To post to this group, send email to headle...@chromium.org.

nite...@gmail.com

unread,
Jul 26, 2017, 2:15:38 AM7/26/17
to headless-dev, nite...@gmail.com
Thanks, it works in Chrome. 

I strongly recommend to mention in https://developers.google.com/web/updates/2017/04/headless-chrome that accessing localhost:9222 doesn't work in web-browsers like FireFox\Edge. 
The article actually suggests going to "another browser": "Since you don't have browser UI to see the page, navigate to http://localhost:9222 in another browser to check that everything is working".
It can be very confusing.

Another thing: on Windows, creating a screenshot or PDF doesn't work unless you run the command line as admin, because chrome.exe doesn't have access writing to the working directory. Took me sometime to realize why files weren't created.

Thanks!


PhistucK

PhistucK

unread,
Jul 26, 2017, 2:21:03 AM7/26/17
to nite...@gmail.com, Joe Medley, rachel...@gmail.com, headless-dev
For the other thing - sounds like a bug of some sort... Perhaps file it at crbug.com.​

Joe or Rachel, can you clarify that Google Developers Updates article?

Thank you!



PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev+unsubscribe@chromium.org.

To post to this group, send email to headle...@chromium.org.

dvallet (Chromium)

unread,
Jul 26, 2017, 2:32:04 AM7/26/17
to PhistucK, nite...@gmail.com, Joe Medley, rachel...@gmail.com, headless-dev
Re: Print to PDF. 
I don't think it's a bug, only that  you invoke Chrome in Windows command line it sets the default output directory as the path of the executable, so --save-to-pdf will not work without admin permissions, Perhaps we could clarify in https://developers.google.com/web/updates/2017/04/headless-chrome#create_a_pdf_dom
that you can do --save-to-pdf=/path/to/output/file.pdf

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
Reply all
Reply to author
Forward
0 new messages