-
Notifications
You must be signed in to change notification settings - Fork 43
Request.frame
is sometimes nil
#90
Comments
Some more info about this: from testing with the script in #49, when we get a nil That said, the reason So the fix I'm currently working on involves emitting metrics for Response only in the An alternative to using |
This is in the review queue. You didn't request me to review this yet but should I add my review to this? @imiric |
The PR for this is #117. It's still a draft because of the race condition it introduces, which I'm not sure how to fix yet, and well, other issues have come up in the meantime. |
I think we can close this. As explained above, WDYT @inancgumus? |
👍 |
Sometimes when we create a new
Request
here:xk6-browser/common/network_manager.go
Lines 342 to 350 in 9882ab5
... we get a nil
Frame
pointer fromFrameManager.getFrameByID()
.The logic of how
m.frames
is changed is a bit convoluted, as we delete frames in a couple of places:xk6-browser/common/frame_manager.go
Line 185 in 9882ab5
xk6-browser/common/frame_manager.go
Line 295 in 9882ab5
We added some debugging information in 0451efb so we can see when it happens, but there's likely a synchronization bug here that we need to address so that anything that needs a
Frame
reference (e.g. when getting the session through it forResponse.fetchBody()
(which we could possibly store directly onResponse
to avoid resolving the reference chain?)) can run before we actually delete theFrame
.The text was updated successfully, but these errors were encountered: