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

[QUESTION] Call close() on BrowserContext closes chromium when used with --single-process option #1904

Closed
SeekDaSky opened this issue Apr 21, 2020 · 1 comment

Comments

@SeekDaSky
Copy link

Context:

  • Playwright Version:0.13.0
  • Operating System: Linux
  • Extra: Code built with Typescript

Code Snippet

import { chromium } from 'playwright'

(async () => {
   const c = await chromium.launch({
        args: [
            '--single-process'
          ]
    })
    let ctx = await c.newContext()
    let p = await ctx.newPage()
    await ctx.close()
   //fails
    ctx = await c.newContext()
})();

Describe the bug

I tried to use chromium in single-process mode to try to make it more lightweight, but by doing so closing a BrowserContext also closes the browser, this might be a normal behavior, but if so it should be documented

@SeekDaSky SeekDaSky changed the title [BUG] Call close() on BrowserContext closes chromium when used with --single-process option [Question] Call close() on BrowserContext closes chromium when used with --single-process option Apr 21, 2020
@SeekDaSky SeekDaSky changed the title [Question] Call close() on BrowserContext closes chromium when used with --single-process option [QUESTION] Call close() on BrowserContext closes chromium when used with --single-process option Apr 21, 2020
@pavelfeldman
Copy link
Member

--single-process is among the flags that are there for internal Chromium needs, they don't warrant normal browser operation and can be gone at any moment. There have been times browser did not even start in a single process mode.

We assume user takes full responsibility over the runtime should they pass any command line flags into Chromium. I thought it goes without saying, but it does not hurt adding it into the docs!

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