ERROR [Content Testing]: Cannot find PhantomJS executable at ‘ (…) /data/tools/phantomjs/phantomjs.exe’. Aborting screenshot generation.

In Sitecore 8 and above, while starting a Multivariate Tests, you may see broken thumbnails and popups with warnings such as below, and your Sitecore Log showing the error at this blog title.

Error Running Test - PhantomJS - 1
Error Running Test - PhantomJS - 2
According to what Sitecore Development Team announced at this community post for why Sitecore adopted PhantomJS:

Content Testing in Sitecore uses the Phantom JS tool for generation of the screenshot image files. In case you didn’t know, Sitecore has had screenshot generation features for quite some time. We use it to generate icons for items that you’ll be listing in the UI like renderings. These icon generation features are based on the System.Windows.Forms.WebBrowser control built into .net. So why did we not use the existing screenshot features for Content Testing? In early testing we found discrepancies with the WebBrowser control. WebBrowser uses Internet Explorer installed on the server where Sitecore is running. But the specific version that it uses isn’t always the latest. There are registry updates one can make to force the appropriate IE version, but this seemed like a big ask of users. This was one of the reasons we chose to use Phantom JS instead.

Cause and Solution

The error in question will show the full path to where Sitecore is looking for PhantomJS. This path is defined at Sitecore.ContentTesting.config, at the entry “ContentTesting.PhantomJS.ExecutablePath”. Start your investigation by checking where your setting is currently pointing to.

By default this setting points to “$(dataFolder)/tools/phantomjs/phantomjs.exe”. If that is your case, check if your Data folder has the PhantomJS executable under that path. If this file is lacking, take a copy from a fresh Sitecore installation (make sure to use the very same revision your site is using).

See also: PhantomJS and security hardening

Publicado em Uncategorized Marcado com: ,
2 comentários sobre “ERROR [Content Testing]: Cannot find PhantomJS executable at ‘ (…) /data/tools/phantomjs/phantomjs.exe’. Aborting screenshot generation.
  1. Fred says:

    Thanks! This post helped

Leave a Reply

Your email address will not be published. Required fields are marked *

*

  Am Not Spammer

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>