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
[Feature]: Allow launching in incognito mode #8836
Comments
This sounds very reasonable. I suppose we can add a small check that sees if the launch arguments contains incognito and flips the flag appropriately. Would that suffice? |
I don't know the ins and outs, but if that's all it takes to properly set up an incognito session, you could do that. Although I think having a boolean would be a nicer way, and this could also be made compatible with Firefox (disclaimer: I haven't used puppeteer with FF so idk if you'd also use |
Hmm, now that I think about it, it would still only be a heuristic since someone could use a custom-chrome binary which defaults to incognito (as if someone would do that). I'll take a look at Firefox and come up with some solutions. |
I think it's actually a bug in Puppeteer which assumes that the default browser context is non-incognito. It should probably derive it from the actual running browser context. The entire |
@OrKoN Don't you mean "assumes that the default browser context is *non-*incognito" ? |
Maybe we can prioritize the context created by user instead of using the default one? When user specified, no default one will be created? |
the default one is created by the browser itself and it is not explicitly created by Puppeteer. |
Closing in favor of #11686 We want to get rid of relying on the term "incognito" as it is Chrome-specific and instead we will only report if a given context is the default one or if it was created via Puppeteer's https://pptr.dev/api/puppeteer.browser.createbrowsercontext/ (where the word incognito has already been dropped). |
Currently,
puppeteer.launch
opens a non-incognito context, and while one can open an incognito context viacreateIncognitoBrowserContext
, this seems like an unnecessary hassle, especially since an extra context was created (and remains open).Chromium supports launching in incognito mode via
-incognito
, but specifying this inpuppeteer.launch
let's Puppeteer still think that it's a non-incognito context:isIncognito
returnsfalse
, which may cause some problems.It would be nice to have a documented way of doing this, via a boolean option in
puppeter.launch
.The text was updated successfully, but these errors were encountered: