Open williamoliveira opened 3 months ago
Rod Version: v0.116.2
I am connecting to an remote chrome via the ws endpoint. When it loses connection to the browser and I try to call a method without knowing it is disconnected, I get a panic:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x90 pc=0x105070180] goroutine 1908 [running]: github.com/go-rod/rod.(*Page).getJSCtxID(0x0?) /Users/williamoliveira/go/pkg/mod/github.com/go-rod/rod@v0.116.2/page_eval.go:325 +0x30 github.com/go-rod/rod.(*Page).evaluate(0x0, 0x140005af850) /Users/williamoliveira/go/pkg/mod/github.com/go-rod/rod@v0.116.2/page_eval.go:164 +0xc0 github.com/go-rod/rod.(*Page).Evaluate(0x0, 0x140005af850) /Users/williamoliveira/go/pkg/mod/github.com/go-rod/rod@v0.116.2/page_eval.go:129 +0x48
If you don't use Must prefixed function, you won't get this panic:
Must
https://go-rod.github.io/#/error-handling
Rod Version: v0.116.2
I am connecting to an remote chrome via the ws endpoint. When it loses connection to the browser and I try to call a method without knowing it is disconnected, I get a panic: