rod: UserDataDir doesn't reuse the saved session cookies if "password-store=basic" is enabled
Rod Version: v0.49.4
To Reproduce
- on linux
- Manually open your local chrome, and login to github.
- Run the below code to use local session cookies (with go-rod) in headless mode.
func main() {
url := launcher.New().UserDataDir("/home/<username>/.config/google-chrome").
Headless(false).Launch()
bs := rod.New().ControlURL(url).Connect()
bs.Page("https://github.com")
}
Expected behavior
Current user’s profile page should be visible.
Actual result
Local session cookies have somehow got corrupted, logging me out of github (most other sites too!).
Workaround
In launcher.go removing the password-store=basic flag does the trick and allows to use the local session. See https://github.com/puppeteer/puppeteer/issues/1316#issuecomment-384813318
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (6 by maintainers)
NewUserModeis the same asNew, just another option initializer, if you check their source code you will understand it immediately. I made the source code easy to read on purpose.