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

set LocalStorage error #36

Open
colinsarah opened this issue Jan 30, 2023 · 2 comments
Open

set LocalStorage error #36

colinsarah opened this issue Jan 30, 2023 · 2 comments

Comments

@colinsarah
Copy link

set localstorage before navigate url get error : DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document

chromedp.Run(*tab.Ctx,
		RunWithTimeOut(tab.Ctx, tab.config.DomContentLoadedTimeout, chromedp.Tasks{
			dom.Enable(),
			page.Enable(),
			runtime.Enable(),
			network.Enable(),
			fetch.Enable().WithHandleAuthRequests(true),
			network.SetExtraHTTPHeaders(tab.ExtraHeaders),
			setLocalStorage(LocalStorage),
			chromedp.Navigate(tab.NavigateReq.URL.String()),
		}),

thanks for any help.

@welcome
Copy link

welcome bot commented Jan 30, 2023

Thanks for opening this issue. We should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@waybackarchiver
Copy link
Contributor

@colinsarah Thanks you for your reporting!

Will it work if move setLocalStorage after navigateAndWaitFor?

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

No branches or pull requests

2 participants