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

MustSetExtraHeaders Always return ERR_INVALID_ARGUMENT #543

Closed
deanchou opened this issue Feb 21, 2022 · 1 comment
Closed

MustSetExtraHeaders Always return ERR_INVALID_ARGUMENT #543

deanchou opened this issue Feb 21, 2022 · 1 comment
Labels
question Questions related to rod

Comments

@deanchou
Copy link

deanchou commented Feb 21, 2022

Rod Version: v0.102.1

// Please make sure your code is minimal and standalone
func main() {
	path, _ := launcher.LookPath()
	launcher := launcher.New().Headless(false).UserDataDir(dataDir)

	u := launcher.Set("disable-features", "Translate").Bin(path).MustLaunch()
	b := rod.New().Trace(true).SlowMotion(200 * time.Millisecond).
		ControlURL(u).MustConnect().MustIncognito()

	page1 := stealth.MustPage(b)
	page1.MustSetExtraHeaders("Proxy-Header", "1", "b", "2")
	page1.MustNavigate("https://outlook.live.com/")
	page1.WaitLoad()
}

MustNavigate always return ERR_INVALID_ARGUMENT

@deanchou deanchou added the question Questions related to rod label Feb 21, 2022
@ysmood
Copy link
Member

ysmood commented Apr 7, 2022

I think it's because Chromium doesn't allow to set extra headers like Proxy-Header, Host, etc

puppeteer/puppeteer#4575
puppeteer/puppeteer#5077

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