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

[BUG] Error: Playwright connection closed with wait_for_timeout(60000+) #364

Open
MGmotor opened this issue Dec 30, 2022 · 0 comments
Open

Comments

@MGmotor
Copy link

MGmotor commented Dec 30, 2022

Context:
Playwright Version: [1.27.0+]
Operating System: [Linux]
Python version: [3.8]
Browser: [Chromium, Chrome] (with firefox all good)

Example:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.connect(ws_endpoint="ws://***/playwright/chrome/playwright-1.27.0")
    page = browser.new_page()
    page.goto("http://playwright.dev")
    print("before timeout")
    print(page.title())
    page.wait_for_timeout(70000)
    print("after timeout")
    print(page.title())
    browser.close()

After this i get:

before timeout
Fast and reliable end-to-end testing for modern web apps | Playwright

and then:

  File "/playwright/sync_api/_generated.py", line 10285, in wait_for_timeout
    self._sync(self._impl_obj.wait_for_timeout(timeout=timeout))
  File "/playwright/_impl/_sync_base.py", line 104, in _sync
    return task.result()
  File "/playwright/_impl/_page.py", line 923, in wait_for_timeout
    await self._main_frame.wait_for_timeout(timeout)
  File "/playwright/_impl/_frame.py", line 740, in wait_for_timeout
    await self._channel.send("waitForTimeout", locals_to_params(locals()))
  File "/playwright/_impl/_connection.py", line 43, in send
    return await self._connection.wrap_api_call(
  File "/playwright/_impl/_connection.py", line 396, in wrap_api_call
    return await cb()
  File "/playwright/_impl/_connection.py", line 78, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.Error: Playwright connection closed
@vania-pooh vania-pooh modified the milestones: 2.4.2, 2.4.3 Dec 30, 2022
@vania-pooh vania-pooh modified the milestones: 2.4.3, 2.4.4 Jan 12, 2023
@vania-pooh vania-pooh modified the milestones: 2.4.4, 2.4.5 Feb 1, 2023
@vania-pooh vania-pooh modified the milestones: 2.4.5, 2.4.6 Mar 2, 2023
@vania-pooh vania-pooh modified the milestones: 2.5.0, 2.5.1 Apr 27, 2023
@vania-pooh vania-pooh modified the milestones: 2.5.1, 2.5.2 May 18, 2023
@vania-pooh vania-pooh removed this from the 2.5.2 milestone Jul 6, 2023
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