PDF Export issue after Puppetter

PDF Export issue after Puppetter

Pdfexport fails after after upgrading to Puppetter from Phantom; We have had several customer tickets with an exception trace "Error in Exporting Data" and serverout log traces with:

Quote
java.lang.Exception: {"error":{"message":"An `executablePath` or `channel` must be specified for `puppeteer-core`","stack":"Error: An `executablePath` or `channel` must be specified for `puppeteer-core`\n    at assert (C:\\snapshot\\node_fies\\node_modules\\puppeteer-core\\lib\\cjs\\puppeteer\\util\\assert.js:18:15)\n    at ChromeLauncher.computeLaunchArguments (C:\\snapshot\\node_fies\\node_modules\\puppeteer-core\\lib\\cjs\\puppeteer\\node\\ChromeLauncher.js:102:36)\n    at async ChromeLauncher.launch (C:\\snapshot\\node_fies\\node_modules\\puppeteer-core\\lib\\cjs\\puppeteer\\node\\ProductLauncher.js:69:28)\n    at async C:\\snapshot\\node_fies\\index.js:150:25","statuscode":200}}


For this, there are several reasons, 

1.Server doesn't have an Internet connection to download chromium.

2. Server blocks below two URLs:

 a. https://storage.googleapis.com/ 

 b. https://npmmirror.com/


Steps to Resolve:


Step 1 : Download the appropriate pdfexport executable files from this link and extract the file contents in /ServiceDesk/custom/pdffolder/. Make sure to replace all existing files.

Step 2 :  Navigate to the /ServiceDesk/custom/pdffolder directory and run the executable with the following commands:


For Windows

Quote
pdfexport-win.exe "{\"options\":{\"init\":true,\"revision\":\"1370400\"}}"

 For Linux

Quote
./pdfexport-linux   "{\"options\":{\"init\":true,\"revision\":\"1370449\"}}" 


You should receive a success message that includes the new Chromium executable path and a .pcr_stats.json file

Test PDF Export: After following the above steps, try exporting the reports again to see if the issue is resolved.


Note: 

Kindly check the alias URL in Admin> Advanced Portal Settings " Alias URL " this should be accessible from the server.  


                  New to ADSelfService Plus?

                    • Related Articles

                    • PDF Export - Issue after Puppetter upgrade in 14820

                      Updated KB article: https://pitstop.manageengine.com/portal/en/kb/articles/pdf-export-issue-after-puppetter Context: After upgrading to Puppeteer from PhantomJS in Build 14820, some tickets have been raised with exceptions like "Error in Exporting ...
                    • SQL Query to export request details

                      Supported only for SQL DB(14201 build). Executed in SQL DB directly to export the requests. Below query to export requests for one account / site. SELECT "wo"."WORKORDERID" AS "Request ID", "wo"."TITLE" AS "Subject", "wotodesc"."FULLDESCRIPTION" AS ...
                    • Export Category,subcategory, item

                       This report is used to export the tree view. This report helps to import category,subcategory and item in other applications. Modify and import in the applications. SELECT CategoryDefinition.CATEGORYNAME "Category Name", SubCategoryDefinition.NAME ...
                    • How to export software data in CSV format?

                      Steps to export Software data in CSV format 1. Login to ServiceDesk Plus/AssetExplorer. 2. Click on the Reports tab and then click on New Query Report button. 3. Copy and paste the following query and click Run Report. select swm.name "Scanned ...
                    • Query to Export solutions (MSSQL & PGSQL)

                      Tested in Build PGSQL (14300) or MSSQL (14306) Run this query under Reports->New Query Report and export it to the desired format SELECT solution.solutionid "Solutionid", KB_Topics.TOPICNAME " Topic",Solution.TITLE "Subject ",Solution.DESCRIPTION ...