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

Using a headed browser with a proxy causes ERR_TIMED_OUT #968

Open
miromiro11 opened this issue Oct 30, 2023 · 7 comments
Open

Using a headed browser with a proxy causes ERR_TIMED_OUT #968

miromiro11 opened this issue Oct 30, 2023 · 7 comments
Labels
question Questions related to rod

Comments

@miromiro11
Copy link

miromiro11 commented Oct 30, 2023

Rod Version: v0.114.4

I was following this example: https://go-rod.github.io/#/network/README?id=proxy

Here is the code I attempted to run:

func main() {
	l := launcher.New()

	l = l.Set(flags.ProxyServer, "ip:port")

	l = l.Headless(false)

	controlURL, err := l.Launch()
	if err != nil {
		log.Fatalf("Failed to launch browser: %v", err)
	}

	browser := rod.New().ControlURL(controlURL).MustConnect()

	browser.MustIgnoreCertErrors(true)

	go browser.MustHandleAuth("login", "password")()

	page := browser.MustPage("http://api.ipify.org").MustWaitLoad()

	log.Println(page.HTML())

	time.Sleep(60 * time.Second)
}

Result:

panic: navigation failed: net::ERR_TIMED_OUT

it works when its headless, it doesn't when its headed, any ideas?

@miromiro11 miromiro11 added the question Questions related to rod label Oct 30, 2023
@github-actions
Copy link

Please fix the format of your markdown:

6 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
6 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
36 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]

generated by check-issue

@ysmood
Copy link
Collaborator

ysmood commented Oct 30, 2023

How do you setup your proxy server?

@miromiro11
Copy link
Author

How do you setup your proxy server?

I purchased them from another site so Im not sure, but they work with puppeteer and playwright so I'm not sure what the issue is

@ysmood
Copy link
Collaborator

ysmood commented Oct 30, 2023

it works fine to me

@miromiro11
Copy link
Author

it works fine to me

Can I see your code?

@ysmood
Copy link
Collaborator

ysmood commented Oct 30, 2023

I just run same code as yours, it works fine to me.

@miromiro11
Copy link
Author

I just run same code as yours, it works fine to me.

well maybe it works fine locally but with proxies I'm using it doesn't, ad I'm pretty sure the proxy is not the issue as I've tested it with a proxy tester, and with puppeteer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants