New issue
Advanced search Search tips

Issue 755970 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chromium/Chrome does not implement Browser domain methods from Chrome DevTools Protocol

Reported by m...@infogr.am, Aug 16 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce the problem:
1. In a terminal, start Chromium in headless mode on a fixed port (e.g, 9222):  /Applications/Chromium.app/Contents/MacOS/Chromium --headless --disable-gpu --remote-debugging-port=9222
2. In another terminal connect to the launched headless chromium via chrome-remote-interface: ./node_modules/.bin/chrome-remote-interface -p 9222 inspect
3. Try executing one of the documented DevTools Protocol methods of Browser domain:
a. Browser.getWindowForTarget()
b. Browser.getWindowBounds()
c. Browser.setWindowBounds()

What is the expected behavior?
I expect to have some indication that abovementioned methods exist/are implemented. Since for sake of brevity I have omitted the arguments in these method calls, I expect to have some "Invalid parameters" error.

What went wrong?
For every Browser domain method call, I get the "wasn't found" error:

>>> Browser.getWindowForTarget()
{ error:
   { code: -32601,
     message: '\'Browser.getWindowForTarget\' wasn\'t found' } }
>>> Browser.getWindowBounds()
{ error:
   { code: -32601,
     message: '\'Browser.getWindowBounds\' wasn\'t found' } }
>>> Browser.setWindowBounds()
{ error:
   { code: -32601,
     message: '\'Browser.setWindowBounds\' wasn\'t found' } }

That makes me think that these methods have not been implemented and that disagrees with the DevTools documentation (link above)

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.101  Channel: canary
OS Version: OS X 10.12.6
Flash Version:
 

Comment 1 by sdy@chromium.org, Aug 16 2017

Components: Platform>DevTools>Platform

Comment 2 by l...@chromium.org, Aug 20 2017

Cc: l...@chromium.org
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report, can confirm repro.  It looks like you are using version 60+, and the methods do seem to have been introduced by that time ( https://codereview.chromium.org/2813553005 )

dgozman@, afaik, certain domains such as SystemInfo are not available to all targets.  Are there docs somewhere that outline these rules / can explain why Browser.* aren't available in this scenario?  I'm curious myself :)
Status: WontFix (was: Assigned)
These methods are not implemented in headless Chrome. I am not even sure they make sense. Note that the whole Browser domain is marked as experimental [1], which means it can be changed or removed at any time. In this particular case, it's missing in some scenarios.

Thank you for filing the issue! Closing as WontFix, since we don't plan to expose this in headless in the near future.

[1] https://chromedevtools.github.io/devtools-protocol/tot/Browser/

Sign in to add a comment