Page.printToPDF timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.



  • I have a very large PDF using chrome-pdf that renders around 750 pages and I am getting the error after 195,965ms.

    Here is my relevant docker variables:

          environment:
             - trustUserCode=true
             - reportTimeout=600000
             - workers_numberOfWorkers=10
             - blobStorage_provider=aws-s3-storage
             - extensions_awsS3Storage_accessKeyId=accessKey
             - extensions_awsS3Storage_secretAccessKey=secret
             - extensions_awsS3Storage_bucket=bucket
             - extensions_fs-store_persistence_provider=aws-s3
             - extensions_fs-store-aws-s3-persistence_bucket=bucket
             - extensions_fs-store-aws-s3-persistence_accessKeyId=accessKey
             - extensions_fs-store-aws-s3-persistence_secretAccessKey=secret
    

    Error in jsReport:

    Page.printToPDF timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
    ProtocolError: Page.printToPDF timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
        at new Callback (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:62:35)
        at CallbackRegistry.create (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:108:26)
        at Connection._rawSend (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:224:26)
        at CDPSessionImpl.send (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:433:78)
        at CDPPage.createPDFStream (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js:738:88)
        at CDPPage.pdf (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Page.js:771:37)
        at /app/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:391:27
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async /app/node_modules/@jsreport/jsreport-chrome-pdf/lib/conversion.js:432:22
    


  • Please try the following config

    chrome_launchOptions_protocolTimeout=600000
    


  • That worked thanks. It is now getting to 600000ms before timing out so I need to look at the template and see where I can optimize it.


Log in to reply
 

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