Can't get anything in DevTools in headless

1,849 views
Skip to first unread message

Samuel Yang

unread,
Sep 19, 2016, 10:41:41 PM9/19/16
to headless-dev

Hi, 

I had compiled headless_shell and launched it successfully, and then I use devtools to remote inspect the page, I  didn't see any content about the page in the devTools.  Do you know what is going on? 

I didn't make any code change, just follow the headless guide step by step. 


I did see the output below, but I clicked the link, and the devtool panel was shown, but without any content. i.e. The "elements" menu, no content. The "source" menu, no content too. 

Inspectable WebContents

Samuel Yang

unread,
Sep 19, 2016, 10:51:15 PM9/19/16
to headless-dev
More information, I type window.location in console, but nothing show up in console, it also cleared everything I typed before(window.location) 

在 2016年9月20日星期二 UTC+8上午10:41:41,Samuel Yang写道:

Alex Clarke

unread,
Sep 21, 2016, 10:13:53 AM9/21/16
to Samuel Yang, headless-dev
I suspect there's a shek between the Devtools protocol version in headless_shell and the browser you're using to debug it.  E.g. if I run headless_shell --remote-debugging-port=5001 http://some-website.com  and navigate to http://localhost:5001 with m52 it's totally broken but if I use m55 it works perfectly.

--
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+unsubscribe@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/c34e436f-ae21-45e3-9759-19cace6cbf3e%40chromium.org.

Alex Clarke

unread,
Sep 21, 2016, 10:14:08 AM9/21/16
to Samuel Yang, headless-dev
s/shek/skew

Samuel Yang

unread,
Sep 21, 2016, 9:39:11 PM9/21/16
to headless-dev, yangxi...@gmail.com

Thanks Alex. After upgrade chrome, the remote debug works. 


在 2016年9月21日星期三 UTC+8下午10:14:08,Alex Clarke写道:
s/shek/skew

On 21 September 2016 at 15:13, Alex Clarke <alexc...@google.com> wrote:
I suspect there's a shek between the Devtools protocol version in headless_shell and the browser you're using to debug it.  E.g. if I run headless_shell --remote-debugging-port=5001 http://some-website.com  and navigate to http://localhost:5001 with m52 it's totally broken but if I use m55 it works perfectly.
On 20 September 2016 at 03:41, Samuel Yang <yangxi...@gmail.com> wrote:

Hi, 

I had compiled headless_shell and launched it successfully, and then I use devtools to remote inspect the page, I  didn't see any content about the page in the devTools.  Do you know what is going on? 

I didn't make any code change, just follow the headless guide step by step. 


I did see the output below, but I clicked the link, and the devtool panel was shown, but without any content. i.e. The "elements" menu, no content. The "source" menu, no content too. 

Inspectable WebContents

--
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.
Message has been deleted

Alex Clarke

unread,
Sep 22, 2016, 9:22:05 AM9/22/16
to Samuel Yang, headless-dev
Try setting --remote-debugging-address=my_ip as well as --remote-debug-port=9222 

Note there is no authentication of any kind, so please don't do that on an open network.

On 22 September 2016 at 02:44, Samuel Yang <yangxi...@gmail.com> wrote:

Is it possible that I access the devtool not from localhost but from other IP?  

I tried but failed to access the my_ip:9222 from other computer.    I run headless_shell with remote-debug-port=9222


在 2016年9月22日星期四 UTC+8上午9:39:11,Samuel Yang写道:
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.

Samuel Yang

unread,
Sep 22, 2016, 10:18:14 PM9/22/16
to headless-dev, yangxi...@gmail.com

 Thank you Alex. It works.


在 2016年9月22日星期四 UTC+8下午9:22:05,Alex Clarke写道:

adam.sub...@gmail.com

unread,
Feb 10, 2017, 8:38:59 PM2/10/17
to headless-dev, yangxi...@gmail.com
I'm having the same issue with Google Chrome for Mac Version 56.0.2924.87 (64-bit). I'm using 
`google-chrome --headless --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=8888 http://bokeh.pydata.org/en/latest/docs/gallery/image_rgba.html` on an AWS ubuntu instance (I know it's insecure but I'm just doing temporary testing). 

On Wednesday, September 21, 2016 at 10:13:53 AM UTC-4, Alex Clarke wrote:
I suspect there's a shek between the Devtools protocol version in headless_shell and the browser you're using to debug it.  E.g. if I run headless_shell --remote-debugging-port=5001 http://some-website.com  and navigate to http://localhost:5001 with m52 it's totally broken but if I use m55 it works perfectly.
On 20 September 2016 at 03:41, Samuel Yang <yangxi...@gmail.com> wrote:

Hi, 

I had compiled headless_shell and launched it successfully, and then I use devtools to remote inspect the page, I  didn't see any content about the page in the devTools.  Do you know what is going on? 

I didn't make any code change, just follow the headless guide step by step. 


I did see the output below, but I clicked the link, and the devtool panel was shown, but without any content. i.e. The "elements" menu, no content. The "source" menu, no content too. 

Inspectable WebContents

--
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.

Anderson Queiroz

unread,
Feb 11, 2017, 8:42:18 AM2/11/17
to adam.sub...@gmail.com, headless-dev, yangxi...@gmail.com
Hi,

I had a similar issue trying to remote debug, two things solved my problem:

1) --remote-debugging-address=MY_EXTERNAL_IP
2) when opening http://MY_EXTERNAL_IP:9299 I need to allow chrome to load "unsafe scripts".
To me at the very end of the address bar appears a button looking like a shield with a red "X" on it, just before the star to bookmark the page. If I don't click there and click on "Load unsafe scripts" the DevTools will show nothing

I hope it helps :)

Anderson de França Queiroz
Software Engineer

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.

adam.sub...@gmail.com

unread,
Feb 11, 2017, 9:02:05 PM2/11/17
to headless-dev, adam.sub...@gmail.com, yangxi...@gmail.com
Thanks, that solved it! :D
Reply all
Reply to author
Forward
0 new messages