bbc / wraith

Wraith — A responsive screenshot comparison tool

Home Page:http://bbc-news.github.io/wraith/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Untouched config doesn't run correctly

dundunn opened this issue · comments

commented

I tried to test the program because I may want to use it. But I can't get it run even with the default config created after executing "wraith setup". I googled parts of the errors but didn't find anything related to wraith.

Issue checklist:

  • I have validated my config file against YAML Validator to make sure it is valid YAML.

  • I have run the wraith info command and pasted the output below:

dun@ws42-pc:~/configs$ wraith info
/var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/helpers/utilities.rb:54: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
/var/lib/gems/2.3.0/gems/chromedriver-helper-1.2.0/lib/chromedriver/helper.rb:16: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
/home/dun/.chromedriver-helper/2.41/linux64/chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.2.3
DEBUG:   Ruby version:       ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
DEBUG:   ImageMagick:        Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-07-10 http://www.imagemagick.org
DEBUG:   PhantomJS version:  1.9.8
DEBUG:   chromedriver version:  chromedriver not installed
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
  • I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
dun@ws42-pc:~/configs$ wraith capture capture.yaml --verbose
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
/var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/save_images.rb:70: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Loading http://develop.example.com/ at dimensions: 600x768

Loading http://develop.example.com/ at dimensions: 1024x1500

Error with page http://develop.example.com/

Loading http://www.example.com/ at dimensions: 600x768

Loading http://www.example.com/ at dimensions: 768x1500

Loading http://develop.example.com/ at dimensions: 320x1500

Error with page http://develop.example.com/

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.

Error with page http://develop.example.com/

Loading http://www.example.com/ at dimensions: 320x1500

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.

Loading http://www.example.com/ at dimensions: 1024x1500



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



WARN: Failed to capture image shots/home/320_phantomjs_new.png on attempt number 1 of 5


Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.





Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.





Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.





WARN: Failed to capture image shots/home/1024_phantomjs_new.png on attempt number 1 of 5
WARN: Failed to capture image shots/home/600x768_phantomjs_new.png on attempt number 1 of 5
Loading http://develop.example.com/ at dimensions: 768x1500

Error with page http://develop.example.com/

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.



Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/lib/gems/2.3.0/gems/wraith-4.2.3/lib/wraith/javascript/phantom.js. Domains, protocols and ports must match.
  • I have pasted the contents of my config file below:
##############################################################
##############################################################
# This is an example configuration provided by Wraith.
# Feel free to amend for your own requirements.
# ---
# This particular config is intended to demonstrate how
# to use Wraith in 'capture' mode, which is best suited to
# comparing a test and live version of the same website.
#
# `wraith capture capture.yaml`
#
##############################################################
##############################################################

# (required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs'
browser: "phantomjs"

# (required) The domains to take screenshots of.
domains:
  current:  "http://www.example.com"
  new:      "http://develop.example.com"

# (required) The paths to capture. All paths should exist for both of the domains specified above.
paths:
  home:     /
  about:    /about
  contact:  /get-in-touch

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 320
  - 600x768
  - 768
  - 1024
  - 1280

# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
before_capture: 'javascript/disable_javascript--phantom.js'

# (required) The directory that your screenshots will be stored in
directory: 'shots'

# (required) Amount of fuzz ImageMagick will use when comparing images. A higher fuzz makes the comparison less strict.
fuzz: '20%'

# (optional) The maximum acceptable level of difference (in %) between two images before Wraith reports a failure. Default: 0
threshold: 5

# (optional) Specify the template (and generated thumbnail sizes) for the gallery output.
gallery:
  template: 'slideshow_template' # Examples: 'basic_template' (default), 'slideshow_template'
  thumb_width:  200
  thumb_height: 200

# (optional) Choose which results are displayed in the gallery, and in what order. Default: alphanumeric
# Options:
#   alphanumeric - all paths (with or without a difference) are shown, sorted by path
#   diffs_first - all paths (with or without a difference) are shown, sorted by difference size (largest first)
#   diffs_only - only paths with a difference are shown, sorted by difference size (largest first)
# Note: different screen widths are always grouped together.
mode: diffs_first