Closed inancgumus closed 1 month ago
I've investigated this issue and compared it with Playwright. Here are my findings:
The NPD currently can occur in getOwnerFrame. In Playwright, fortunately, they have an equivalent method and they actually check for null
.
I think the safest option is to protect against a NPD here by also checking for null
. Unfortunately, i've not been able to replicate the issue in the first place.
WDYT @inancgumus?
@ankur22 Sounds good to me 👍
Found another NPD that @ankur22 suggests it's similar to this one. Here are the details:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x15924a8]
goroutine 368053 [running]:
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.deferwrap1()
go.opentelemetry.io/otel/sdk@v1.29.0/trace/span.go:398 +0x25
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0xc043cfcb60, {0x0, 0x0, 0xc01a2ae8c0?})
go.opentelemetry.io/otel/sdk@v1.29.0/trace/span.go:436 +0xa62
panic({0x1922540?, 0x2eb2e90?})
runtime/panic.go:785 +0x132
github.com/grafana/xk6-browser/common.(*screenshotter).screenshot(0xc049415eb0, {0x1f2ac00, 0xc014e5a0a0}, 0x0, 0xc049415ca8, {0x1bae2fb, 0x3}, 0x0, 0xc010762600?, {0xc013f74840, ...})
github.com/grafana/xk6-browser@v1.8.5/common/screenshotter.go:185 +0x328
github.com/grafana/xk6-browser/common.(*screenshotter).screenshotPage(0xc049415eb0, 0xc01ce864e0, 0xc010762580)
github.com/grafana/xk6-browser@v1.8.5/common/screenshotter.go:398 +0x334
github.com/grafana/xk6-browser/common.(*Page).Screenshot(0xc01ce864e0, 0xc010762580, {0x7f7cc4265108, 0xc001078540})
github.com/grafana/xk6-browser@v1.8.5/common/page.go:1146 +0x2c6
github.com/grafana/xk6-browser/browser.mapPage.func34.1()
github.com/grafana/xk6-browser@v1.8.5/browser/page_mapping.go:255 +0x4e
github.com/grafana/xk6-browser/k6ext.promise.func1()
github.com/grafana/xk6-browser@v1.8.5/k6ext/promise.go:41 +0x5a
created by github.com/grafana/xk6-browser/k6ext.promise in goroutine 108
github.com/grafana/xk6-browser@v1.8.5/k6ext/promise.go:40 +0xe6
Thanks! 🙇🏻
@joanlopez, sorry, at the time I gave you the wrong issue, i meant https://github.com/grafana/xk6-browser/issues/1056 🤦 Now we have a dedicated issue https://github.com/grafana/xk6-browser/issues/1502.
@inancgumus I believe we can close this. I've not seen this issue since the fix. WDYT?
Sure, we can resurrect it if it happens again.
What?
Panic occurs while running
page.getOwnerFrame
, here:Why?
Needs to be investigated.
How?
No response
Tasks
Related PR(s)/Issue(s)
No response