-
Notifications
You must be signed in to change notification settings - Fork 43
Cannot find context with specified id #49
Comments
I tried this script with the initial commit (
It's weird that Tom was not getting an error before. 🤷 |
I tried to fix some issues but not the --> #50 @imiric Do you have any idea why k6 closes the xk6-browser/common/network_manager.go Lines 130 to 132 in 5d95a9e
|
@inancgumus Can you reproduce the panic? I haven't looked into this yet, but my hunch would be that there's a race condition between the extension code and the So this might be a general problem all extensions would have. I'll take a deeper look later today. We might want to have a separate issue for that, if #50 fixes the nil pointer panics. |
Yep, I can. Can you try it on your machine? I checked the context propagation path and it seems fine. Yeah, there may be another issue. |
@tom-miseur I'm not able to reproduce the last two issues ( I'm making some context changes and updating the extension to the new |
We fixed the nil pointer and session context errors, but this issue persists. When I run the script, k6 throws a After element clicks, pages do change on the opened browser. However, the I'm suspicious that click actions do not change @robingustafsson Do you have an idea why the |
@inancgumus Can you post Tom's script or a minimal version of it here that reproduces the |
@imiric It's the same script :( |
I wasn't able to reproduce either the panic or that issue with the script from the description on Linux. It happens consistently for you on current |
Yep, it happens all the time, maybe we should add a test for this. |
Fixes #49 This fixes the problem to some extent and I don't know about the implications of skipping IFrames with empty URLs. However, it seems like fixing the problem after plenty of manual tests.
Fixes #49 This fixes the problem to some extent and I don't know about the implications of skipping IFrames with empty URLs. However, it seems like fixing the problem after plenty of manual tests.
On hold because: #125 (comment) |
The error was: panic: interface conversion: interface {} is nil, not *common.ElementHandle The cause of the error was trying to assert a nil result in Frame.document to *ElementHandle. Of course, this is probably the surface error. There may be other causes for it, or maybe not. It was hard to test Frame, so I used an abstraction called FrameExecutionContext. There are a lot of problems are happening with execution contexts. See: #125 and #49, for example. So, it's better to make them testable, starting here. Fixes #53
Fixes #49 This fixes the problem to some extent and I don't know about the implications of skipping IFrames with empty URLs. However, it seems like fixing the problem after plenty of manual tests.
Fixes #49 This fixes the problem to some extent and I don't know about the implications of skipping IFrames with empty URLs. However, it seems like fixing the problem after plenty of manual tests.
Sometimes sessions get closed and they clog the communication between frame sessions and sessions. This usually happens when a frame session is getting created after new frame attachments. This was causing problems with frame handling. This commit prevents lagging by failing fast when it detects a session is closed. It also changes the ordering of FrameSession init steps. The reason of putting initOptions last is: It was propagating frame events before the frame is ready to be used.
Reported by Tom on Oct, 30th:
frame != nil
block got me past these. Not sure what the implications are beyond that though, but I guess having a nil frame is expected if there's already code checking for that condition?! 😅ERRO[0026] unable to evaluate expression: Cannot find context with specified id (-32000)
. Not sure why - I think this was working before I pulled the latestxk6-browser
.panic: send on closed channel
but I think that might be happening as a result of earlier errors (like the above), i.e. during shutdown.Example stack trace
Here's the JS code I'm running, with the failure happening in
clickBrowseDesigns
(which is odd as it is very similar to the precedingclickBusinessCards
).Script
This PR fixes the
nil pointer
issues.The text was updated successfully, but these errors were encountered: