NAVIGATION
Shortcuts
 Release notes
 BigPicture
 Jira Cloud

 Jira Server

 BigGantt
 Jira Cloud

 Jira Server

 BigTemplate
 Jira Cloud

 Jira Server

Knowledge Base

Tutorials and tips

Notice: 

Beginning with the release of BigTemplate 2.7.0-jira7, our add-on's image export functionality is no longer dependent on PhantomJS engine. We will switch to Headless Chrome! 

Wonder why? 

PhantomJS served us well for many months but it had some shortcomings that actually made image export functionality within our add-ons less stable than we would have wished it to be. 

Commonplace crashes were a cause of numerous issues reported by our customers making the image export very cumbersome, sometimes not even possible.

Also, according to PhantomJS repository owner's official statement made on 2018-03-03, any plan for a version later than 2.1.1 has been effectively abandoned. Of course, later versions of PhantomJS are still being developed and released. But since these are coming out as beta, it is a risky business and we as a vendor simply cannot afford to rely on independent contributors and a potentially non-stable tool as we wish our customers not to be exposed to further issues related to such basic yet essential functionality. 

Given the above we've recently made a last-minute decision to entirely transition away from PhantomJS to Headless Chrome, which we really believe will diminish occurrences of crashes affecting our Cloud and Server add-ons. Unfortunately, despite the many advantages of Headless Chrome there is a major limitation due to which we have had to cease supporting export to PNG and JPEG. As soon as this bug is fixed, we'll bring these options back. At this moment please be aware that switching to Headless Chrome leaves you with a single image export option only - PDF. 

However, if export to PNG or JPEG is essential, feel encouraged to make use of some free online image converters like this one.


Quick comparison of image export engines: 


PhantomJSHeadless Chrome
Image export formatsPNG, JPEG, PDFPDF
What can be exportedGanttGantt, Roadmap, Resources, Risks


Although, compared to PhantomJS, Headless Chrome requires a greater effort from the user in terms of installation and configuration, it's still worth sparing a couple of minutes to set things up to enjoy the flawless image export. 

Below are the steps on how to achieve this on different platforms.

Steps to-do

for Windows:


1. The below example of Headless Chrome installation and configuration is presented on specific Program versions which have been formerly verified and tested.

2. All steps should to be performed as an Administrator.


Installation:

  1. Navigate to this page and download 'node-v8.5.0-x64.msi' file (or x86 depending on your OS)

  2. Install node from the downloaded file. Make sure add path is checked.





  3. Open Windows console as an Administrator (Ctrl+Shift+Enter) and run commands listed below to make sure everything is installed properly: 

    Command "node -v" should return v8.5.0
    Command "npm -v" should return 5.3.0



  4. Install 'puppeteer' by executing the following command in your terminal. 

    If you use Chrome browser it is recommended to close it before proceeding with further installation.


    "npm install -g puppeteer@1.0.0"



  5. Then just to make sure that 'puppeteer' is installed properly, run the below command.

    "npm list -g --depth=0"



    The expected result should show something like:

    C:\Users\Administrator\AppData\Roaming\npm

    `-- puppeteer@1.0.0

  6. Perform few more steps while being logged in as an Administrator

    6.1. Open the console, execute the command given below and copy the result returned (an outcome of the command should show directory which puppeteer is installed in)

    "npm root --quiet -g"



    6.2. Set the new System Variable.

    Open System Properties window > Advanced > Click on 'Environment Variables...'




    Add new System Variable by clicking 'New...' button.



    Variable name: NODE_PATH
    Variable value: <copied directory from step 6.1>



    Apply changes by clicking 'OK' button.



    6.3. After setting System Variable it is important to run the Jira Server in the new console window. So go ahead and stop the Jira Server (close the console if it has not 
    been closed automatically) and start it again.


  7. Log in as a user the Jira server is run, open new console and execute:

    "node -e "require('puppeteer')"

    There should be no error shown (just an empty line) like in the screenshot below:


Configuration: 


  1. Open Jira page in your browser (this is important so the following requests are authorized).



  2. Simply replace "/secure/Dashboard.jspa" with "/rest/softwareplant-bigtemplate/1.0/app/bigtemplate/export-config/image-engine/chrome"

       

  3. Export to PDF should now be visible within "Export manager" dialog.



    Replace "/secure/Dashboard.jspa" with "/rest/softwareplant-bigtemplate/1.0/app/bigtemplate/export-config/image-engine" to get the current configuration of export engine.

    This should display "HEADLESS_CHROME" if Headless Chrome is a current export engine.


    This build works fine with current version of puppeteer which is 1.0.0 but should also work with your older version installed. 

for CentOS (CentOS 7)


Install node from the EPEL Repository

0. All steps should to be performed as a root user. 

1. Make sure you have curl installed:
> yum install curl sudo

2. Make sure you have EPEL repository available:
> sudo yum install epel-release

3. Install NodeSource repository:
> curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

4. Install node:
> sudo yum install nodejs

5. Install puppeteer package:
> sudo npm install -g --allow-root --unsafe-perm=true puppeteer@1.0.0

6. Install build tools:
> sudo yum install gcc-c++ make

7. In order to check whether all the required dependencies are installed, go to directory:
> cd /usr/lib/node_modules/puppeteer/.local-chromium/linux-xxxx/chrome-linux

and run

> ./chrome --version

NOTE: If you don't have 'node_modules' in your /usr/lib directory, execute the following command to find out where it is installed:
> npm root --quiet -g

8. In case of an execution error, it is probably because of missing dependencies.

According to official documentation, here are the dependencies that are required to be installed:
> yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y

9. Set NODE_PATH variable:

> echo “export NODE_PATH=$(npm root --quiet -g)” >> /etc/profile.d/lib.sh

for Debian (Debian 9)


0. All steps should to be performed as a root user. 

1. Make sure you have curl installed:
> apt-get install curl sudo

2. Install NodeSource repository:
> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

3. Install node:
> sudo apt-get install -y nodejs

4. Install puppeteer package:
> sudo npm install -g --allow-root --unsafe-perm=true puppeteer@1.0.0

5. Install build tools if it's necessary:
> sudo yum install gcc-c++ make

6. In order to check whether all the required dependencies are installed, go to directory:
> cd /usr/lib/node_modules/puppeteer/.local-chromium/linux-xxxx/chrome-linux

and run

> ./chrome --version

NOTE: If you don't have 'node_modules' in your /usr/lib directory execute a below command to find out where it is installed:
> npm root --quiet -g

8. In case of an execution error, it is probably because of missing dependencies.

According to official documentation, here are the dependencies that are required to be installed:
> sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

9. Set NODE_PATH variable:

> echo “export NODE_PATH=$(npm root --quiet -g)” >> /etc/profile.d/lib.sh


If you have any further questions regarding setting up Headless Chrome or if by any chance image export fails afterward, please do not hesitate to contact our Support at support@softwareplant.com

You are evaluating RefinedTheme.