Instapy: Message: unknown error: Cannot read property 'scrollIntoView' of undefined

Created on 24 Jan 2019  Β·  42Comments  Β·  Source: timgrossmann/InstaPy

Hi I have this error while using the function:
session.interact_user_followers(['user'], amount=1500, randomize=False)

this is the error I got ->

  File "like.py", line 57, in <module>
    session.interact_user_followers(['user'], amount=1500, randomize=False)
  File "/Users/user/Desktop/instagram/InstaPy/instapy/instapy.py", line 2715, in interact_user_followers
    self.logfolder)
  File "/Users/user/Desktop/instagram/InstaPy/instapy/unfollow_util.py", line 998, in get_given_user_followers
    logger, logfolder)
  File "/Users/user/Desktop/instagram/InstaPy/instapy/unfollow_util.py", line 745, in get_users_through_dialog
    scroll_to_bottom_of_followers_list(browser, dialog)
  File "/Users/user/Desktop/instagram/InstaPy/instapy/unfollow_util.py", line 707, in scroll_to_bottom_of_followers_list
    "arguments[0].children[1].scrollIntoView()", element)
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script
    'args': converted_args})['value']
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'scrollIntoView' of undefined
wontfix

All 42 comments

I'm getting this issue also (and with a significantly smaller amount of users to interact with)

Also getting this issue.

GOt this one as well. Instagram has changed something again

I'm getting it too on follow_user_followers and follow_user_following

Same. Also occurs with unfollow interactions.

Same here when trying to get followers / following. @sionking @uluQulu Any suggestions?

Same issue here

Same issue. Looked at all the previous issues same as this but no help.

I had the issue when first reported, but seems to have cleared as of now. Also ran a git pull to make sure I was on latest version.

Weird i also did a pull before commenting and was getting the same error. but it appears to have fixed now.

Works for me now too. Didn't even change anything. Odd

Issue fixed itself, weird

I am getting it again...

confirmed the issue has come back

We are all getting it again.

There is a pr : #3893

And how is this going to work now?
After it is fixed, should we git pull? should we update with pip? What happens next?

huh, probably pip. I just don't know how quickly the files get synced betwenn github and pypi

If you guys could test the PR we could merge it.
https://github.com/timgrossmann/InstaPy/pull/3893#issuecomment-460433431

Once that is approved and merged I will trigger the publishing of the new version.
In ~10min we will have the new version on PyPi.
You will have to do a simple pip install -U instapy to update instapy. That's it

@timgrossmann Tim, sorry to sound stupid, but, how could I be part of the testing team? I want to ensure quick fixes become quick merges.
And... no more repo cloning needed, right? just package update.

@octavius-1 Not stupid at all!
I'll write a short guide how to best test it.

- git clone https://github.com/badviibesforever/InstaPy.git
- cd InstaPy
- git checkout patch-1
- pip uninstall instapy
- pip install .

And then run the same file that crashed with the old version

@timgrossmann would like to help too

getting this error too
using function follow_user_followers (tested with the PR)

@timgrossmann Trying to test it from scratch (with the new pip install instapy command) but I'm getting this in my fresh instance:

Traceback (most recent call last):
  File "instabot.py", line 50, in <module>
    page_delay=info.page_delay
  File "/home/ubuntu/.local/lib/python3.6/site-packages/instapy/instapy.py", line 276, in __init__
    self.set_selenium_local_session()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/instapy/instapy.py", line 328, in set_selenium_local_session
    raise InstaPyError(err_msg)
instapy.exceptions.InstaPyError: ensure chromedriver is installed at /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_linux64

@octavius-1 Has it installed instapy-chromedriver?
pip list|grep instapy

@timgrossmann

ubuntu@user:~/InstaPy$ pip3 list | grep instapy
instapy (0.1.1)
instapy-chromedriver (2.44)

What does your quickstart look like?
(Make sure to remove username and password πŸ˜‰ )

session = InstaPy(username=info.insta_username,
                      password=info.insta_password,
                      proxy_chrome_extension=proxy_chrome_extension,
                      nogui=True,
                      headless_browser=True,
                      disable_image_load=True,
                      page_delay=info.page_delay
                      )

@octavius-1 Nogui is obsolete, we will remove that soon.
Only use headless.
Remove disable image load and the page delay as well as the proxy please

Only keep the username, password, and headless

If I remove the proxy my accounts get banned :(

@octavius-1 πŸ˜… oh, then keep it

maybe do a pip uninstall instapy-chromedriver and install it again

ubuntu@user:~/InstaPy$ pip3 uninstall instapy-chromedriver
Uninstalling instapy-chromedriver-2.44:
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/INSTALLER
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/LICENSE
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/METADATA
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/RECORD
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/WHEEL
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver-2.44.dist-info/top_level.txt
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/__init__.py
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/__pycache__/__init__.cpython-36.pyc
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_linux64
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_mac64
  /home/ubuntu/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_win32.exe
Proceed (y/n)? y
  Successfully uninstalled instapy-chromedriver-2.44
ubuntu@user:~/InstaPy$ pip3 install instapy-chromedriver
Collecting instapy-chromedriver
  Downloading https://files.pythonhosted.org/packages/94/04/22385b4cce7546d9166882be6f89cffc02ed819910a99f138bb27a62309b/instapy_chromedriver-2.46-py3-none-any.whl (17.1MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 17.1MB 80kB/s 
Installing collected packages: instapy-chromedriver
Successfully installed instapy-chromedriver-2.46

And then it fails again

Sorry, wrong version.
Uninstall again and do
pip install instapy-chromedriver==2.44

Also make sure that there is no chromedriver in the assets folder

I don't even have an assets folder, I'm trying to get the pip's way but let me try that 2.44 version first

Same failure.

@octavius-1 Since the pip install, the assets folder is located at your home directory ~/InstaPy on linux.

Well, try to do another uninstall for InstaPy itself, and install it again by using pip install instapy just to check if the version downloaded works

Same failure. Should I clone something? Apparently pip install instapy is not enough.

Got several approvals, will merge and publish now.
Check back in ~10min

Please pip install -U instapy and check again.

@timgrossmann The followers retrieval is now working as it should. No more 'ScrollIntoView' errors.
Regarding the chromedriver issue, I couldn't perform a fresh install from scratch in a fresh server instance. I had to clone my previous instances to make it work.

I'm receiving the following error:

Starting session 'like followers of selected profiles':
INFO [2019-02-18 10:44:09] [myusername] User 'user1' [1/14]

INFO [2019-02-18 10:44:21] [myusername] Sessional Live Report:
|> No any statistics to show

On session start was FOLLOWING 584 users & had 760 FOLLOWERS
[Session lasted 4.79 minutes]

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-02-18 10:44:21] [myusername] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Traceback (most recent call last):
File "mybot_2.py", line 91, in
session.interact_user_followers(['user1', 'user2'], amount=22,
randomize=True)
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 2715, in
interact_user_followers
self.logfolder)
File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 998, in
get_given_user_followers
logger, logfolder)
File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 745, in
get_users_through_dialog
scroll_to_bottom_of_followers_list(browser, dialog)
File "/home/pi/Projects/InstaPy/instapy/unfollow_util.py", line 707, in
scroll_to_bottom_of_followers_list
"arguments[0].children[1].scrollIntoView()", element)
File "/home/pi/venv36/lib/python3.5/site-packages/selenium/webdriver/remote/
webdriver.py", line 636, in execute_script
'args': converted_args})['value']
File "/home/pi/venv36/lib/python3.5/site-packages/selenium/webdriver/remote/
webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/pi/venv36/lib/python3.5/site-packages/selenium/webdriver/remote/
errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot
read property 'scrollIntoView' of undefined
(Session info: headless chrome=65.0.3325.181)
(Driver info: chromedriver=2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37),
platform=Linux 4.14.79-v7+ armv7l)

Nothing changed after pip install -U instapy.
This function was working OK some weeks ago when I tested it. Then I disabled it. Today I turned it on again but it is not working…
Any idea?

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