-
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
ElementHandle: nil pointer dereference #1056
Comments
@lthurr could you please open a new thread in our community forum? Does seem to be an issue though. Have you been able to reproduce the issue in a public website that we can work with and reproduce on too? |
Is this issue still running ? |
Updated stack trace panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x14eabf6]
goroutine 3341089 [running]:
github.com/grafana/xk6-browser/common.(*ElementHandle).clickablePoint(0xc0034557c0)
github.com/grafana/xk6-browser@v1.7.1/common/element_handle.go:168 +0x2b6
github.com/grafana/xk6-browser/common.(*ElementHandle).newPointerAction.func1({0x1eee958, 0xc0023d8cb0}, 0x0?)
github.com/grafana/xk6-browser@v1.7.1/common/element_handle.go:1613 +0x453
github.com/grafana/xk6-browser/common.retryPointerAction({0x1eee958, 0xc0023d8cb0}, 0xc0077fe860, 0xc009352960)
github.com/grafana/xk6-browser@v1.7.1/common/element_handle.go:1660 +0x3c
github.com/grafana/xk6-browser/common.(*ElementHandle).newPointerAction.func2({0x1eee958?, 0xc0023d8cb0?}, 0xc001f79aa0, 0xc001f79b00)
github.com/grafana/xk6-browser@v1.7.1/common/element_handle.go:1648 +0x45
github.com/grafana/xk6-browser/common.(*Frame).click.(*Frame).newPointerAction.func2({0x1eee958, 0xc0023d8cb0}, 0xc001f79aa0, 0xc001f79b00)
github.com/grafana/xk6-browser@v1.7.1/common/frame.go:2181 +0x116
created by github.com/grafana/xk6-browser/common.call in goroutine 3341072
github.com/grafana/xk6-browser@v1.7.1/common/helpers.go:103 +0x14c |
The only reason we would get this NPD is if the getLayoutMetrics returned a nil value for Looking at Playwright's clickablePoint they don't seem to work with the |
Brief summary
Hi, I have been trying to set a pipeline to automatically run our k6 browser tests in order to collect periodically some web vital metrics.
The problem is that I can't manage to make it work because I'm getting
panic: runtime error: invalid memory address or nil pointer dereference
. I have been trying to look out for solutions or even if this was reported before and I haven't found anything. So I'm kindly requesting your support here.The k6 version run within the jenkins job returns
let me proceed to explain what I see
k6 version
k6 v0.46.0 (2023-08-14T13:23:26+0000/v0.46.0-0-gcbd9e9ad, go1.20.7, linux/amd64)
OS
linux
Docker version and image (if applicable)
No response
Steps to reproduce the problem
I have two examples,
one of them triggers the
panic: runtime error
. However, when I execute the example script described in k6.io, this one works perfectly fine.The following script triggers the panic
The following script doesn't trigger the panic
Expected behaviour
Script is executed succesfully
Actual behaviour
When I execute the file provided above, I face the following output
The text was updated successfully, but these errors were encountered: