waiting for Page.printToPDF failed: timeout 30000ms exceeded



  • I have set my report time out as 1200000. Still, sometimes the following error arises.
    Can you explain this and give me a solution if possible?

    waiting for Page.printToPDF failed: timeout 30000ms exceeded

    TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded
    at Object.waitWithTimeout (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js:224:26)
    at Page.createPDFStream (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2045:49)
    at Page.pdf (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2057:37)
    at /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:336:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:377:22



  • This shouldn't be happening. Please share the jsreport version and output logs and the whole config.



  • The Report version is 3.1.1
    Config File:
    {

    "allowLocalFilesAccess": true,
    "store": {
        "provider": "fs"
    },
    "blobStorage": {
        "provider": "fs"
    },
    "templatingEngines": {
        "timeout": 1200000
    },
    "chrome": {
        "timeout": 1200000
    },
    "reportTimeout": 1200000,
    "workers":{
    	"numberOfWorkers":6
    	}, 
    "extensions": {
        "authentication" : {
            "cookieSession": {
                "secret": "<your strong secret>"
            },
            "admin": {
                "username" : "admin",
                "password": "password"
            },
            "enabled": false
        },
        "sample-template": {
            "createSamples": true
        },
        "scripts": {
            "timeout": 1200000
        },
    	"express": {
            "inputRequestLimit": "200mb",
            "renderTimeout": 1200000
        },
    	"fs-store": {
       "syncModifications": false
    }
    }
    

    }

    Log:

    info
    +0
    Starting rendering request 42 (user: null)
    info
    +0
    Rendering template { name: Active Case Basic Roster, recipe: chrome-pdf, engine: handlebars, preview: false }
    debug
    +4
    Inline data specified.
    debug
    +1
    Base url not specified, skipping its injection.
    debug
    +14
    Replaced assets ["style.css"]
    debug
    +0
    Rendering engine handlebars
    debug
    +1463
    Executing recipe chrome-pdf
    debug
    +15
    Converting with chrome HeadlessChrome/93.0.4577.0 using chrome-pool strategy
    debug
    +45
    Page request: GET (document) file:///tmp/jsreport/autocleanup/82a82a00-f371-4892-8968-c2cd4d07a673-chrome-pdf.html
    debug
    +10306
    Page request finished: GET (document) file:///tmp/jsreport/autocleanup/82a82a00-f371-4892-8968-c2cd4d07a673-chrome-pdf.html
    debug
    +541
    Running chrome with params {"printBackground":true,"marginTop":"3.4cm","marginBottom":"1.3cm","landscape":true,"displayHeaderFooter":false,"margin":{"top":"3.4cm","bottom":"1.3cm"}}
    error
    +30001
    Error when processing render request 42 waiting for Page.printToPDF failed: timeout 30000ms exceeded TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded
    at Object.waitWithTimeout (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js:224:26)
    at Page.createPDFStream (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2045:49)
    at Page.pdf (/var/www/html/jsreport-dev/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2057:37)
    at /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:336:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /var/www/html/jsreport-dev/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:377:22
    error
    +1
    Rendering request 42 finished with error in 42391 ms



  • Thank you.
    This was fixed in the jsreport 3.2.0, but better to update to the latest if its possible for you.

    Please note the following configs aren't used in jsreport v3 and you can have just reportTimeout in the config

    "templatingEngines": {
        "timeout": 1200000
    },
    "chrome": {
        "timeout": 1200000
    },
    "extensions": {
    "scripts": {
            "timeout": 1200000
        }
    }
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.