-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
RuntimeError("Timeout should be used inside a task") in Stealthy Playwright Mode #4302
Copy link
Copy link
Closed
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixedUh oh... Something needs to be fixed
Description
RuntimeError("Timeout should be used inside a task") in Stealthy Playwright Mode.
There was also this: RuntimeWarning: coroutine 'Event.wait' was never awaited.
Stack trace:
Traceback (most recent call last):
File "<REDACTED>", line 22, in <module>
sb.click(selector)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/michael/github/SeleniumBase/seleniumbase/core/sb_cdp.py", line 837, in click
element.click() # Standard CDP click
~~~~~~~~~~~~~^^
File "/Users/michael/github/SeleniumBase/seleniumbase/core/sb_cdp.py", line 60, in <lambda>
element.click = lambda: self.__click(element)
~~~~~~~~~~~~^^^^^^^^^
File "/Users/michael/github/SeleniumBase/seleniumbase/core/sb_cdp.py", line 487, in __click
self.loop.run_until_complete(self.page.wait(0.2))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/Users/michael/.virtualenvs/playwright/lib/python3.14/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
~~~~~~~~^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/futures.py", line 208, in result
raise self._exception.with_traceback(self._exception_tb)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result
result = coro.send(None)
File "/Users/michael/github/SeleniumBase/seleniumbase/undetected/cdp_driver/connection.py", line 316, in wait
await asyncio.wait_for(
self.listener.idle.wait(), timeout=t
)
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/tasks.py", line 487, in wait_for
async with timeouts.timeout(timeout):
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__
raise RuntimeError("Timeout should be used inside a task")
RuntimeError: Timeout should be used inside a task
<sys>:0: RuntimeWarning: coroutine 'Event.wait' was never awaitedIt may be related to using nest-asyncio since this only happens with Stealthy Playwright Mode and not regular CDP Mode.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixedUh oh... Something needs to be fixed