[Bug]: Passing userDataDir to Puppeteer does not access the correct saved logins as regular Chrome #10666
Labels
bug
disable-analyzer
Disables the automatic workflow that tries to reproduce bug reports
needs-feedback
Minimal, reproducible example
Error string
no error
Bug behavior
Background
I want to use Puppeteer to control the same profile/session as my regular Chrome browser. Specifically, I would like the websites I have logged in to stay logged in when opening a new Puppeteer instance.
Expectation
Passing
userDataDir
to Puppeteer does not work as expected.It should open the same session that I normally have access to when opening a non-Puppeteer-spawned Chrome and have all my saved logins so I don't have to login to websites using Puppeteer.
Reality
I am able to open a Puppeteer Chrome instance and the instance definitely has the bookmarks and profile picture and even the same tabs as a non-Puppeteer-spawned Chrome. The Puppeteer-spawned Chrome instance also has the "Chrome is being controlled by automated test software" message.
However, on the Puppeteer-spawned Chrome, I am not logged in any websites that I am normally on the non-Puppeteer-spawned Chrome browser. So it's like the cookies, storage, or whatever is not working properly or not being used by Puppeteer or something.
To see if I could have any more luck, I manually copied the
userDataDir
to/Users/${username}/Library/Application\ Support/Google/Chrome_
(just has an underscore at the end) and tried using this new folder with Puppeteer but it still does not work.Puppeteer configuration file (if used)
No response
Puppeteer version
20.9.0
Node version
16.17.0
Package manager
npm
Package manager version
8.15.0
Operating system
macOS
The text was updated successfully, but these errors were encountered: