<small id='OGVzX'></small><noframes id='OGVzX'>

          <bdo id='OGVzX'></bdo><ul id='OGVzX'></ul>
        <tfoot id='OGVzX'></tfoot>

        <i id='OGVzX'><tr id='OGVzX'><dt id='OGVzX'><q id='OGVzX'><span id='OGVzX'><b id='OGVzX'><form id='OGVzX'><ins id='OGVzX'></ins><ul id='OGVzX'></ul><sub id='OGVzX'></sub></form><legend id='OGVzX'></legend><bdo id='OGVzX'><pre id='OGVzX'><center id='OGVzX'></center></pre></bdo></b><th id='OGVzX'></th></span></q></dt></tr></i><div id='OGVzX'><tfoot id='OGVzX'></tfoot><dl id='OGVzX'><fieldset id='OGVzX'></fieldset></dl></div>
        <legend id='OGVzX'><style id='OGVzX'><dir id='OGVzX'><q id='OGVzX'></q></dir></style></legend>

      1. 未知错误:由于未知错误导致页面崩溃,会话被删除:无法从 ChromeDriver Selenium 崩溃的选项卡中确定加

        unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium(未知错误:由于未知错误导致页面崩溃,会话被删除:无法从 ChromeDriver Selenium 崩溃的选项卡中确

          <tbody id='RVwCy'></tbody>
          <legend id='RVwCy'><style id='RVwCy'><dir id='RVwCy'><q id='RVwCy'></q></dir></style></legend>
        1. <small id='RVwCy'></small><noframes id='RVwCy'>

            1. <tfoot id='RVwCy'></tfoot>
                <i id='RVwCy'><tr id='RVwCy'><dt id='RVwCy'><q id='RVwCy'><span id='RVwCy'><b id='RVwCy'><form id='RVwCy'><ins id='RVwCy'></ins><ul id='RVwCy'></ul><sub id='RVwCy'></sub></form><legend id='RVwCy'></legend><bdo id='RVwCy'><pre id='RVwCy'><center id='RVwCy'></center></pre></bdo></b><th id='RVwCy'></th></span></q></dt></tr></i><div id='RVwCy'><tfoot id='RVwCy'></tfoot><dl id='RVwCy'><fieldset id='RVwCy'></fieldset></dl></div>
                • <bdo id='RVwCy'></bdo><ul id='RVwCy'></ul>
                  本文介绍了未知错误:由于未知错误导致页面崩溃,会话被删除:无法从 ChromeDriver Selenium 崩溃的选项卡中确定加载状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用使用 Python 和 Selenium 的 InstaPy.我按 Cron 启动脚本,但有时它会崩溃.所以它真的很不规则,有时它运行得很好.我也已经在 GitHub Repo 上发布过,但那里没有得到答案,所以我现在在这里问是否有人知道原因.

                  I'm using InstaPy which use Python and Selenium. I start the script per Cron and from time to time it crashes. So it'r really irregular, sometimes it runs well through. I'v posted on GitHub Repo as well already but didn't get an answer there, so i'm asking here now if someone has an idea why.

                  这是一个数字海洋 ubuntu 服务器,我在无头模式下使用它.驱动程序版本在日志中可见.以下是错误消息:

                  It's a digital ocean ubuntu server and i'm using it on headless mode. The driver version are visible on the log. here are error messages:

                  ERROR [2018-12-10 09:53:54] [user]  Error occurred while deleting cookies from web browser!
                  b'Message: invalid session id
                    (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)
                  '
                  Traceback (most recent call last):
                    File "/root/InstaPy/instapy/util.py", line 1410, in smart_run
                      yield
                    File "./my_config.py", line 43, in <module>
                      session.follow_user_followers(['xxxx','xxxx','xxxx','xxxx'], amount=100, randomize=True, interact=True)
                    File "/root/InstaPy/instapy/instapy.py", line 2907, in follow_user_followers
                      self.logfolder)
                    File "/root/InstaPy/instapy/unfollow_util.py", line 883, in get_given_user_followers
                      channel, jumps, logger, logfolder)
                    File "/root/InstaPy/instapy/unfollow_util.py", line 722, in get_users_through_dialog
                      person_list = dialog_username_extractor(buttons)
                    File "/root/InstaPy/instapy/unfollow_util.py", line 747, in dialog_username_extractor
                      person_list.append(person.find_element_by_xpath("../../../*")
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 351, in find_element_by_xpath
                      return self.find_element(by=By.XPATH, value=xpath)
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 659, in find_element
                      {"using": by, "value": value})['value']
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
                      return self._parent.execute(command, params)
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
                      self.error_handler.check_response(response)
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
                      raise exception_class(message, screen, stacktrace)
                  selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
                  from unknown error: cannot determine loading status
                  from tab crashed
                    (Session info: headless chrome=70.0.3538.110)
                    (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)
                  
                  During handling of the above exception, another exception occurred:
                  
                      Traceback (most recent call last):
                    File "/root/InstaPy/instapy/instapy.py", line 3845, in end
                      self.browser.delete_all_cookies()
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 878, in delete_all_cookies
                      self.execute(Command.DELETE_ALL_COOKIES)
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
                      self.error_handler.check_response(response)
                    File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
                      raise exception_class(message, screen, stacktrace)
                  selenium.common.exceptions.WebDriverException: Message: chrome not reachable
                    (Session info: headless chrome=71.0.3578.80)
                    (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)
                  

                  知道可能是什么原因以及如何解决吗?

                  Any idea what the reason could be and how to solve it?

                  感谢您的意见.来自 http://treestones.ch/ 的人帮助了我.

                  Thanks for the inputs. And the guys from http://treestones.ch/ helped me out.

                  推荐答案

                  虽然你看到的错误是:

                  Error occurred while deleting cookies from web browser!
                  b'Message: invalid session id
                    (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)
                  '
                  

                  主要的例外是:

                  selenium.common.exceptions.WebDriverException: Message: unknown error: session deleted because of page crash
                  from unknown error: cannot determine loading status
                  from tab crashed
                  

                  您的代码试验会给我们一些线索,说明出了什么问题.

                  Your code trials would have given us some clues what going wrong.

                  这个问题有多种解决方案.但是根据 UnknownError: session deleted because page crashed from tab crashed 这个问题可以可通过以下任一方案解决:

                  There are diverse solution to this issue. However as per UnknownError: session deleted because of page crash from tab crashed this issue can be solved by either of the following solutions:

                  • 添加以下chrome_options:

                  chrome_options.add_argument('--no-sandbox')         
                  

                • 由于 /dev/shm 太小,Chrome 似乎在某些页面上的 Docker 容器中崩溃.所以你可能需要修复小的 /dev/shm 大小.

                • Chrome seem to crash in Docker containers on certain pages due to too small /dev/shm. So you may have to fix the small /dev/shm size.

                  一个例子:

                  sudo mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm
                  

                • 如果你使用 -v/dev/shm:/dev/shm 选项来共享 host /dev/shm

                  另一种方法是将 chrome_options 添加为 --disable-dev-shm-usage.这将强制 Chrome 使用 /tmp 目录.这可能会减慢执行速度,因为将使用磁盘而不是内存.

                  Another way to make it work would be to add the chrome_options as --disable-dev-shm-usage. This will force Chrome to use the /tmp directory instead. This may slow down the execution though since disk will be used instead of memory.

                  chrome_options.add_argument('--disable-dev-shm-usage')        
                  

                • from tab crashedChromium 团队 的 WIP(Work In Progress) 已经有一段时间了,这与 Linux 有关试图始终将/dev/shm 用于不可执行的内存.以下是参考:

                  from tab crashed was WIP(Work In Progress) with the Chromium Team for quite some time now which relates to Linux attempting to always use /dev/shm for non-executable memory. Here are the references :

                  • Linux:Chrome/Chromium SIGBUS/Aw,快!在小/dev/shm
                  • 当/dev/shm 太小时,Chrome 崩溃/加载失败,并且位置不能被覆盖
                  • 根据 Comment61#Issue 736452 修复似乎已经登陆 Chrome v65.0.3299.6
                  • Linux: Chrome/Chromium SIGBUS/Aw, Snap! on small /dev/shm
                  • Chrome crashes/fails to load when /dev/shm is too small, and location can't be overridden
                  • As per Comment61#Issue 736452 the fix seems to be have landed with Chrome v65.0.3299.6

                  您可以在以下位置找到一些相关讨论:

                  You can find a couple of relevant discussions in:

                  • org.openqa.selenium.SessionNotCreatedException: 从 Jenkins CI 服务器执行时,会话未从选项卡崩溃错误中创建异常

                  这篇关于未知错误:由于未知错误导致页面崩溃,会话被删除:无法从 ChromeDriver Selenium 崩溃的选项卡中确定加载状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                  <legend id='LGpTx'><style id='LGpTx'><dir id='LGpTx'><q id='LGpTx'></q></dir></style></legend>
                • <small id='LGpTx'></small><noframes id='LGpTx'>

                    <tfoot id='LGpTx'></tfoot>
                      <tbody id='LGpTx'></tbody>
                      <i id='LGpTx'><tr id='LGpTx'><dt id='LGpTx'><q id='LGpTx'><span id='LGpTx'><b id='LGpTx'><form id='LGpTx'><ins id='LGpTx'></ins><ul id='LGpTx'></ul><sub id='LGpTx'></sub></form><legend id='LGpTx'></legend><bdo id='LGpTx'><pre id='LGpTx'><center id='LGpTx'></center></pre></bdo></b><th id='LGpTx'></th></span></q></dt></tr></i><div id='LGpTx'><tfoot id='LGpTx'></tfoot><dl id='LGpTx'><fieldset id='LGpTx'></fieldset></dl></div>

                          <bdo id='LGpTx'></bdo><ul id='LGpTx'></ul>