Skip to content
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 (NPD) ElementHandle.boundingBox #1549

Open
olegbespalov opened this issue Nov 26, 2024 · 0 comments
Open

Panic (NPD) ElementHandle.boundingBox #1549

olegbespalov opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working evaluate

Comments

@olegbespalov
Copy link
Contributor

Brief summary

We're getting nil from chrome here, which is likely because the element no longer exists. We should compare our implementation with how PW works out hit targets when working with the tap API.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x157836e]

goroutine 28823895 [running]:
github.com/grafana/xk6-browser/common.(*ElementHandle).boundingBox(0xc017adafa0)
github.com/grafana/[email protected]/common/element_handle.go:52 +0x12e
github.com/grafana/xk6-browser/common.(*ElementHandle).checkHitTargetAt(0xc028915d60, {0x1f9ad78?, 0xc027a3ae70?}, {0x4082e55000000000, 0x407ac60000000000})
github.com/grafana/[email protected]/common/element_handle.go:76 +0x8e
github.com/grafana/xk6-browser/common.(*ElementHandle).newPointerAction.func1({0x1f9ad78, 0xc027a3ae70}, 0x0?)
github.com/grafana/[email protected]/common/element_handle.go:1627 +0x517
github.com/grafana/xk6-browser/common.retryPointerAction({0x1f9ad78, 0xc027a3ae70}, 0xc0bd0755a0, 0xc0af58b500)
github.com/grafana/[email protected]/common/element_handle.go:1672 +0x3c
github.com/grafana/xk6-browser/common.(*ElementHandle).newPointerAction.func2({0x1f9ad78, 0xc027a3ae70}, 0xc083de1650, 0xc083de16c0)
github.com/grafana/[email protected]/common/element_handle.go:1654 +0x59
github.com/grafana/xk6-browser/common.(*Frame).click.(*Frame).newPointerAction.func2({0x1f9ad78, 0xc027a3ae70}, 0xc083de1650, 0xc083de16c0)
github.com/grafana/[email protected]/common/frame.go:2208 +0x116
created by github.com/grafana/xk6-browser/common.call in goroutine 28823883
github.com/grafana/[email protected]/common/helpers.go:103 +0x14c

Test run id: 3556475

xk6-browser version

v1.9.2

OS

NA

Chrome version

NA

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Expected behaviour

No panic

Actual behaviour

Panic

@olegbespalov olegbespalov added bug Something isn't working evaluate labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working evaluate
Projects
None yet
Development

No branches or pull requests

1 participant