-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gathering trace data from iframe targets #15846
Comments
I am seeing information for cross-origin iframes in traces collected by Lighthouse. For example: https://trace.cafe/t/YgqEQVRVS9 This page contains several iframes and the data for each frame is present in the trace. I got the trace by running the following command:
Then I loaded Maybe I'm misunderstanding something. What steps can I take to reproduce what you are seeing? |
Thank you for the cli pointer - indeed it is working for me there. Here is a trace of paulirish.com with my setup where I don't see the iframes - https://trace.cafe/t/ZJoILNJNJX Given that it is working with the cli, I should be able to compare my setup to this, and can report back with what the issue was. |
@rggammon are you launching Chrome in old headless mode? I believe this was the default when using Puppeteer before Puppeteer v22.x. In old headless mode, OOPIFs are disabled and so iframe thread activity will appear on the main thread. If this is the case, using the new headless mode should be enough to fix the issue. |
@adamraine I am actually launching chrome via playwright launchPersistentContext with headless: true - which is likely the issue. Thank you for the pointer! Will figure out how to get launchPersistentContext using new headless mode, and can post that here & resolve this |
My issue wasn't with lighthouse but with how it is getting run -
Closing the bug, thank you again for the pointers! |
FAQ
URL
puppeteer/puppeteer#8991
What happened?
I am working with a site that uses cross-domain iframes, and notice that when I load a trace gathered by lighthouse into the devtools timeline/profiler viewer, I don't see data for the iframe. eg: js sample data, w/ #15542
What did you expect?
I'd like to see trace data for cross-domain iframes
What have you tried?
There is some discussion of this in puppeteer/puppeteer#8991
My hypothesis based on puppeteer/puppeteer#8991 would be that tracing needs to be enabled on these iframe targets as they are attached, similar to how Network.enable is being called per-session on attach -
lighthouse/core/gather/driver/target-manager.js
Line 162 in 912495d
And then, I think with flat protocol mode, traces for all the targets would have sessionId's and it is possible to merge all the trace events in one json file and devtools can load this combined file and show all frames in timeline/profile view.
How were you running Lighthouse?
node
Lighthouse Version
11.5.0
Chrome Version
No response
Node Version
No response
OS
Linux
Relevant log output
No response
The text was updated successfully, but these errors were encountered: