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

NPD in NewFrameSession #4125

Open
ankur22 opened this issue Nov 21, 2024 · 0 comments
Open

NPD in NewFrameSession #4125

ankur22 opened this issue Nov 21, 2024 · 0 comments

Comments

@ankur22
Copy link
Contributor

ankur22 commented Nov 21, 2024

Brief summary

NPD when calling s.ID() on an instance of session that was passed into NewFrameSession. The NPD occurs in the ID method itself, which is a simple return s.id, which means that the session instance is incomplete/nil (suggesting that since in the stach trace we have (*Session).ID(0xc00334d8e8?) and the ? denotes "uncertainty about the validity of the memory address or a possible truncation or mismatch of debug information")?

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

goroutine 683891 [running]:
github.com/grafana/xk6-browser/common.(*Session).ID(0xc00334d8e8?)
github.com/grafana/[email protected]/common/session.go:53
github.com/grafana/xk6-browser/common.NewFrameSession({0x1f9ad08, 0xc0027e8b90}, {0x1fa4cc0, 0x0}, 0xc000b11860, 0xc001b77ec0, {0xc0012c7840, 0x20}, 0xc002ba7920, 0x0)
github.com/grafana/[email protected]/common/frame_session.go:95 +0x6e
github.com/grafana/xk6-browser/common.(*FrameSession).attachIFrameToTarget(0xc001b77ec0, 0xc000658bd0, {0xc0012c7820, 0x20})
github.com/grafana/[email protected]/common/frame_session.go:1034 +0xe5
github.com/grafana/xk6-browser/common.(*FrameSession).onAttachedToTarget(0xc001b77ec0, 0xc003e81460)
github.com/grafana/[email protected]/common/frame_session.go:967 +0x277
github.com/grafana/xk6-browser/common.(*FrameSession).initEvents.func1()
github.com/grafana/[email protected]/common/frame_session.go:303 +0x233
created by github.com/grafana/xk6-browser/common.(*FrameSession).initEvents in goroutine 683768
github.com/grafana/[email protected]/common/frame_session.go:239 +0x19b

Test run id: 3536152

xk6-browser version

v1.9.1

OS

NA

Chrome version

NA

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Expected behaviour

Actual behaviour

@ankur22 ankur22 added the bug label Nov 21, 2024
@ankur22 ankur22 changed the title NPD on NewFrameSession NPD in NewFrameSession Nov 21, 2024
@ankur22 ankur22 transferred this issue from grafana/xk6-browser Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant