Home > Backend Development > Python Tutorial > Why Does InstaPy Fail with \'cannot determine loading status from tab crashed\' and How Can I Fix It?

Why Does InstaPy Fail with \'cannot determine loading status from tab crashed\' and How Can I Fix It?

Mary-Kate Olsen
Release: 2024-11-24 21:15:14
Original
434 people have browsed it

Why Does InstaPy Fail with

Unable to Determine Loading Status from Tab Crashed

Problem:

When using InstaPy, a Python and Selenium-based program, users sometimes encounter the error "unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed."

Error Message:

ERROR [2018-12-10 09:53:54] [user]  Error occurred while deleting cookies from web browser!
b'Message: invalid session id\n  (Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 4.15.0-42-generic x86_64)\n'
Copy after login

Possible Reasons:

  • Small size of /dev/shm in Docker containers
  • Chrome crashing due to insufficient memory

Solutions:

  • Add --no-sandbox Argument:
chrome_options.add_argument('--no-sandbox')
Copy after login
  • Fix Small /dev/shm Size:
sudo mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm
Copy after login
  • Share Host /dev/shm:
-v /dev/shm:/dev/shm
Copy after login
  • Disable /dev/shm Usage:
chrome_options.add_argument('--disable-dev-shm-usage')
Copy after login

Additional Notes:

  • This error relates to a Chromium issue where Linux attempts to use /dev/shm for non-executable memory.
  • The fix was implemented in Chrome version 65.0.3299.6.

The above is the detailed content of Why Does InstaPy Fail with \'cannot determine loading status from tab crashed\' and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template