-
Notifications
You must be signed in to change notification settings - Fork 41
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
Panic with we either navigate top level or have old version of the navigated frame
#1341
Comments
I think I have a better idea of what is happening.
I'm not 100% sure how to handle the CDP events incoming from different sessions for the same frame, but I think we can check to see if the incoming detach event's Playwright does something similar to what i'm proposing, well, they just check to see if the frame exists with a session. Puppeteer seems to ignore the swap frameDetach events completely, as in they don't seem to remove any frames 🤷 |
👍 Makes sense.
Side note: When I look into the Puppeteer's code, they seem to be doing some actions for the frame-swapped events. This and this. |
Thanks for the links. Yeah, i still don't see them removing the frames, so i feel the solution we're going with (at least for now) is a good one. We might have to change it if we find another edge case with iframe, and bring it more in line with either Playwright or Puppeteer. |
Yes, our solution is fine. Just wanted to give a heads-up about the future
changes.
…On Fri, May 24, 2024 at 1:40 PM Ankur ***@***.***> wrote:
Side note: When I look into the Puppeteer's code, they seem to be doing
some actions for the frame-swapped events. This
<https://github.com/puppeteer/puppeteer/blob/d963fcdd80dbcf26fc6e169917ddd18e7a751f4f/packages/puppeteer-core/src/cdp/LifecycleWatcher.ts#L224-L265>
and this
<https://github.com/puppeteer/puppeteer/blob/d963fcdd80dbcf26fc6e169917ddd18e7a751f4f/packages/puppeteer-core/src/cdp/Frame.ts#L73-L77>
.
Thanks for the links. Yeah, i still don't see them removing the frames, so
i feel the solution we're going with (at least for now) is a good one. We
maybe have to change it if we find another edge case with iframe.
—
Reply to this email directly, view it on GitHub
<#1341 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXVMCJNGBLJGVFGQUV2R3ZD4KKPAVCNFSM6AAAAABID3FCAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGIYTKMRYGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Brief summary
When navigating through certain websites, in some cases an error
we either navigate top level or have old version of the navigated frame
is reported which stops the test iteration. At the moment it's not clear why this occurs, but in the investigation so far we have found that theframe
in question that is causing this panic isn't being tracked by k6 browser.There are two ways in which a new
frame
is tracked by k6 browser:We have explored the CDP requests that are made between k6 browser and chrome, but we do not see a
frameAttached
event being sent from Chrome, but we can see that theframeTree
does contain a reference to the new frame as a child.xk6-browser version
v1.5.1
OS
NA
Chrome version
NA
Docker version and image (if applicable)
NA
Steps to reproduce the problem
Run the script that is causing this issue to replicate the issue.
Expected behaviour
Script passes with no issues.
Actual behaviour
Panics with
we either navigate top level or have old version of the navigated frame
.Tasks
The text was updated successfully, but these errors were encountered: