Skip to content

Reconnect to the same browser and use WaitRequestIdle will hang forever #207

@panyanyany

Description

@panyanyany

Rod Version: v0.52.0

To Reproduce

func main() {
	u := launcher.New().Headless(false).RemoteDebuggingPort(8765).MustLaunch()
	b := rod.New().Timeout(30 * time.Second).ControlURL(u).MustConnect()

	page := b.MustPages()[0]
	nav(page)
	fmt.Println("1")
	nav(page)
	fmt.Println("2")
}

func nav(page *rod.Page) {
	wait := page.MustWaitRequestIdle()
	page.MustNavigate("https://www.taobao.com")
	wait()
}
go run ./main.go
go run ./main.go

Expected behavior

1
2
1
2

What you expected to get.

Actual result

1
2
1
panic: context deadline exceeded

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestions related to rod

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions