wraith: Wraith does not work for HTTPS urls

Hi there,

I am trying out wraith for a site and unfortunately, it only generates empty images for a HTTPS site. Now, I have been looking at issues on Github and it seems that I have to put this setting in my config/component.yaml:

phantomjs_options: --ssl-protocol=tlsv1

However, it is still generating empty images.

When I try it with a non-HTTPS page, the screenshot is created as expected. So, I am guessing that this is related to HTTPS issue.

This is my config/component.yaml file for the HTTPS (non-working) version.

# Add as many domains as necessary. Key will act as a label
phantomjs_options: --ssl-protocol=tlsv1
domains:
  english: "https://www.viki.com"

# (optional) JavaScript file to execute before taking screenshot of every path.
# Can be used to reload current page with headers specified, or to dynamically
# AJAX in content, or all manner of other uses!
#before_capture: 'javascript/global.js'

# Type page URL paths below, here are a couple of examples
paths:
  home: /

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

# the maximum acceptable level of difference (in %) between two images.
# Wraith considers it a failure if an image diff goes above this threshold.
threshold: 5

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

# the engine to run Wraith with.
browser:
  phantomjs: "casperjs"   # variant of PhantomJS that allows screenshots by element selector
  #phantomjs: "phantomjs" # PhantomJS, built on top of Webkit and JavascriptCore (like Safari)
  #slimerjs: "slimerjs"   # SlimerJS, built on top of Gecko and SpiderMonkey (like Firefox)

# the file in charge of taking the screenshot
snap_file: "javascript/casper.js"

# the directory that your base screenshots will be stored in
history_dir: 'shots_base'

# the directory that your latest screenshots will be stored in
directory: 'shots'

# choose how results are displayed in the gallery (default is `alphanumeric` if omitted)
# Different screen widths are always grouped together.
# 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)
mode: alphanumeric

Are there any sort of settings that I may have missed pertaining to HTTPS settings?

In case if it helps, my system informations are:

PhantomJS version 1.9.7 ImageMagick 6.9.2-5 CasperJS version 1.0.0 Mac OS X El Capitan Version 10.11.1

Thanks in advance for your help!

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Hello, I am still having this problem. I am using Wraith 4.2.1 and I have tried phantomjs 2.1.1 (current latest) and 1.9.7 and 1.9.8 and all having the same problem. Empty images are captured when an “https” site is used. The same works fine when I use an “http” site. Any pointers please?

Adding phantomjs_options: --ignore-ssl-errors=true worked for me, but --ssl-protocol=tlsv1 didnt.