jsreport / jsreport-dotnet

jsreport .NET sdk home repository
https://jsreport.net
MIT License
63 stars 9 forks source link

Error on executing report for large dataaset #68

Open tenshi04 opened 1 year ago

tenshi04 commented 1 year ago

I am using jsReport.Binary 3.11.0 and jsreport.Client3.8.0 and jsreport.local 3.8.1

I am trying to produce a report (PDF and EXCEL) for data which consists of about 28,000 records. I am using LocalReporting()

My call looks like this:

var rs = new LocalReporting() .KillRunningJsReportProcesses() .UseBinary(JsReportBinary.GetBinary()) .Configure(cfg => { cfg.Chrome = new ChromeConfiguration() { Timeout = 50000 }; return cfg; }) .AsUtility() .KeepAlive(false) .Create();

I've tried a few variations of this (ex. with no time out, with no keepalive) but I still keep getting the same error when trying to produce the report.

The call takes about 45 minutes and then it errors out with the following message:

jsreport.Local.JsReportBinaryException: Error rendering report: rendering has finished with errors:An error ocurred while trying to execute \"render\" command (3)(because) a critical error occurred while trying to execute the render command (2)(because) protocol error (Page.printToPDF): Printing failed (1)-- error (1) ---> meta = {\"name\":\"ProtocolError\",\"originalMessage\":\"Printing failed\",\"logged\":true,\"previousOperationId\":\"8w2z0xcclenopsk\"}-> stackProtocolError: at C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:286:24 at new Promise () at CDPSession.send (C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\common\Connection.js:282:16) at Page.createPDFStream (C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1963:85) at Page.pdf (C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1993:37) at C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\conversion.js:382:27 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\conversion.js:423:22wrapped by:-- error (2) ---> stackError: at onCriticalError (C:\snapshot\jsreport\packages\jsreport-cli\lib\commands\render.js:304:19) at C:\snapshot\jsreport\packages\jsreport-cli\lib\commands\render.js:300:12 at async executeCommand (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\executeCommand.js:22:20) at async Object.handler (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\registerCommand.js:76:9) at async parseCLI (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startCommand.js:156:3) at async startCLI (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startCommand.js:121:20) at async startCommand (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startCommand.js:67:5) at async startProcessing (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startProcessing.js:195:3)wrapped by:-- error (3) ---> stackError: at startCLI (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startCommand.js:127:19) at async startCommand (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startCommand.js:67:5) at async startProcessing (C:\snapshot\jsreport\packages\jsreport-cli\lib\commander\startProcessing.js:195:3)\nusing jsreport instance passed from optionsdisabling express extension..2023-08-28T15:32:19.186Z - \u001B[32minfo\u001B[39m: Initializing jsreport (version: 3.11.0, configuration file: none, nodejs: 16.12.0)2023-08-28T15:32:19.221Z - \u001B[32minfo\u001B[39m: Using extension authentication@local:D:ajsreportjsreportpackagesjsreport-authentication:3.4.02023-08-28T15:32:19.301Z - \u001B[34mdebug\u001B[39m: Extension authentication@local:D:ajsreportjsreportpackagesjsreport-authentication:3.4.0 was disabled2023-08-28T15:32:19.301Z - \u001B[32minfo\u001B[39m: Using extension base@local:D:ajsreportjsreportpackagesjsreport-base:3.0.12023-08-28T15:32:19.306Z - \u001B[32minfo\u001B[39m: Using extension child-templates@local:D:ajsreportjsreportpackagesjsreport-child-templates:3.1.02023-08-28T15:32:19.308Z - \u001B[32minfo\u001B[39m: Using extension cli@local:D:ajsreportjsreportpackagesjsreport-cli:3.2.32023-08-28T15:32:19.308Z - \u001B[32minfo\u001B[39m: Using extension components@local:D:ajsreportjsreportpackagesjsreport-components:3.3.02023-08-28T15:32:19.309Z - \u001B[32minfo\u001B[39m: Using extension data@local:D:ajsreportjsreportpackagesjsreport-data:3.1.02023-08-28T15:32:19.310Z - \u001B[34mdebug\u001B[39m: Extension express@local:D:ajsreportjsreportpackagesjsreport-express:3.7.0 is disabled, skipping2023-08-28T15:32:19.310Z - \u001B[32minfo\u001B[39m: Using extension freeze@local:D:ajsreportjsreportpackagesjsreport-freeze:3.0.12023-08-28T15:32:19.311Z - \u001B[32minfo\u001B[39m: Using extension fs-store@local:D:ajsreportjsreportpackagesjsreport-fs-store:3.2.42023-08-28T15:32:19.357Z - \u001B[34mdebug\u001B[39m: Extension fs-store@local:D:ajsreportjsreportpackagesjsreport-fs-store:3.2.4 was disabled2023-08-28T15:32:19.358Z - \u001B[32minfo\u001B[39m: Using extension handlebars@local:D:ajsreportjsreportpackagesjsreport-handlebars:3.2.12023-08-28T15:32:19.360Z - \u001B[32minfo\u001B[39m: Using extension import-export@local:D:ajsreportjsreportpackagesjsreport-import-export:3.2.02023-08-28T15:32:19.360Z - \u001B[32minfo\u001B[39m: Using extension jsrender@local:D:ajsreportjsreportpackagesjsreport-jsrender:3.0.02023-08-28T15:32:19.361Z - \u001B[32minfo\u001B[39m: Using extension licensing@local:D:ajsreportjsreportpackagesjsreport-licensing:3.0.32023-08-28T15:32:19.362Z - \u001B[32minfo\u001B[39m: Using extension localization@local:D:ajsreportjsreportpackagesjsreport-localization:3.2.22023-08-28T15:32:19.363Z - \u001B[32minfo\u001B[39m: Using extension npm@local:D:ajsreportjsreportpackagesjsreport-npm:3.1.22023-08-28T15:32:19.366Z - \u001B[32minfo\u001B[39m: Using extension pdf-utils@local:D:ajsreportjsreportpackagesjsreport-pdf-utils:3.9.02023-08-28T15:32:19.367Z - \u001B[32minfo\u001B[39m: Using extension puppeteer-compile@local:D:ajsreportjsreportpackagesjsreport-puppeteer-compile:3.0.22023-08-28T15:32:19.368Z - \u001B[34mdebug\u001B[39m: skip decompressing chrome in temp because it already exists2023-08-28T15:32:19.368Z - \u001B[32minfo\u001B[39m: Using extension reports@local:D:ajsreportjsreportpackagesjsreport-reports:3.1.12023-08-28T15:32:19.369Z - \u001B[32minfo\u001B[39m: Using extension tags@local:D:ajsreportjsreportpackagesjsreport-tags:3.1.12023-08-28T15:32:19.370Z - \u001B[32minfo\u001B[39m: Using extension text@local:D:ajsreportjsreportpackagesjsreport-text:3.0.02023-08-28T15:32:19.371Z - \u001B[32minfo\u001B[39m: Using extension version-control@local:D:ajsreportjsreportpackagesjsreport-version-control:3.1.22023-08-28T15:32:19.377Z - \u001B[32minfo\u001B[39m: Using extension assets@local:D:ajsreportjsreportpackagesjsreport-assets:3.6.02023-08-28T15:32:19.384Z - \u001B[32minfo\u001B[39m: Using extension authorization@local:D:ajsreportjsreportpackagesjsreport-authorization:3.3.02023-08-28T15:32:19.385Z - \u001B[34mdebug\u001B[39m: Extension authorization@local:D:ajsreportjsreportpackagesjsreport-authorization:3.3.0 was disabled2023-08-28T15:32:19.385Z - \u001B[32minfo\u001B[39m: Using extension browser-client@local:D:ajsreportjsreportpackagesjsreport-browser-client:3.1.12023-08-28T15:32:19.386Z - \u001B[32minfo\u001B[39m: Using extension chrome-pdf@local:D:ajsreportjsreportpackagesjsreport-chrome-pdf:3.3.02023-08-28T15:32:19.389Z - \u001B[34mdebug\u001B[39m: Chrome strategy is chrome-pool, numberOfWorkers: 12023-08-28T15:32:19.389Z - \u001B[34mdebug\u001B[39m: Chrome custom launch options are executablePath=C:\Users\angelbert.david\AppData\Local\Temp\jsreport\compile\jsreport-3.11.0-1tFaMoYkn\chrome\chrome.exe2023-08-28T15:32:19.390Z - \u001B[32minfo\u001B[39m: Using extension docx@local:D:ajsreportjsreportpackagesjsreport-docx:3.7.02023-08-28T15:32:19.392Z - \u001B[32minfo\u001B[39m: Using extension html-to-xlsx@local:D:ajsreportjsreportpackagesjsreport-html-to-xlsx:3.3.02023-08-28T15:32:19.397Z - \u001B[32minfo\u001B[39m: html-to-xlsx detected chrome as available html engine2023-08-28T15:32:19.397Z - \u001B[32minfo\u001B[39m: html-to-xlsx detected phantom as available html engine2023-08-28T15:32:19.397Z - \u001B[32minfo\u001B[39m: Using extension pptx@local:D:ajsreportjsreportpackagesjsreport-pptx:3.4.02023-08-28T15:32:19.399Z - \u001B[32minfo\u001B[39m: Using extension scheduling@local:D:ajsreportjsreportpackagesjsreport-scheduling:3.0.32023-08-28T15:32:19.417Z - \u001B[32minfo\u001B[39m: Using extension scripts@local:D:ajsreportjsreportpackagesjsreport-scripts:3.4.12023-08-28T15:32:19.418Z - \u001B[32minfo\u001B[39m: Using extension static-pdf@local:D:ajsreportjsreportpackagesjsreport-static-pdf:3.0.12023-08-28T15:32:19.418Z - \u001B[32minfo\u001B[39m: Using extension studio@local:D:ajsreportjsreportpackagesjsreport-studio:3.9.12023-08-28T15:32:19.473Z - \u001B[32minfo\u001B[39m: Using extension xlsx@local:D:ajsreportjsreportpackagesjsreport-xlsx:3.4.02023-08-28T15:32:19.483Z - \u001B[32minfo\u001B[39m: Using extension public-templates@local:D:ajsreportjsreportpackagesjsreport-public-templates:3.0.02023-08-28T15:32:19.484Z - \u001B[34mdebug\u001B[39m: Extension public-templates@local:D:ajsreportjsreportpackagesjsreport-public-templates:3.0.0 was disabled2023-08-28T15:32:19.484Z - \u001B[32minfo\u001B[39m: Using extension sample-template@local:D:ajsreportjsreportpackagesjsreport-sample-template:3.2.12023-08-28T15:32:19.485Z - \u001B[32minfo\u001B[39m: Using extension studio-theme-dark@local:D:ajsreportjsreportpackagesjsreport-studio-theme-dark:3.0.12023-08-28T15:32:19.485Z - \u001B[32minfo\u001B[39m: Using general timeout for rendering (reportTimeout: 60000)2023-08-28T15:32:19.485Z - \u001B[32minfo\u001B[39m: Using memory provider for template store. The saved templates will be lost after restart2023-08-28T15:32:19.493Z - \u001B[34mdebug\u001B[39m: studio default theme is: light2023-08-28T15:32:19.500Z - \u001B[32minfo\u001B[39m: Verifying license key free2023-08-28T15:32:19.501Z - \u001B[32minfo\u001B[39m: Using free license2023-08-28T15:32:19.504Z - \u001B[32minfo\u001B[39m: Migrating templates chrome settings (waitForNetworkIddle -> waitForNetworkIdle)2023-08-28T15:32:19.504Z - \u001B[32minfo\u001B[39m: Migration successful2023-08-28T15:32:19.505Z - \u001B[34mdebug\u001B[39m: Creating samples is disabled2023-08-28T15:32:19.505Z - \u001B[32minfo\u001B[39m: Initializing worker threads2023-08-28T15:32:19.505Z - \u001B[34mdebug\u001B[39m: Extensions in workers: base, child-templates, components, data, handlebars, jsrender, localization, npm, pdf-utils, reports, text, version-control, assets, browser-client, chrome-pdf, docx, html-to-xlsx, pptx, scripts, static-pdf, studio, xlsx2023-08-28T15:32:19.962Z - \u001B[32minfo\u001B[39m: 2 worker threads initialized in 457ms2023-08-28T15:32:19.963Z - \u001B[32minfo\u001B[39m: Starting temp files cleanup with 180000ms threshold2023-08-28T15:32:19.963Z - \u001B[32minfo\u001B[39m: reporter initializedstarting rendering process..Output configured to: C:\Users\angelbert.david\AppData\Local\Temp\jsreport\autocleanup\outdd32a002-2c89-4cbc-aaf1-90419dd8772eMeta configured to: C:\Users\angelbert.david\AppData\Local\Temp\jsreport\autocleanup\metad73aa3a1-84db-472f-b9f9-272a4e32a0fcrendering with options:{ ....

