Skip to content

[BUG]Exceptions are sometimes reported when the browser is not closed #1152

Description

@liuyazhou1991

Context:

  • Playwright Version: 1.18.1
  • Operating System: Windows
  • Node.js version: 12.22, 14.6
  • Browser: Chromium
    -Python version: 3.8 x86

Code Snippet

from playwright.sync_api import sync_playwright

def run(playwright):

    browser = playwright.chromium.connect_over_cdp("http://localhost:9222")
    page = browser.new_page()
    page.goto("http://example.com/")

with sync_playwright() as playwright:
    run(playwright)

Describe the bug

Sometimes report mistakes:

Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x000002674D05BF78>
Traceback (most recent call last):
  File "C:\Python\lib\asyncio\base_subprocess.py", line 127, in __del__
  File "C:\Python\lib\asyncio\base_subprocess.py", line 104, in close
  File "C:\Python\lib\asyncio\proactor_events.py", line 86, in close
  File "C:\Python\lib\asyncio\base_events.py", line 694, in call_soon
  File "C:\Python\lib\asyncio\base_events.py", line 480, in _check_closed
RuntimeError: Event loop is closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions