Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wraith consistently hangs on final URL #508

Open
4 tasks done
pcraig3 opened this issue Feb 8, 2017 · 9 comments
Open
4 tasks done

Wraith consistently hangs on final URL #508

pcraig3 opened this issue Feb 8, 2017 · 9 comments

Comments

@pcraig3
Copy link

pcraig3 commented Feb 8, 2017

Wraith seems like a super useful tool that would be awesome to use for our pattern library, unfortunately, we can't get it to run reliably.

We have an app with 34 pages (and we're using the 5 default screen sizes). Running Wraith against it seems to fail ~9 out of 10 times, and always in the same way.

It goes through all of the pages, outputting all the urls and doing the "Resizing" and "Snapping" stuff, but then -- almost every time -- it hangs forever after it says it's "Snapping" the highest resolution on the final page (in our case: Snapping http://localhost:8000/summary-table.html at: 1280x1500). Lowering the number of pages (to 2 or 3, for example) seems to increase the likelihood of Wraith successfully finishing, but even then it will still frequently hang.

Our issue is very similar to one that was closed without a resolution: "Wraith intermittently hangs"

Additionally, a coworker of mine ran it on his machine and encountered exactly the same issue.

OS version ruby -v phantomjs -v wraith -v
Paul OS X El Capitan Version 10.11.6 ruby 2.0.0p648 2.1.1 4.0.1
Tom OS X El Capitan Version 10.11.6 ruby 2.0.0p247 1.9.8 4.0.1

I've tried passing in a few different options to phantomjs (adjusting the timeout setting, clearing the cache) and it seems to make no difference at all. Can you help us? I'm not sure what else I should try.

Since our project is public, it should be fairly easy for you to reproduce the issue:

  • Clone our repo from https://github.com/alphagov/digitalmarketplace-frontend-toolkit
  • sudo easy_install virtualenv (installs virtualenv)
  • git checkout pc-really-run-wraith (checkout the branch with wraith)
  • make serve_pages (compile pages and serve them locally)
  • Open a new terminal session
  • bundle install wraith (install Wraith)
  • wraith history wraith/config.yml (try to run 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:

DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.0.1
DEBUG:   Ruby version:       ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.4-6 Q16 x86_64 2017-01-28 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
  • I have run wraith history wraith/config.yml in verbose mode (by adding verbose: true to my config) and pasted the output below:
DEBUG: #################################################
DEBUG:   Command run:        history wraith/config.yml
DEBUG:   Wraith version:     4.0.1
DEBUG:   Ruby version:       ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.4-6 Q16 x86_64 2017-01-28 http://www.imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   CasperJS version:   CasperJS not installed
DEBUG: #################################################
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/' '320,600,768,1024,1280' 'wraith/shots/home/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/button.html' '320,600,768,1024,1280' 'wraith/shots/__button.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/breadcrumb.html' '320,600,768,1024,1280' 'wraith/shots/__breadcrumb.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/contact-details.html' '320,600,768,1024,1280' 'wraith/shots/__contact-details.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/browse-list.html' '320,600,768,1024,1280' 'wraith/shots/__browse-list.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/documents.html' '320,600,768,1024,1280' 'wraith/shots/__documents.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/external-link.html' '320,600,768,1024,1280' 'wraith/shots/__external-link.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/keyword-search.html' '320,600,768,1024,1280' 'wraith/shots/__forms__keyword-search.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Loading http://localhost:8000/button.html at dimensions: 320x1500

Loading http://localhost:8000/documents.html at dimensions: 320x1500

Loading http://localhost:8000/breadcrumb.html at dimensions: 320x1500

Loading http://localhost:8000/ at dimensions: 320x1500

Loading http://localhost:8000/contact-details.html at dimensions: 320x1500

Loading http://localhost:8000/browse-list.html at dimensions: 320x1500

Loading http://localhost:8000/forms/keyword-search.html at dimensions: 320x1500

Loading http://localhost:8000/external-link.html at dimensions: 320x1500

Snapping http://localhost:8000/ at: 320x1500

Snapping http://localhost:8000/documents.html at: 320x1500

Snapping http://localhost:8000/breadcrumb.html at: 320x1500

Snapping http://localhost:8000/button.html at: 320x1500

Snapping http://localhost:8000/browse-list.html at: 320x1500

Snapping http://localhost:8000/forms/keyword-search.html at: 320x1500

Snapping http://localhost:8000/external-link.html at: 320x1500

Resizing http://localhost:8000/ to: 600x1500

Resizing http://localhost:8000/breadcrumb.html to: 600x1500

Resizing http://localhost:8000/external-link.html to: 600x1500

Resizing http://localhost:8000/documents.html to: 600x1500

Resizing http://localhost:8000/forms/keyword-search.html to: 600x1500

Resizing http://localhost:8000/button.html to: 600x1500

Resizing http://localhost:8000/browse-list.html to: 600x1500

Snapping http://localhost:8000/ at: 600x1500

Snapping http://localhost:8000/breadcrumb.html at: 600x1500

Snapping http://localhost:8000/external-link.html at: 600x1500

Snapping http://localhost:8000/documents.html at: 600x1500

Snapping http://localhost:8000/forms/keyword-search.html at: 600x1500

Snapping http://localhost:8000/button.html at: 600x1500

Snapping http://localhost:8000/browse-list.html at: 600x1500

Resizing http://localhost:8000/ to: 768x1500

Resizing http://localhost:8000/breadcrumb.html to: 768x1500

Resizing http://localhost:8000/forms/keyword-search.html to: 768x1500

Resizing http://localhost:8000/documents.html to: 768x1500

Resizing http://localhost:8000/external-link.html to: 768x1500

Resizing http://localhost:8000/button.html to: 768x1500

Resizing http://localhost:8000/browse-list.html to: 768x1500

Snapping http://localhost:8000/documents.html at: 768x1500

Snapping http://localhost:8000/ at: 768x1500

Snapping http://localhost:8000/button.html at: 768x1500

Snapping http://localhost:8000/browse-list.html at: 768x1500

Snapping http://localhost:8000/external-link.html at: 768x1500

Snapping http://localhost:8000/breadcrumb.html at: 768x1500

Snapping http://localhost:8000/forms/keyword-search.html at: 768x1500

Resizing http://localhost:8000/ to: 1024x1500

Resizing http://localhost:8000/forms/keyword-search.html to: 1024x1500

Resizing http://localhost:8000/breadcrumb.html to: 1024x1500

Resizing http://localhost:8000/external-link.html to: 1024x1500

Resizing http://localhost:8000/documents.html to: 1024x1500

Resizing http://localhost:8000/button.html to: 1024x1500

Resizing http://localhost:8000/browse-list.html to: 1024x1500

Snapping http://localhost:8000/ at: 1024x1500

Snapping http://localhost:8000/forms/keyword-search.html at: 1024x1500

Snapping http://localhost:8000/breadcrumb.html at: 1024x1500

Snapping http://localhost:8000/external-link.html at: 1024x1500

Snapping http://localhost:8000/documents.html at: 1024x1500

Snapping http://localhost:8000/browse-list.html at: 1024x1500

Snapping http://localhost:8000/button.html at: 1024x1500

Resizing http://localhost:8000/ to: 1280x1500

Resizing http://localhost:8000/forms/keyword-search.html to: 1280x1500

Resizing http://localhost:8000/breadcrumb.html to: 1280x1500

Resizing http://localhost:8000/external-link.html to: 1280x1500

Resizing http://localhost:8000/button.html to: 1280x1500

Resizing http://localhost:8000/documents.html to: 1280x1500

Resizing http://localhost:8000/browse-list.html to: 1280x1500

Snapping http://localhost:8000/ at: 1280x1500

Snapping http://localhost:8000/forms/keyword-search.html at: 1280x1500

Snapping http://localhost:8000/button.html at: 1280x1500

Snapping http://localhost:8000/breadcrumb.html at: 1280x1500

Snapping http://localhost:8000/browse-list.html at: 1280x1500

Snapping http://localhost:8000/documents.html at: 1280x1500

Snapping http://localhost:8000/external-link.html at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/upload.html' '320,600,768,1024,1280' 'wraith/shots/__forms__upload.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/list-entry.html' '320,600,768,1024,1280' 'wraith/shots/__forms__list-entry.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/option-select.html' '320,600,768,1024,1280' 'wraith/shots/__forms__option-select.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/pricing.html' '320,600,768,1024,1280' 'wraith/shots/__forms__pricing.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/selection-buttons.html' '320,600,768,1024,1280' 'wraith/shots/__forms__selection-buttons.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/textbox.html' '320,600,768,1024,1280' 'wraith/shots/__forms__textbox.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/single-question-page.html' '320,600,768,1024,1280' 'wraith/shots/__forms__single-question-page.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Loading http://localhost:8000/forms/list-entry.html at dimensions: 320x1500

Loading http://localhost:8000/forms/upload.html at dimensions: 320x1500

Loading http://localhost:8000/forms/option-select.html at dimensions: 320x1500

Loading http://localhost:8000/forms/selection-buttons.html at dimensions: 320x1500

Loading http://localhost:8000/forms/pricing.html at dimensions: 320x1500

Loading http://localhost:8000/forms/single-question-page.html at dimensions: 320x1500

Loading http://localhost:8000/forms/textbox.html at dimensions: 320x1500

Snapping http://localhost:8000/forms/list-entry.html at: 320x1500

Snapping http://localhost:8000/forms/upload.html at: 320x1500

Snapping http://localhost:8000/forms/option-select.html at: 320x1500

Resizing http://localhost:8000/forms/list-entry.html to: 600x1500

Resizing http://localhost:8000/forms/upload.html to: 600x1500

Resizing http://localhost:8000/forms/option-select.html to: 600x1500

Snapping http://localhost:8000/forms/single-question-page.html at: 320x1500

Snapping http://localhost:8000/forms/selection-buttons.html at: 320x1500

Snapping http://localhost:8000/forms/pricing.html at: 320x1500

Resizing http://localhost:8000/forms/pricing.html to: 600x1500

Resizing http://localhost:8000/forms/selection-buttons.html to: 600x1500

Resizing http://localhost:8000/forms/single-question-page.html to: 600x1500

Snapping http://localhost:8000/forms/textbox.html at: 320x1500

Resizing http://localhost:8000/forms/textbox.html to: 600x1500

Snapping http://localhost:8000/forms/list-entry.html at: 600x1500

Snapping http://localhost:8000/forms/upload.html at: 600x1500

Resizing http://localhost:8000/forms/list-entry.html to: 768x1500

Resizing http://localhost:8000/forms/upload.html to: 768x1500

Snapping http://localhost:8000/forms/option-select.html at: 600x1500

Resizing http://localhost:8000/forms/option-select.html to: 768x1500

Snapping http://localhost:8000/forms/pricing.html at: 600x1500

Snapping http://localhost:8000/forms/single-question-page.html at: 600x1500

Snapping http://localhost:8000/forms/selection-buttons.html at: 600x1500

Resizing http://localhost:8000/forms/pricing.html to: 768x1500

Resizing http://localhost:8000/forms/single-question-page.html to: 768x1500

Resizing http://localhost:8000/forms/selection-buttons.html to: 768x1500

Snapping http://localhost:8000/forms/textbox.html at: 600x1500

Resizing http://localhost:8000/forms/textbox.html to: 768x1500

Snapping http://localhost:8000/forms/upload.html at: 768x1500

Snapping http://localhost:8000/forms/list-entry.html at: 768x1500

Snapping http://localhost:8000/forms/option-select.html at: 768x1500

Resizing http://localhost:8000/forms/upload.html to: 1024x1500

Resizing http://localhost:8000/forms/list-entry.html to: 1024x1500

Resizing http://localhost:8000/forms/option-select.html to: 1024x1500

Snapping http://localhost:8000/forms/pricing.html at: 768x1500

Snapping http://localhost:8000/forms/single-question-page.html at: 768x1500

Snapping http://localhost:8000/forms/selection-buttons.html at: 768x1500

Resizing http://localhost:8000/forms/pricing.html to: 1024x1500

Resizing http://localhost:8000/forms/single-question-page.html to: 1024x1500

Resizing http://localhost:8000/forms/selection-buttons.html to: 1024x1500

Snapping http://localhost:8000/forms/textbox.html at: 768x1500

Resizing http://localhost:8000/forms/textbox.html to: 1024x1500

Snapping http://localhost:8000/forms/upload.html at: 1024x1500

Snapping http://localhost:8000/forms/list-entry.html at: 1024x1500

Resizing http://localhost:8000/forms/upload.html to: 1280x1500

Resizing http://localhost:8000/forms/list-entry.html to: 1280x1500

Snapping http://localhost:8000/forms/option-select.html at: 1024x1500

Resizing http://localhost:8000/forms/option-select.html to: 1280x1500

Snapping http://localhost:8000/forms/pricing.html at: 1024x1500

Snapping http://localhost:8000/forms/single-question-page.html at: 1024x1500

Snapping http://localhost:8000/forms/selection-buttons.html at: 1024x1500

Resizing http://localhost:8000/forms/pricing.html to: 1280x1500

Resizing http://localhost:8000/forms/selection-buttons.html to: 1280x1500

Resizing http://localhost:8000/forms/single-question-page.html to: 1280x1500

Snapping http://localhost:8000/forms/textbox.html at: 1024x1500

Resizing http://localhost:8000/forms/textbox.html to: 1280x1500

Snapping http://localhost:8000/forms/list-entry.html at: 1280x1500

Snapping http://localhost:8000/forms/upload.html at: 1280x1500

Snapping http://localhost:8000/forms/option-select.html at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/validation.html' '320,600,768,1024,1280' 'wraith/shots/__forms__validation.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/forms/pricing.html at: 1280x1500

Snapping http://localhost:8000/forms/single-question-page.html at: 1280x1500

Snapping http://localhost:8000/forms/selection-buttons.html at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/forms/combinations.html' '320,600,768,1024,1280' 'wraith/shots/__forms__combinations.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/grids.html' '320,600,768,1024,1280' 'wraith/shots/__grids.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/forms/textbox.html at: 1280x1500

Loading http://localhost:8000/forms/validation.html at dimensions: 320x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/instruction-list.html' '320,600,768,1024,1280' 'wraith/shots/__instruction-list.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/link-button.html' '320,600,768,1024,1280' 'wraith/shots/__link-button.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/page-heading.html' '320,600,768,1024,1280' 'wraith/shots/__page-heading.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Loading http://localhost:8000/grids.html at dimensions: 320x1500

Loading http://localhost:8000/forms/combinations.html at dimensions: 320x1500

Loading http://localhost:8000/instruction-list.html at dimensions: 320x1500

Loading http://localhost:8000/link-button.html at dimensions: 320x1500

Loading http://localhost:8000/page-heading.html at dimensions: 320x1500

Snapping http://localhost:8000/forms/validation.html at: 320x1500

Resizing http://localhost:8000/forms/validation.html to: 600x1500

Snapping http://localhost:8000/grids.html at: 320x1500

Resizing http://localhost:8000/grids.html to: 600x1500

Snapping http://localhost:8000/instruction-list.html at: 320x1500

Snapping http://localhost:8000/link-button.html at: 320x1500

Snapping http://localhost:8000/page-heading.html at: 320x1500

Resizing http://localhost:8000/link-button.html to: 600x1500

Resizing http://localhost:8000/page-heading.html to: 600x1500

Resizing http://localhost:8000/instruction-list.html to: 600x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/notification-banner.html' '320,600,768,1024,1280' 'wraith/shots/__notification-banner.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Loading http://localhost:8000/notification-banner.html at dimensions: 320x1500

Snapping http://localhost:8000/forms/validation.html at: 600x1500

Resizing http://localhost:8000/forms/validation.html to: 768x1500

Snapping http://localhost:8000/notification-banner.html at: 320x1500

Resizing http://localhost:8000/notification-banner.html to: 600x1500

Snapping http://localhost:8000/grids.html at: 600x1500

Resizing http://localhost:8000/grids.html to: 768x1500

Snapping http://localhost:8000/link-button.html at: 600x1500

Snapping http://localhost:8000/page-heading.html at: 600x1500

Snapping http://localhost:8000/instruction-list.html at: 600x1500

Resizing http://localhost:8000/link-button.html to: 768x1500

Resizing http://localhost:8000/page-heading.html to: 768x1500

Resizing http://localhost:8000/instruction-list.html to: 768x1500

Snapping http://localhost:8000/forms/validation.html at: 768x1500

Resizing http://localhost:8000/forms/validation.html to: 1024x1500

Snapping http://localhost:8000/notification-banner.html at: 600x1500

Resizing http://localhost:8000/notification-banner.html to: 768x1500

Snapping http://localhost:8000/grids.html at: 768x1500

Resizing http://localhost:8000/grids.html to: 1024x1500

Snapping http://localhost:8000/link-button.html at: 768x1500

Snapping http://localhost:8000/page-heading.html at: 768x1500

Snapping http://localhost:8000/instruction-list.html at: 768x1500

Resizing http://localhost:8000/link-button.html to: 1024x1500

Resizing http://localhost:8000/page-heading.html to: 1024x1500

Resizing http://localhost:8000/instruction-list.html to: 1024x1500

Snapping http://localhost:8000/forms/validation.html at: 1024x1500

Resizing http://localhost:8000/forms/validation.html to: 1280x1500

Snapping http://localhost:8000/notification-banner.html at: 768x1500

Resizing http://localhost:8000/notification-banner.html to: 1024x1500

Snapping http://localhost:8000/grids.html at: 1024x1500

Resizing http://localhost:8000/grids.html to: 1280x1500

Snapping http://localhost:8000/link-button.html at: 1024x1500

Snapping http://localhost:8000/page-heading.html at: 1024x1500

Snapping http://localhost:8000/instruction-list.html at: 1024x1500

Resizing http://localhost:8000/link-button.html to: 1280x1500

Resizing http://localhost:8000/page-heading.html to: 1280x1500

Resizing http://localhost:8000/instruction-list.html to: 1280x1500

Snapping http://localhost:8000/forms/validation.html at: 1280x1500

Snapping http://localhost:8000/notification-banner.html at: 1024x1500

Resizing http://localhost:8000/notification-banner.html to: 1280x1500

Snapping http://localhost:8000/grids.html at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/phase-banner.html' '320,600,768,1024,1280' 'wraith/shots/__phase-banner.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/link-button.html at: 1280x1500

Snapping http://localhost:8000/page-heading.html at: 1280x1500

Snapping http://localhost:8000/instruction-list.html at: 1280x1500

Loading http://localhost:8000/phase-banner.html at dimensions: 320x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/previous-next-navigation.html' '320,600,768,1024,1280' 'wraith/shots/__previous-next-navigation.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/secondary-action-link.html' '320,600,768,1024,1280' 'wraith/shots/__secondary-action-link.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/search-summary.html' '320,600,768,1024,1280' 'wraith/shots/__search-summary.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/shared_scss/' '320,600,768,1024,1280' 'wraith/shots/__shared_scss/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/phase-banner.html at: 320x1500

Resizing http://localhost:8000/phase-banner.html to: 600x1500

Snapping http://localhost:8000/notification-banner.html at: 1280x1500

Loading http://localhost:8000/previous-next-navigation.html at dimensions: 320x1500

Loading http://localhost:8000/secondary-action-link.html at dimensions: 320x1500

Loading http://localhost:8000/search-summary.html at dimensions: 320x1500

Loading http://localhost:8000/shared_scss/ at dimensions: 320x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/service-id.html' '320,600,768,1024,1280' 'wraith/shots/__service-id.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Loading http://localhost:8000/service-id.html at dimensions: 320x1500

Snapping http://localhost:8000/secondary-action-link.html at: 320x1500

Snapping http://localhost:8000/previous-next-navigation.html at: 320x1500

Snapping http://localhost:8000/shared_scss/ at: 320x1500

Resizing http://localhost:8000/secondary-action-link.html to: 600x1500

Resizing http://localhost:8000/previous-next-navigation.html to: 600x1500

Resizing http://localhost:8000/shared_scss/ to: 600x1500

Snapping http://localhost:8000/phase-banner.html at: 600x1500

Resizing http://localhost:8000/phase-banner.html to: 768x1500

Snapping http://localhost:8000/service-id.html at: 320x1500

Resizing http://localhost:8000/service-id.html to: 600x1500

Snapping http://localhost:8000/secondary-action-link.html at: 600x1500

Snapping http://localhost:8000/previous-next-navigation.html at: 600x1500

Snapping http://localhost:8000/shared_scss/ at: 600x1500

Resizing http://localhost:8000/secondary-action-link.html to: 768x1500

Resizing http://localhost:8000/previous-next-navigation.html to: 768x1500

Resizing http://localhost:8000/shared_scss/ to: 768x1500

Snapping http://localhost:8000/phase-banner.html at: 768x1500

Resizing http://localhost:8000/phase-banner.html to: 1024x1500

Snapping http://localhost:8000/service-id.html at: 600x1500

Resizing http://localhost:8000/service-id.html to: 768x1500

Snapping http://localhost:8000/secondary-action-link.html at: 768x1500

Snapping http://localhost:8000/previous-next-navigation.html at: 768x1500

Snapping http://localhost:8000/shared_scss/ at: 768x1500

Resizing http://localhost:8000/secondary-action-link.html to: 1024x1500

Resizing http://localhost:8000/previous-next-navigation.html to: 1024x1500

Resizing http://localhost:8000/shared_scss/ to: 1024x1500

Snapping http://localhost:8000/phase-banner.html at: 1024x1500

Resizing http://localhost:8000/phase-banner.html to: 1280x1500

Snapping http://localhost:8000/service-id.html at: 768x1500

Resizing http://localhost:8000/service-id.html to: 1024x1500

Snapping http://localhost:8000/secondary-action-link.html at: 1024x1500

Snapping http://localhost:8000/previous-next-navigation.html at: 1024x1500

Snapping http://localhost:8000/shared_scss/ at: 1024x1500

Resizing http://localhost:8000/secondary-action-link.html to: 1280x1500

Resizing http://localhost:8000/previous-next-navigation.html to: 1280x1500

Resizing http://localhost:8000/shared_scss/ to: 1280x1500

Snapping http://localhost:8000/phase-banner.html at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/shared_scss/lists.html' '320,600,768,1024,1280' 'wraith/shots/__shared_scss__lists.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/service-id.html at: 1024x1500

Loading http://localhost:8000/shared_scss/lists.html at dimensions: 320x1500

Resizing http://localhost:8000/service-id.html to: 1280x1500

Snapping http://localhost:8000/shared_scss/lists.html at: 320x1500

Snapping http://localhost:8000/secondary-action-link.html at: 1280x1500

Snapping http://localhost:8000/previous-next-navigation.html at: 1280x1500

Resizing http://localhost:8000/shared_scss/lists.html to: 600x1500

Snapping http://localhost:8000/shared_scss/ at: 1280x1500

DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/shared_scss/dmspeak.html' '320,600,768,1024,1280' 'wraith/shots/__shared_scss__dmspeak.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/temporary-message.html' '320,600,768,1024,1280' 'wraith/shots/__temporary-message.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
DEBUG: phantomjs  '/Library/Ruby/Gems/2.0.0/gems/wraith-4.0.1/lib/wraith/javascript/phantom.js' 'http://localhost:8000/summary-table.html' '320,600,768,1024,1280' 'wraith/shots/__summary-table.html/MULTI_phantomjs_dev.png' 'body' '/Users/paulcraig/Desktop/new-toolkit/digitalmarketplace-frontend-toolkit/wraith/javascripts/wait--phantom.js' 'false'
Snapping http://localhost:8000/service-id.html at: 1280x1500

Loading http://localhost:8000/shared_scss/dmspeak.html at dimensions: 320x1500

Loading http://localhost:8000/summary-table.html at dimensions: 320x1500

Loading http://localhost:8000/temporary-message.html at dimensions: 320x1500

Snapping http://localhost:8000/shared_scss/lists.html at: 600x1500

Resizing http://localhost:8000/shared_scss/lists.html to: 768x1500

Snapping http://localhost:8000/shared_scss/dmspeak.html at: 320x1500

Snapping http://localhost:8000/temporary-message.html at: 320x1500

Snapping http://localhost:8000/summary-table.html at: 320x1500

Resizing http://localhost:8000/shared_scss/dmspeak.html to: 600x1500

Resizing http://localhost:8000/temporary-message.html to: 600x1500

Resizing http://localhost:8000/summary-table.html to: 600x1500

Snapping http://localhost:8000/shared_scss/lists.html at: 768x1500

Resizing http://localhost:8000/shared_scss/lists.html to: 1024x1500

Snapping http://localhost:8000/shared_scss/dmspeak.html at: 600x1500

Snapping http://localhost:8000/temporary-message.html at: 600x1500

Resizing http://localhost:8000/shared_scss/dmspeak.html to: 768x1500

Resizing http://localhost:8000/temporary-message.html to: 768x1500

Snapping http://localhost:8000/summary-table.html at: 600x1500

Resizing http://localhost:8000/summary-table.html to: 768x1500

Snapping http://localhost:8000/shared_scss/lists.html at: 1024x1500

Resizing http://localhost:8000/shared_scss/lists.html to: 1280x1500

Snapping http://localhost:8000/shared_scss/dmspeak.html at: 768x1500

Snapping http://localhost:8000/temporary-message.html at: 768x1500

Resizing http://localhost:8000/shared_scss/dmspeak.html to: 1024x1500

Resizing http://localhost:8000/temporary-message.html to: 1024x1500

Snapping http://localhost:8000/summary-table.html at: 768x1500

Resizing http://localhost:8000/summary-table.html to: 1024x1500

Snapping http://localhost:8000/shared_scss/lists.html at: 1280x1500

Snapping http://localhost:8000/shared_scss/dmspeak.html at: 1024x1500

Snapping http://localhost:8000/temporary-message.html at: 1024x1500

Resizing http://localhost:8000/shared_scss/dmspeak.html to: 1280x1500

Snapping http://localhost:8000/summary-table.html at: 1024x1500

Resizing http://localhost:8000/temporary-message.html to: 1280x1500

Resizing http://localhost:8000/summary-table.html to: 1280x1500

Snapping http://localhost:8000/shared_scss/dmspeak.html at: 1280x1500

Snapping http://localhost:8000/temporary-message.html at: 1280x1500

Snapping http://localhost:8000/summary-table.html at: 1280x1500

↑ never gets past this line, which is the final page at the highest resolution ↑

  • I have pasted the contents of my config file below:
# Wraith
# You will need wraith, imagemagick, and phantomsjs or similar.
#
# gem install wraith
# brew install phantomjs
# brew install imagemagick
#
# Take a baseline of the current version
#
# wraith history config.yml
#
# Switch to your feature branch and make changes.
#
# wraith latest config.yml
#
# This should generate a gallery containing diffs of the pages, at
# various resolutions.

#Headless browser option
browser:
  phantomjs: "phantomjs"

#If you want to have multiple snapping files, set the file name here

# Type the name of the directory that shots will be stored in
directory: "wraith/shots"
history_dir: "wraith/shots_history"

# Add maximum of 2 domains, key will act as a label
domains:
  dev: "http://localhost:8000"

#Type screen widths below, here are a couple of examples
screen_widths:
  - 320
  - 600
  - 768
  - 1024
  - 1280

# 1. Type page URL paths below, here are a couple of examples
#paths:
#  home: "/"
#  forms: "/forms/"
#  textbox: "/forms/textbox.html"
#  breadcrumb: "/breadcrumb.html"

# 2. OR specify a yml file with all of the urls (wraith can generate this automatically)
imports: "spider.yml"

# (optional) JavaScript file to execute before taking screenshot of every path. Default: nil
before_capture: "wraith/javascripts/wait--phantom.js"

# (optional) Resize to each screen width (efficient), or reload at each screen width (costly). Default: 'reload'
resize_or_reload: "resize"

#Amount of fuzz ImageMagick will use
fuzz: "20%"

#Set the number of days to keep the site spider file
spider_days:
  - 10

#Choose how results are displayed, by default alphanumeric. Different screen widths are always grouped.
#alphanumeric - all paths (with, and without, a difference) are shown, sorted by path
#diffs_first - all paths (with, and 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: diffs_first

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

# (optional) Choose to run Wraith in verbose mode, for easier debugging. Default: false
verbose: true

# (optional) Color to highlight the image diff. Default: 'blue'
highlight_color: red

# (optional) Parameters to pass to Phantom/Casper command line. Default: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'
phantomjs_options: ""

# (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
@mramitanand
Copy link

@pcraig3 How did you resolve this? Also how do you pass options to clear cache from phantomjs? Id appreciate any info thanks!!

@pcraig3
Copy link
Author

pcraig3 commented Feb 27, 2017

Hey! Thanks for the interest.

> How did you resolve this?

Unfortunately, I haven’t had any success getting this to work reliably on our project, although I have noticed that there seem to be specific conditions under which it fails.

Running Wraith against a couple of other projects we work on or against our live site seems to work much more reliably than the local version of the project I linked to — I think this means that it’s not getting something back that it expects in the response from the makeshift server we’re running in this project, but since filing this I’ve been working on other things and I haven’t had much more time to look into it.

> Also how do you pass options to clear cache from phantomjs?

Setting default parameters for phantomjs seems to be something you can do with the JavaScript files you run before opening each page (this one is a good example ), so the way that I added this line to my JS file to be run before the thing.

phantom.clearMemoryCache();

Which I found in this stack overflow answer.

Didn’t actually help solve my particular problem though, so it might not be what you’re looking for.

@mramitanand
Copy link

Thanks for responding! So Ive done a couple of things which I found here and on the internet to help me resolve some of our issues. The first is for when it hangs (I am running on sets of 10k so it does hang for me), @JimBledsoe wrote a script that will kill any hung phantomjs process' and wraith should restart it (upto 5 times I believe). That issue and script is here:

#461

To clear my cache, I followed this link and appended an "?wraith" to each line of my paths.

https://www.phase2technology.com/blog/wrestling-with-wraith-quick-and-dirty-visual-regression-testing/

As described:
"I also sometimes find that it’s useful to add “?wraith” to the ends of each path, so that you can see which requests are coming from Wraith in logs/analytics if needed. This can also be useful for busting caches to make sure you’re testing fresh pages, not cached ones."

Ill try to use what you put and see if works for me. Thank you!!

@micron
Copy link

micron commented Oct 27, 2017

I am experiencing the same issue. Wraith hangs on the last url. I'm running wraith in the container https://hub.docker.com/r/bbcnews/wraith/ tagged 6eac3f399c56fc54bdbfd973908b190defa9c6cf74958900e0042118ed726f33.

The site which I compare against (current) is on the internet. The (new) site which I run the test against is inside a container which is linked with the wraith container. My setup looks like this:

docker run -d --name=wraith_new -v $PROJECT_ROOT/public:/usr/share/nginx/html nginx
docker run -it -v $(pwd):/wraithy -w='/wraithy' --link wraith_new:wraith_new bbcnews/wraith capture config.yml

Unfortunately wraith hangs always on the last url, no matter if I lower the amount of pages.

I'll try to publish both pages on a webserver to see if it still hangs when both pages are on the web and I'll share my findings here.

@pivica
Copy link

pivica commented Dec 12, 2017

We had the same issue on local dev Linux machines - we wanted to compare live instance with local dev instance. Wraith was hanging on the last URL check all the time and was only working with a couple of test URLs, but as soon as we have 7-8 or more URLs it was failing.

We tried all recommended solutions in this and other issues and none of them worked. Finally we started changing web drivers so:

  • phantomjs - NOT working, hanging on last URL.
  • casperjs - NOT working, hanging on last URL.
  • slimerjs - NOT working, not compatible with latest Firefox Quantum engine.
  • chrome - WORKS!

Chrome driver support landed recently in #541 and I would just recommend everybody just to use this and nothing else. Its solving last URL hanging issue and it is also faster in execution. At least until slimerjs is fixed to work with latest Firefox engine this is the best option for now.

@andrei-a-papou
Copy link

andrei-a-papou commented Mar 21, 2018

@pivica SlimerJS beta should support Firefox 57+ (https://download.slimerjs.org/releases/1.0.0-beta.1/).

@kud
Copy link
Contributor

kud commented Jun 14, 2018

I'm using Wraith right now and I still have this problem. I use phantomjs.

@kud
Copy link
Contributor

kud commented Jun 14, 2018

How do you use Chrome in Wraith?

@max4ever
Copy link

max4ever commented Dec 12, 2018

Ok, it was painfull to get normal chrome to work.
But at least it doesn't freezes at the end like it does with casperjs.

(For mac you need an alias in your ~/.bash_profile
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
or see https://medium.com/@anotherplanet/how-to-use-headless-chrome-on-apple-osx-d9f7f3a54983)

capture.yaml

browser: "chrome"
...

paths:
  login_page: /backend/index.php

  backend01 : /backend/index.php?content=228 # test
  backend001 : /backend/index.php?content=85 # test
  backend0001 : /backend/index.php?content=355 # test
  backend00001 : /backend/index.php?content=31 # test

...

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

settle: 30 #(optional: integer) Number of seconds to wait for the page to settle (when using Chrome as the headless browser)
threads: 1 #(optional: integer) Number of capture threads to run simultanously


# (optional) Color to highlight the image diff. Default: 'blue'
highlight_color: red

javascript/login-backend.js

var original_url_asked = document.referrer;
if (typeof jQuery !== 'undefined') {//maybe 500 or 404 page

	//we ended up on login page, let's login
	$('body > form > input[type="password"]').prop('value', 'PASSWORD');
	$('body > form > input[type="text"]').prop('value', 'USERNAME');
	$('body > form > input[type="submit"]').click();//submit form

	//we are logged in
	$('body').empty();//clear all the stuff
	//since we can't redirect, we'll open a full page iframe with the url we wanted to see initially
	$('body').append('<div style="position:absolute; left: 0; right: 0; bottom: 0; top: 0px;"><iframe id="frame" width="100%" height="100%" frameborder="0" src="" ></iframe></div>');


	$("#frame").load(function () {
		//we are inside the iframe
		if (typeof jQuery !== 'undefined') {//maybe 500 or 404 page
			$(this).contents().find('#root div.backend_left').remove();//delete the menu, because it is usually not equal
			$(this).contents().find('#root div.backend_right_top').remove();//delete the top bar
		}
	});

	//load that original_url finally
	$("#frame").attr("src", original_url_asked);//cannot redirect or wraith complains
}

//important or wraith will not understand it is ready to take a screenshot
var callback = arguments[arguments.length-1];
setTimeout(callback, 2000);

This is my wraith info

DEBUG: #################################################
DEBUG:   Command run:        info
DEBUG:   Wraith version:     4.2.3
DEBUG:   Ruby version:       ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
DEBUG:   ImageMagick:        Version: ImageMagick 7.0.8-16 Q16 x86_64 2018-12-10 https://imagemagick.org
DEBUG:   PhantomJS version:  2.1.1
DEBUG:   chromedriver version:  ChromeDriver 71.0.3578.33 (269aa0e3f0db08097f0fe231c7e6be200b6939f7)
DEBUG:   CasperJS version:   1.1.4
DEBUG: #################################################

Execute by running:
wraith capture capture.yaml

if you get blank page, that's probably chrome and ssl problem, didn't find a fix, not even with

# (optional) Parameters to pass to Phantom/Casper command line. Default: '--ignore-ssl-errors=true --ssl-protocol=tlsv1'
#phantomjs_options: "some option here"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants