pguardiario/captchas

[BUG] Message: javascript error: document unloaded while waiting for result

monk1337 opened this issue · 0 comments

---------------------------------------------------------------------------
JavascriptException                       Traceback (most recent call last)
Cell In[12], line 3
      1 driver.set_script_timeout(1000)
      2 api_key = 'key'
----> 3 status = driver.execute_async_script(body, api_key, {})
      4 print(status)

File ~/miniforge3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:906, in WebDriver.execute_async_script(self, script, *args)
    903 converted_args = list(args)
    904 command = Command.W3C_EXECUTE_SCRIPT_ASYNC
--> 906 return self.execute(command, {
    907     'script': script,
    908     'args': converted_args})['value']

File ~/miniforge3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:430, in WebDriver.execute(self, driver_command, params)
    428 response = self.command_executor.execute(driver_command, params)
    429 if response:
--> 430     self.error_handler.check_response(response)
    431     response['value'] = self._unwrap_value(
    432         response.get('value', None))
    433     return response

File ~/miniforge3/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py:247, in ErrorHandler.check_response(self, response)
    245         alert_text = value['alert'].get('text')
    246     raise exception_class(message, screen, stacktrace, alert_text)  # type: ignore[call-arg]  # mypy is not smart enough here
--> 247 raise exception_class(message, screen, stacktrace)

JavascriptException: Message: javascript error: document unloaded while waiting for result
  (Session info: headless chrome=108.0.5359.124)
Stacktrace:
0   3c39efa2b06ef231_chromedriver       0x0000000105228f38 3c39efa2b06ef231_chromedriver + 4910904
1   3c39efa2b06ef231_chromedriver       0x00000001051a8a03 3c39efa2b06ef231_chromedriver + 4385283
2   3c39efa2b06ef231_chromedriver       0x0000000104ded747 3c39efa2b06ef231_chromedriver + 472903
3   3c39efa2b06ef231_chromedriver       0x0000000104df23e1 3c39efa2b06ef231_chromedriver + 492513
4   3c39efa2b06ef231_chromedriver       0x0000000104df29cb 3c39efa2b06ef231_chromedriver + 494027
5   3c39efa2b06ef231_chromedriver       0x0000000104e744e3 3c39efa2b06ef231_chromedriver + 1025251
6   3c39efa2b06ef231_chromedriver       0x0000000104e58112 3c39efa2b06ef231_chromedriver + 909586
7   3c39efa2b06ef231_chromedriver       0x0000000104e7328e 3c39efa2b06ef231_chromedriver + 1020558
8   3c39efa2b06ef231_chromedriver       0x0000000104e57ee3 3c39efa2b06ef231_chromedriver + 909027
9   3c39efa2b06ef231_chromedriver       0x0000000104e2230c 3c39efa2b06ef231_chromedriver + 688908
10  3c39efa2b06ef231_chromedriver       0x0000000104e2388e 3c39efa2b06ef231_chromedriver + 694414
11  3c39efa2b06ef231_chromedriver       0x00000001051f61de 3c39efa2b06ef231_chromedriver + 4702686
12  3c39efa2b06ef231_chromedriver       0x00000001051fab19 3c39efa2b06ef231_chromedriver + 4721433
13  3c39efa2b06ef231_chromedriver       0x000000010520228e 3c39efa2b06ef231_chromedriver + 4752014
14  3c39efa2b06ef231_chromedriver       0x00000001051fb91a 3c39efa2b06ef231_chromedriver + 4725018
15  3c39efa2b06ef231_chromedriver       0x00000001051cfb02 3c39efa2b06ef231_chromedriver + 4545282
16  3c39efa2b06ef231_chromedriver       0x000000010521a888 3c39efa2b06ef231_chromedriver + 4851848
17  3c39efa2b06ef231_chromedriver       0x000000010521aa05 3c39efa2b06ef231_chromedriver + 4852229
18  3c39efa2b06ef231_chromedriver       0x0000000105230e5f 3c39efa2b06ef231_chromedriver + 4943455
19  libsystem_pthread.dylib             0x00007ff818e914e1 _pthread_start + 125
20  libsystem_pthread.dylib             0x00007ff818e8cf6b thread_start + 15