Skip to content

Screenshot Troubleshooting

matamorphosis edited this page Jan 30, 2022 · 14 revisions

Support

Support for Scrummage troubleshooting is provided for tier 3 and 4 monthly sponsors, and ad-hoc support is provided based on the relevant time-limit. For more details, you can contact us via the sponsors page.

Understanding Screenshot Issues

There are two main reasons why the screenshot functionality can fail to work.

  1. An issue with Google Chrome/Chrome Driver:
    a. Google Chrome is not installed.
    b. The ChromeDriver does not exist.
    c. The ChromeDriver does not match the version of Google Chrome installed. In this event running Scrummage.py (Version 2.7 and later) will tell you immediately:
Please run the "Fix_ChromeDriver.sh\ script in the installation directory to upgrade the Google Chrome Driver to be in-line with the current version of Google Chrome on this operating system, or replace it manually with the latest version from http://chromedriver.chromium.org/downloads that matches the version of Chrome installed on your system. The Chrome driver is located at `/usr/bin/chromedriver`. Screenshot functionality has been disabled in the meantime until this issue is resolved.

d. The ChromeDriver and Google Chrome paths are not referenced correctly in the config.json file. Again by running Scrummage.py this will be indicated immediately:

One or more of the values provided to the google chrome configuration in the `config.json` file do not reflect real files. Screenshot functionality has been disabled in the meantime. To correct this please accurately fill out the following section in the `config.json` file (Example values included, please ensure these reflect real files on your system)
"google_chrome": {
  "application_path": "/usr/bin/google-chrome",
  "chromedriver_path": "/usr/bin/chromedriver"
},
  1. Scrummage.py has been executed as sudo. This python program is intended to only be executed as a non-super user account.

Resolving Screenshot Issues

  1. To resolve the former there is a script in the /Scrummage/installation/support_files directory, called Fix_ChromeDriver.sh. This automatically fixes the issue for the latest 3 versions of Google Chrome. Which can be run with the below command:
user@linux:/Scrummage/installation/support_files$ sudo bash ./Fix_ChromeDriver.sh

If you are running an older version that isn't supported by the script, or the script isn't working, the below manual steps can be followed to achieve the desired result:
1.1. Firstly ensure Google Chrome is installed and up-to-date. Then obtain your version of Google Chrome which can be found one of two ways:
    1.1.1. Opening up the Google Chrome browser > selecting the three dots on the top right of the screen > clicking Help > then clicking "About Google Chrome".
    1.1.2. Opening up a terminal/bash and typing

user@linux:~$ google-chrome --product version

1.2. Next, to ensure your version of ChromeDriver is in line with your version of Google Chrome:
    1.2.1. Navigate to http://chromedriver.chromium.org/downloads and find the version of ChromeDriver that links to the version of Google Chrome that you found in the steps under 1.1.
    Downloads
    
    and be sure to download the chromedriver_linux64.zip file
    
    Downloads2
    
    1.2.2. Opening up a terminal/bash and unzip the file

user@linux:/path/to/zip/file$ unzip chromedriver_linux64.zip

    1.2.3. Next in the terminal, move the extracted file to the /usr/bin directory

user@linux:/path/to/zip/file$ sudo mv ./chromedriver /usr/bin/chromedriver

1.3 Lastly, ensure the parameters under "google-chrome" are set properly in the config.json file

"google_chrome": {
  "application_path": "/usr/bin/google-chrome",
  "chromedriver_path": "/usr/bin/chromedriver"
},  
  1. To resolve the second issue mentioned above, it is simple, do not run Scrummage.py using sudo.

Clone this wiki locally