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

fix: ignore exceptions from updateInterceptorPatterns #2317

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Feb 23, 2024

Motivation:

Task exception was never retrieved
future: <Task finished name='Task-9032' coro=<Connection.wrap_api_call() done, defined at /home/runner/work/playwright-python/playwright-python/playwright/_impl/_connection.py:481> exception=TargetClosedError('Target page, context or browser has been closed')>
Traceback (most recent call last):
  File "/home/runner/work/playwright-python/playwright-python/playwright/_impl/_connection.py", line 490, in wrap_api_call
    return await cb()
           ^^^^^^^^^^
  File "/home/runner/work/playwright-python/playwright-python/playwright/_impl/_page.py", line 673, in _update_interception_patterns
    await self._channel.send(
  File "/home/runner/work/playwright-python/playwright-python/playwright/_impl/_connection.py", line 58, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/playwright-python/playwright-python/playwright/_impl/_connection.py", line 485, in wrap_api_call
    return await cb()
           ^^^^^^^^^^
  File "/home/runner/work/playwright-python/playwright-python/playwright/_impl/_connection.py", line 96, in inner_send
    result = next(iter(done)).result()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._errors.TargetClosedError: Target page, context or browser has been closed

Motivation: We saw this error in the logs and follow what we do upstream.

@mxschmitt mxschmitt merged commit 976f04f into microsoft:main Feb 23, 2024
38 checks passed
@mxschmitt
Copy link
Member Author

TBR @yury-s

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

Successfully merging this pull request may close these issues.

1 participant