playwright-java icon indicating copy to clipboard operation
playwright-java copied to clipboard

[BUG] "Gracefully close" not end in 30s - Issue #347 reproduction

Open gemiusz opened this issue 3 years ago • 8 comments

Context:

  • Playwright Version: 1.22 (JAVA)
  • Operating System: Windows 10 Pro
  • Browser: Chrome (103.0.5060.53)
  • Extra: Browser managed by the organization.

Code Snippet

import com.microsoft.playwright.*;
import org.testng.annotations.Test;

public class PlayWrightTestNGExample {

    @Test
    public void testName() {
        Playwright playwright = Playwright.create();
        Browser browser;
        BrowserContext context;
        Page page;
        browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(false).setChannel("chrome"));
        context = browser.newContext();
        page = context.newPage();

        page.navigate("chrome://chrome-urls/");

        page.close();
        context.close();
        browser.close();
    }
}

Describe the bug

It took me a week of looking how to reproduce Bug mentioned and closed here https://github.com/microsoft/playwright-java/issues/347

I announce that: I have reproduced it xD

Below long story short: I asked about this issue on Polish Facebook Playright group and one person have the same issue but in Playwright JS version. In my work environment Chrome is managed by organisation and have appiled some polices - the same have person from #347 and facebook group so this was place to search. After some analyses and tirals with Workplace Team who managed polices we found that Extensions making problem - when all disabled everything working fine. Today I added Chrome polices to my private laptop and found that when Policy ExtensionInstallForcelist is enabled and added for example Webex Extension Playwright driver have mentioned above problems with "Gracefully Close".

Logs when Policy is enabled: image

Policy settings: image

I think the find above should help in preparing the fix.

gemiusz avatar Jun 27 '22 19:06 gemiusz