We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm running 0.45.2 but this bug appears to affect versions 0.45+
Running in headed mode works:
browser = await nodriver.start(headless=False) tab = await self._browser.get("https://www.google.com")
Running in headless mode fails due to an infinite loop:
browser = await nodriver.start(headless=True) tab = await self._browser.get("https://www.google.com")
Stack trace:
File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/connection.py", line 518, in _send_oneshot return await self.send(cdp_obj, _is_update=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/tab.py", line 202, in send await self._prepare_headless() File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/tab.py", line 211, in _prepare_headless resp = await self._send_oneshot( ^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/connection.py", line 518, in _send_oneshot return await self.send(cdp_obj, _is_update=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/tab.py", line 202, in send await self._prepare_headless() File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/tab.py", line 211, in _prepare_headless resp = await self._send_oneshot( ^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/connection.py", line 518, in _send_oneshot return await self.send(cdp_obj, _is_update=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/szdc/Documents/code/nodriver_example/.venv/lib/python3.13/site-packages/nodriver/core/tab.py", line 202, in send await self._prepare_headless() File "...", line -1, in [rest of traceback truncated] RecursionError: maximum recursion depth exceeded
The root cause here appears to be this commit that added a send method to the Tab class that overrides Connection.send:
send
Connection.send
Tab.send
_prepare_headless
_send_oneshot
I'm not a collaborator so I can't submit a pull request, but you could fix this by calling the base send method directly: ultrafunkamsterdam/nodriver@main...szdc:nodriver:main
The text was updated successfully, but these errors were encountered:
Ah yeah good catch. Some things have changed and this has slipped attention. Will fix today
Sorry, something went wrong.
No branches or pull requests
I'm running 0.45.2 but this bug appears to affect versions 0.45+
Running in headed mode works:
Running in headless mode fails due to an infinite loop:
Stack trace:
The root cause here appears to be this commit that added a
send
method to the Tab class that overridesConnection.send
:Tab.send
calls_prepare_headless
_prepare_headless
calls_send_oneshot
, a method on the Connection base class_send_oneshot
callssend
, which is the method on Tab, not ConnectionI'm not a collaborator so I can't submit a pull request, but you could fix this by calling the base
send
method directly: ultrafunkamsterdam/nodriver@main...szdc:nodriver:mainThe text was updated successfully, but these errors were encountered: