Error - Unable to render template. spawn UNKNOWN
-
Hey hello,
@jan_blahaWe get this error while rendering the report: "Unable to render template. spawn UNKNOWN",
I don't understand how to resolve it, can you suggest some solutions? on this.This are console logs:
2023-06-07T14:29:26.770Z - info: Render request 1 queued for execution and waiting for available worker rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.855Z - info: Starting rendering request 1 rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.856Z - info: Rendering template { name: returnTemplate, recipe: chrome-pdf, engine: handlebars, preview: false } rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.857Z - debug: Inline data specified. rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.857Z - debug: Base url not specified, skipping its injection. rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.936Z - debug: Replaced assets ["returnTemplate-style.css"] rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:26.936Z - debug: Rendering engine handlebars rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:28.624Z - debug: Executing recipe chrome-pdf rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:28.668Z - error: Error when processing render request 1
(because) spawn UNKNOWN
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:698:9)
at Object.spawn (pkg/prelude/bootstrap.js:1963:27)
at BrowserRunner.start (C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\node\BrowserRunner.js:119:34)
at ChromeLauncher.launch (C:\snapshot\jsreport\node_modules\puppeteer\lib\cjs\puppeteer\node\ChromeLauncher.js:76:16)
at async createBrowser (C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\chromePoolStrategy.js:98:26)
at async allocateBrowser (C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\chromePoolStrategy.js:113:5)
at async getBrowser (C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\chromePoolStrategy.js:23:30)
at async C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\conversion.js:11:19
at async execute (C:\snapshot\jsreport\packages\jsreport-chrome-pdf\lib\chromePoolStrategy.js:20:22) rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:28.669Z - error: Rendering request 1 finished with error in 1903 ms rootId=rfgnjez915tb1a2, id=rfgnjez915tb1a2
2023-06-07T14:29:28.677Z - error: Error during processing request at http://localhost:5488/api/report
-
It seems you use
jsreport.exe
binary and it can't run chrome.exe for some unknown reason.
Thechrome.exe
is extracted to the user temp during the first run.Please try to remove the
[user temp folder]/jsreport
and try it again.
Typically its herec:\Users\[user]\AppData\Local\Temp\jsreport\