Skip to content

[Bug]: route.Continue() with RouteContinueOptions{} provided will hang. #524

Open
@allendolgonos

Description

@allendolgonos

Environments

  • playwright-go Version: Latest
  • Browser: Chromium
  • OS and version: Windows 11

Bug description

To Reproduce
Example:

package main

import "github.com/playwright-community/playwright-go"

func main() {
	// ignore unnecessary error handling code
	pw, _ := playwright.Run()
	browser, _ := pw.Chromium.Launch()
	context, _ := browser.NewContext()
	page, _ := context.NewPage()

        err = task.page.Route("**/*", func(route playwright.Route) {
		request := route.Request()
		headers := request.Headers()
		err = route.Continue(playwright.RouteContinueOptions{Headers: headers}) // Should not hang
		if err != nil {
			log.Println("Error occurred while continuing route")
			return
		}
	})
	if err != nil {
		return err
	}

	_, _ = page.Goto("https://playwright.dev")
}

Additional context
Router hangs when doing route.Continute with ANY RouteContinueOptions. When I remove the RouteContinueOptions, the route.Continue() function works as intended. When even just providing the original headers of the request, route.Continue(...) hangs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions