@timgrossmann I cleaned up the how to guide a bit, removing some of the steps that are not required and should make the install more straight forward.
Use http://mozilla.debian.net and follow the instructions to install the correct version of Firefox for your configuration
How to update GeckoDriver on Raspbian:
New releases can be found in https://github.com/mozilla/geckodriver/releases
wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-arm7hf.tar.gz
tar -xvzf geckodriver-v*
chmod +x geckodriver
sudo cp geckodriver /usr/local/bin/
Follow the example seen in examples\firefoxExample.py to set the default browser as Firefox
Optional:
To run headless, you will need to install xvfb:
sudo apt-get install xvfb
If running headless and you want to easily disconnect from the session install TMUX
sudo apt-get install tmux (more info found here: https://github.com/tmux/tmux)
IMPORTANT note regarding Raspberry Pi 2:
Firefox is not currently working correctly on Pi 2, to install a working version the following commands should be used:
Pi2.1. wget https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+build/10930950/+files/firefox_49.0+build4-0ubuntu0.14.04.1_armhf.deb
Pi2.2 sudo dpkg -i firefox_49.0+build4-0ubuntu0.14.04.1_armhf.deb
new version of gecko driver
https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-arm7hf.tar.gz
UPDATE: use the v0.18.0 which is compatible with firefox-esr
Anybody tried this with the docker example?
I'm getting this error.
pi@raspberrypi:~/projects/InstaPy $ docker-compose up -d --build
Building web
Step 1/7 : FROM python:3.6
---> 86752468acc1
Step 2/7 : RUN mkdir /code
---> Using cache
---> 4bb97833d888
Step 3/7 : RUN mkdir /config
---> Using cache
---> af38ec3a473e
Step 4/7 : WORKDIR /code
---> Using cache
---> 234cf0097eb9
Step 5/7 : COPY ./requirements.txt /config/
---> Using cache
---> c5329372b2a5
Step 6/7 : RUN pip install -r /config/requirements.txt
---> Using cache
---> 8743c9f29f6a
Step 7/7 : COPY ./ /code/
---> Using cache
---> 8535377d5e60
Successfully built 8535377d5e60
Successfully tagged instapy_web:latest
Starting selenium ... error
ERROR: for selenium Cannot start service selenium: driver failed programming external connectivity on endpoint selenium (f1aa20c978d72a2ae07719076fe1899b4552ec50ed8eed48f9f49508e9c0bf06): Error starting userland proxy: listen tcp 0.0.0.0:5900: bind: address already in use
ERROR: for selenium Cannot start service selenium: driver failed programming external connectivity on endpoint selenium (f1aa20c978d72a2ae07719076fe1899b4552ec50ed8eed48f9f49508e9c0bf06): Error starting userland proxy: listen tcp 0.0.0.0:5900: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Edit: There is no other process in the running that I know off that should cause the port not to be available. The chromium driver is also in the assets folder.
So what about the whole struggle with firefox? That was all for nothing? I followed these steps to install Firefox and removed firefox-esr. Any way to go back?
I got this to work! :) But when running it I don't see any pictures of any feed in instagram. Everyting shows except for pictures even though it does read them in the terminal. Any ideas? Geckodriver or firefox settings?
@luigifaticoso Seems like geckodriver v19 isn't compatible with the current firefox-esr version. I had to downgrade to v18 to make it work.
Yea, i have seen that! forgot to edit
I don't know why but I kept getting errors with step 7 so I seperated with success
7a. sudo apt-get update
7b. sudo apt-get upgrade
Hope it helps somebody.
Hello guys, I'm on rbp3,
I've followed religiously the new guide and also a thread on the topic dated last November.
In the end I managed to make firefox run and the instagram login appear, but what happens is that it first opens instagram page, then opens google page (don't understand why), then opens again instagram page changing login language to Afrikaan, and from then stops, it just crashes and reports the errors i'm pasting here.
In one of my last attempts with different installation of Firefox and gecko it also arrived to insert my username and password.
I've gecko 0.18
Here the log:
pi@raspberrypi:~/Projects/InstaPy $ sudo python quickstart.py
INFO [2018-04-12 03:06:31] [paolo_el_mago] Session started - 2018-04-12 03:06:31
Cookie file not found, creating cookie...
Traceback (most recent call last):
File "quickstart.py", line 32, in
session.login()
File "/home/pi/Projects/InstaPy/instapy/instapy.py", line 301, in login
self.bypass_suspicious_attempt):
File "/home/pi/Projects/InstaPy/instapy/login_util.py", line 138, in login_user
ActionChains(browser).move_to_element(login_elem).click().perform()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/action_chains.py", line 80, in perform
self.w3c_actions.perform()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/actions/action_builder.py", line 76, in perform
self.driver.execute(Command.W3C_ACTIONS, enc)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of stale: either the element is no longer attached to the DOM or the page has been refreshed
My god this is a shit show. No one is building off one another. Just selfishness.
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
Most helpful comment
new version of gecko driver
https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-arm7hf.tar.gz
UPDATE: use the v0.18.0 which is compatible with firefox-esr