Can you please help?

pofider commented 1 year ago

Hm. The chrome badly failed and didn't provide more information about why. So that can be anything from some internal Chrome timeout or limited HW resources. Would you be able to email me what you are trying to print? I can try it on my local and find out what could be happening.

tenshi04 commented 1 year ago

Hi Jan,

What address is best?

Classification: Protected A From: Jan Blaha @.> Sent: August 31, 2023 6:49 AM To: jsreport/jsreport-dotnet @.> Cc: Angelbert David @.>; Author @.> Subject: Re: [jsreport/jsreport-dotnet] Error on executing report for large dataaset (Issue #68)

CAUTION: This email has been sent from an external source. Treat hyperlinks and attachments in this email with care.

Hm. The chrome badly failed and didn't provide more information about why. So that can be anything from some internal Chrome timeout or limited HW resources. Would you be able to email me what you are trying to print? I can try it on my local and find out what could be happening.

- Reply to this email directly, view it on GitHubhttps://github.com/jsreport/jsreport-dotnet/issues/68#issuecomment-1700977544, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTYOSREXZE3QT2D7HZCLO3XYCB3HANCNFSM6AAAAAA4BU3EJE. You are receiving this because you authored the thread.Message ID: @.***>

pofider commented 1 year ago

jan.blaha@jsreport.net