New issue
Advanced search Search tips

Issue 896650 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Oct 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



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 description

UserAgent: 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:
 
 Issue 896651  has been merged into this issue.
Owner: dgozman@chromium.org
Labels: Needs-Feedback
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
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.
Project Member

Comment 5 by sheriffbot@chromium.org, Oct 21

Cc: dgozman@chromium.org
Labels: -Needs-Feedback
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
Furthermore:

Working with --headless flag resolves this issue. 
Labels: Needs-Bisect Needs-Triage-M70
Cc: vamshi.kommuri@chromium.org
Labels: -Needs-Bisect Triaged-ET Needs-Feedback
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!
896650 M69.PNG
165 KB View Download
896650 M70.PNG
179 KB View Download
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
Project Member

Comment 10 by sheriffbot@chromium.org, Oct 22

Labels: -Needs-Feedback
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
Status: WontFix (was: Unconfirmed)
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
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?
Headless Chrome renders iframes in-process.

Sign in to add a comment