stitionai / devika

Devika is an Agentic AI Software Engineer that can understand high-level human instructions, break them down into steps, research relevant information, and write code to achieve the given objective. Devika aims to be a competitive open-source alternative to Devin by Cognition AI.
MIT License
17.87k stars 2.32k forks source link

playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded. #326

Open sinanisler opened 3 months ago

sinanisler commented 3 months ago

when it starts to visit more than one URL there is possibility this timeout happening.

it is possible some pages loads slow, too long, too big and effects playwright rendering. (or kinsta blocking agent?) ask this to agent to replicate timeout console log

visit this page and create summarization from it "https://kinsta.com/blog/wordpress-shortcodes/ " Expected behavior it should just open the URL on browser but failed.

Desktop

Link ::  https://kinsta.com/blog/wordpress-shortcodes/ 

Exception in thread Thread-5 (<lambda>):
Traceback (most recent call last):
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Agents\devika2\devika\devika.py", line 96, in <lambda>
    thread = Thread(target=lambda: agent.execute(message, project_name))
  File "D:\Agents\devika2\devika\src\agents\agent.py", line 348, in execute
    search_results = self.search_queries(queries, project_name)
  File "D:\Agents\devika2\devika\src\agents\agent.py", line 111, in search_queries
    browser, raw, data = loop.run_until_complete(self.open_page(project_name, link))
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "D:\Agents\devika2\devika\src\agents\agent.py", line 73, in open_page
    _, raw = await browser.screenshot(project_name)
  File "D:\Agents\devika2\devika\src\browser\browser.py", line 50, in screenshot
    screenshot = await self.page.screenshot()
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\async_api\_generated.py", line 9283, in screenshot
    await self._impl_obj.screenshot(
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_page.py", line 715, in screenshot
    encoded_binary = await self._channel.send("screenshot", params)
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 59, in send
    return await self._connection.wrap_api_call(
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 509, in wrap_api_call
    return await cb()
  File "C:\Users\SinanPC\AppData\Local\Programs\Python\Python310\lib\site-packages\playwright\_impl\_connection.py", line 97, in inner_send
    result = next(iter(done)).result()
playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded.
ARajgor commented 3 months ago

already 20sec timeout is stated in code. is the internet connection is perfect for you?

AmitWiki commented 3 months ago

Faced the same issue on another kinsta page. The real issue is the timeout is not handled, it just stops there, no option to re-activate the agent.

Link :: https://kinsta.com/blog/laravel-relationships/

Exception in thread Thread-3 (): Traceback (most recent call last): File "C:\Users\amitmishra\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Users\amitmishra\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "D:\Source\devika\devika.py", line 96, in thread = Thread(target=lambda: agent.execute(message, project_name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika\src\agents\agent.py", line 347, in execute search_results = self.search_queries(queries, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika\src\agents\agent.py", line 111, in search_queries browser, raw, data = loop.run_until_complete(self.open_page(project_name, link)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\amitmishra\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "D:\Source\devika\src\agents\agent.py", line 73, in openpage , raw = await browser.screenshot(project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika\src\browser\browser.py", line 50, in screenshot screenshot = await self.page.screenshot() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika.venv\Lib\site-packages\playwright\async_api_generated.py", line 9283, in screenshot await self._impl_obj.screenshot( File "D:\Source\devika.venv\Lib\site-packages\playwright_impl_page.py", line 715, in screenshot encoded_binary = await self._channel.send("screenshot", params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika.venv\Lib\site-packages\playwright_impl_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Source\devika.venv\Lib\site-packages\playwright_impl_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "D:\Source\devika.venv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded.