Skip to content

asyncio warnings appearing on Python 3.14 (when using the sb_cdp format) #4041

@mdmintz

Description

@mdmintz

asyncio warnings appearing on Python 3.14 (when using the sb_cdp format)


When using the Pure CDP Mode format (sb_cdp), there are asyncio warnings appearing on Python 3.14:

ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-6' coro=<Connection.keepalive() running at /Users/michael/.virtualenvs/sbase14/lib/python3.14/site-packages/websockets/asyncio/connection.py:815> wait_for=<Future pending cb=[Task.task_wakeup()]>>
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-7' coro=<Listener.listener_loop() running at /Users/michael/github/SeleniumBase/seleniumbase/undetected/cdp_driver/connection.py:606> wait_for=<Future pending cb=[Task.task_wakeup()]>>
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task cancelling name='Task-4' coro=<Listener.listener_loop() running at /Users/michael/github/SeleniumBase/seleniumbase/undetected/cdp_driver/connection.py:606> wait_for=<Future cancelled>>
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-3' coro=<Connection.keepalive() running at /Users/michael/.virtualenvs/sbase14/lib/python3.14/site-packages/websockets/asyncio/connection.py:815> wait_for=<Future pending cb=[Task.task_wakeup()]>>

Perhaps I discovered a bug with Python 3.14 since these errors aren't appearing on earlier Python versions?
These warnings appears to be harmless because the scripts that encounter them are still working properly.
Maybe the best thing is to hide them. (Maybe by Python 3.14.1, the issue will be fixed if it's a Python 3.14 bug.)

Metadata

Metadata

Assignees

Labels

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions