Instapy: Session deleted because of page crash error

Created on 26 Nov 2017  路  6Comments  路  Source: timgrossmann/InstaPy

Expected Behavior

I'm running the bot on a DigitalOcean droplet with some changes that I'm testing to make it work everyday doing different things, so I need the python script running 24/7 on the server (it doesn't perform Instagram actions over night though). For this purpose I'm using "screen" and I'm able to make my server run the python script even when I'm not logged in my vps.

Current Behavior

The problem is after a while that the InstaPy bot is running on the server I get this error:

bot.myFollByFoll(me)
File "/root/testinsta2/instapy/instapy.py", line 197, in myFollByFoll
self.follow_user_following(users, amount=amount, random=thisRandom, interact=interactFlag, me=me)
File "/root/testinsta2/instapy/instapy.py", line 1325, in follow_user_following
me=me)
File "/root/testinsta2/instapy/unfollow_util.py", line 664, in follow_given_user_following
me=me)
File "/root/testinsta2/instapy/unfollow_util.py", line 334, in follow_through_dialog
person_list.append(person.find_element_by_xpath("../../../*")
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/remote/webelement.py", line 233, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/remote/webelement.py", line 478, in find_element
{"using": by, "value": value})['value']
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium-2.53.6-py3.5.egg/selenium/webdriver/remote/errorhandler.py", line 192, 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: chrome=62.0.3202.94)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.4.0-101-generic x86_64)

May someone please help me? I did make some changes but not to the script itself, and when I run it in my local machine (Windows) it works like a charm. It might be a problem with chromedriver for Linux on the server?

I'm new to python programming and vps', thanks in advance.

help wanted wontfix

All 6 comments

hi @jackpot001 , I think just updating selenium will fix the problem, you're using 2.53, the actual version is 3.7

Thanks @converge for replying!

I'll test it right now after updating selenium to the latest version, I hadn't thought about it.

Hope it works, I'll let you know.

I'm still getting the same error, I figured out it only happens on foll_by_foll feature.

Traceback (most recent call last):
File "test.py", line 85, in
bot.myFollByFoll(me)
File "/root/hekti/instapy/instapy.py", line 194, in myFollByFoll
self.follow_user_followers(users, amount=amount, random=thisRandom, interact=interactFlag, me=me)
File "/root/hekti/instapy/instapy.py", line 1265, in follow_user_followers
me=me)
File "/root/hekti/instapy/unfollow_util.py", line 617, in follow_given_user_followers
me=me)
File "/root/hekti/instapy/unfollow_util.py", line 335, in follow_through_dialog
.find_elements_by_tag_name("a")[1].text)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 76, in text
return self._execute(Command.GET_ELEMENT_TEXT)['value']
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, 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: chrome=62.0.3202.94)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.4.0-101-generic x86_64)

Any suggestions? Should I try firefox? On the InstaPy guide for DigitalOcean it says I should use a 1GB RAM Droplet, but mine is the cheapest one with 512MB of RAM, could it be the reason why I'm getting the error?

Thanks in advance.

@jackpot001 I'm getting the same error and came across this past ticket: https://github.com/timgrossmann/InstaPy/issues/117

I'm in the process of upping my droplet -- it sounds like that might be the fix.

@tctrautman can you please let me know once you upgrade your droplet if that fixes the problem?

Are you upgrading to 1GB or 2GB?

Thanks in advance.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings