Issue metadata
Sign in to add a comment
|
Regression: Chrome DevTools Protocol - Log.entryAdded or Runtime.consoleAPICalled was not fired on iFrame logging
Reported by
ben.ma...@sourcedefense.com,
Oct 18
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36 Steps to reproduce the problem: 1. Run chrome with debugging flag 2. Connect to the browser using WebSocket 3. Log.enable() and Runtime.enable() 4. Create listeners for both Log.entryAdded and Runtime.consoleAPICalled 5. Create a static page with an iFrame - Inside the iFrame create a script that prints "Hello world" to the console using console.log What is the expected behavior? both Runtime.consoleAPICalled and Log.entryAdded should be called What went wrong? both Runtime.consoleAPICalled and Log.entryAdded wasn't called Did this work before? Yes 69.0.3497.100 Chrome version: 70.0.3538.67 Channel: stable OS Version: 10.0 Flash Version:
,
Oct 19
,
Oct 19
Do you have a specific page which creates an iframe with this issue? I think this might be an out-of-process iframe, in which case the behavior is expected, although unfortunate. See Target domain [1] for instructions on how to connect to such iframes and get events from them. Note this is still experimental technology. [1] https://chromedevtools.github.io/devtools-protocol/tot/Target
,
Oct 21
I've investigated further, the issue specifically occurs on foreign iFrame. https://issue-896650.herokuapp.com/ Please take a look at the site above, It opens 4 iframes: 2 of which are foreign. All 4 print out a message to the console using console.log() method. Only the un-foreign iFrames call the Runtime.consoleAPICalled on print, in version 69.0.3497.100, all 4.
,
Oct 21
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 21
Furthermore: Working with --headless flag resolves this issue.
,
Oct 21
,
Oct 22
Tried checking the issue on chrome versions 69.0.3497.100 and on 70.0.3538.67 using Windows 10 with the below mentioned steps. 1. Launched Chrome 2. Navigated to https://issue-896650.herokuapp.com/ 3. Inspected the page to open DevTools -> Console Observed similar behaviour in both the versions. Attaching the screen shots of the same for reference. Removing Needs-Bisect label as per comment#6 by reporter, please feel free to add it back if required. @Reporter: Could you please have a look at the screen shots and let us know if we have missed anything in the process. Thanks!
,
Oct 22
Hi, I've reviewed both images The issue is about Chrome DevTools Protocol where Runtime.consoleAPICalled() should be fire on all of the console.log() calls but fired only on 2 of them Please try to use this git repo this reproduce that issue https://github.com/benmalka/issue-896650
,
Oct 22
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 22
Thank you for the repro page. https://issue-896650.herokuapp.com/ does indeed have two cross-process iframes, which get their own process. As I mentioned in #c3, you should use Target domain [1] to deal with cross-process iframes - these are not reported similarly to in-process iframes. Overall, connect to the frames (called "targets" in this domain), and separately Runtime.enable in each of them. Then you'll get Runtime.consoleAPICalled separately for them through the Target.receivedMessageFromTarget channel. Hope this helps. Feel free to ask more questions. Closing as working as intended. [1] https://chromedevtools.github.io/devtools-protocol/tot/Target
,
Oct 23
Hi, Thank you for the quick response. As I mentioned in c#6, running chrome with --headless flag does trigger Runtime.consoleAPICalled on cross-process iframes. Is this the expected behavior? If so, why does a head chrome don't trigger Runtime.consoleAPICalled?
,
Oct 23
Headless Chrome renders iframes in-process. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by hhli@google.com
, Oct 19