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

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

Open
allendolgonos opened this issue Jan 24, 2025 · 0 comments
Labels
p2-bug Something isn't working

Comments

@allendolgonos
Copy link

allendolgonos commented Jan 24, 2025

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.

@allendolgonos allendolgonos added the p2-bug Something isn't working label Jan 24, 2025
@allendolgonos allendolgonos changed the title [Bug]: [Bug]: route.Continue() with RouteContinueOptions{} provided will hang. Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant