Thank you very much. That config tweak did seem to help a lot.
Posts made by preineck
-
RE: HTML-to-Xls page crash
-
HTML-to-Xls page crash
Hi,
I've been migrating jsreport from my mac to an ubuntu server. My problem this time is that an html-to-xls template is bombing with:2021-08-23T14:03:49.862Z - debug: Executing recipe html-to-xlsx 2021-08-23T14:03:49.862Z - info: html-to-xlsx generation is starting - debug: OData query on scripts 2021-08-23T15:31:03.181Z - warn: Rendering request 2 finished with error in 9060022 ms 2021-08-23T15:31:03.251Z - warn: Error when processing render request 2 Error while executing html-to-xlsx recipe. Page crashed! Error: Error while executing html-to-xlsx recipe. Page crashed! at module.exports (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/util/createError.js:11:13) at Reporter.createError (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/reporter.js:332:12) at Object.execute (/home/ubuntu/jsreportapp/node_modules/jsreport-html-to-xlsx/lib/recipe.js:159:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) caused by: Error: Page crashed! at Page._onTargetCrashed (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Page.js:216:24) at CDPSession.Page.client.on.event (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Page.js:124:56) at emitOne (events.js:116:13) at CDPSession.emit (events.js:211:7) at CDPSession._onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Connection.js:200:12) at Connection._onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Connection.js:112:17) at WebSocketTransport._ws.addEventListener.event (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/WebSocketTransport.js:44:24) at WebSocket.onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/event-target.js:120:16) at emitOne (events.js:116:13) at WebSocket.emit (events.js:211:7) at Receiver.receiverOnMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/websocket.js:789:20) at emitOne (events.js:116:13) at Receiver.emit (events.js:211:7) at Receiver.dataMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:422:14) at Receiver.getData (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:352:17) at Receiver.startLoop (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:138:22) 2021-08-23T15:31:03.252Z - debug: Processing schedule caseReviewSchedule_20210819 failed with : Error: Error while executing html-to-xlsx recipe. Page crashed! at module.exports (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/util/createError.js:11:13) at Reporter.createError (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/reporter.js:332:12) at Object.execute (/home/ubuntu/jsreportapp/node_modules/jsreport-html-to-xlsx/lib/recipe.js:159:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) caused by: Error: Page crashed! at Page._onTargetCrashed (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Page.js:216:24) at CDPSession.Page.client.on.event (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Page.js:124:56) at emitOne (events.js:116:13) at CDPSession.emit (events.js:211:7) at CDPSession._onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Connection.js:200:12) at Connection._onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/Connection.js:112:17) at WebSocketTransport._ws.addEventListener.event (/home/ubuntu/jsreportapp/node_modules/puppeteer/lib/WebSocketTransport.js:44:24) at WebSocket.onMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/event-target.js:120:16) at emitOne (events.js:116:13) at WebSocket.emit (events.js:211:7) at Receiver.receiverOnMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/websocket.js:789:20) at emitOne (events.js:116:13) at Receiver.emit (events.js:211:7) at Receiver.dataMessage (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:422:14) at Receiver.getData (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:352:17) at Receiver.startLoop (/home/ubuntu/jsreportapp/node_modules/puppeteer/node_modules/ws/lib/receiver.js:138:22)
My template uses Chrome html engine and has nothing in the xls asset (same on my local and ubuntu). On my local install Excel is already installed on the machine. Does it also need to be installed on the ubuntu machine for me to use that recipe? I'm not sure if this is a Chrome problem or Excel, but I'm able to produce other Chrome PDF reports.
Thanks
-
Hmtl-to-xlsx reports working on mac then git cloned to Ubuntu do not work
As in title, I have a couple reports that work on my mac that when cloned to Ubuntu do not work.
If important - I did have to delete some text in my settings file at Ubuntu after cloning for the reporter to initialize. Somehow it had text like "<<<<HEAD..." in it. So I deleted that stuff and then it did initialize.I have one HTML report that runs fine so it seems like maybe html-to-xmls is my problem. Both non-working reports use that recipe.
The error one of the reports throws is:
2021-08-19T14:11:01.977Z - debug: Executing recipe html-to-xlsx 2021-08-19T14:11:01.977Z - info: html-to-xlsx generation is starting 2021-08-19T14:11:04.991Z - info: html-to-xlsx generation was finished 2021-08-19T14:11:05.523Z - debug: Executing script anonymous using http-server strategy (node:13599) UnhandledPromiseRejectionWarning: [object Object] (node:13599) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:13599) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The other is :
2021-08-19T14:30:52.364Z - debug: Executing recipe html 2021-08-19T14:30:52.364Z - debug: Executing script anonymous using http-server strategy (node:13599) UnhandledPromiseRejectionWarning: [object Object] (node:13599) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
I believe I followed the Ubuntu installation instructions exactly. This Ubuntu version is 18.04. I am cloning the /data folder only when I migrate.
Any advice?
Thank you -
RE: HTML-to-xlsx error - "spawn Unknown system error -86 Error"
I didn't even know I had that option - that fixed it. Thank you!
-
HTML-to-xlsx error - "spawn Unknown system error -86 Error"
Hi everyone.
This is so odd. I've just been running an HTML-to-xlsx report over and over (in studio) and it was working, when suddenly it started throwing this error:2021-08-18T21:34:05.513Z - warn: Error when processing render request 1 Error while executing html-to-xlsx recipe. spawn Unknown system error -86 Error: Error while executing html-to-xlsx recipe. spawn Unknown system error -86 at module.exports (/Users/johnreineck/jsreportapp/node_modules/jsreport-core/lib/util/createError.js:11:13) at Reporter.createError (/Users/johnreineck/jsreportapp/node_modules/jsreport-core/lib/reporter.js:328:12) at Object.execute (/Users/johnreineck/jsreportapp/node_modules/jsreport-html-to-xlsx/lib/recipe.js:159:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7) caused by: Error: spawn Unknown system error -86 at ChildProcess.spawn (internal/child_process.js:313:11) at exports.spawn (child_process.js:503:9) at Object.exports.execFile (child_process.js:213:15) at Promise (/Users/johnreineck/jsreportapp/node_modules/phantom-page-eval/lib/eval.js:88:34) at new Promise (<anonymous>) at evaluate (/Users/johnreineck/jsreportapp/node_modules/phantom-page-eval/lib/eval.js:83:14) at <anonymous> 2021-08-18T21:34:05.513Z - warn: Error during processing request at http://localhost:5488/api/report/caseReporting(clone)
Switching over to HTML it's fine but I do need the to-xlsx version for a one formula.
I haven't thought of many things to try beyond killing the jsreport process and restarting, then opening studio in another tab.
Any ideas? Thank you
-
RE: Reference img path - ubuntu - <img> tag
Thank you. This helped get it working again.
-
Reference img path - ubuntu - <img> tag
I'm cloning my local jsreport out to an ubuntu server and my logo references broke in the process.
I'm not a proficient linux user at all - if I have a logo sitting in /jsreportapp/data/logo.png and I want a report to display it by doing
<img background-color:transparent src = "logo.png" style="width:260px;"</img>
Can anyone help me with what the path in that tag would need to be? I feel like I've tried every thing I could think of:
logo.png by itself
/data/logo.png (really thought this would have been the answer)
/jsreportapp/data/logo.png
/home/ubuntu/jsreportapp/data/logo.png...which is pretty much all the way down.When this was on my mac it was totally fine but this move has messed it all up.
I have tried to make this an asset but i couldn't get it to work that way.
Thank you
-
RE: Ubuntu node require mongodb fails
Good call. It was the node version. Had to update to 10-something to fix the error. Had to also add the new node /bin to environment variable.
Documenting in case this helps anyone with the same problem.
Thank you -
Ubuntu node require mongodb fails
Hi guys -
I have just installed jsreport on an Ubuntu server. I followed some instructions found here: https://jsreport.net/learn/ubuntu.
INstall seems totally fine until running a report.
My problem is that every one of my reports pulls from MongoDB so I havebeforeRender
script for them all and every one of them has torequire('mongodb').MongoClient;
When I try to render a report I'm getting the error below. I can't find any information on "unable to require module mongodb".
I am really just migrating jsreport from my local mac to Ubuntu (I cloned reports into /data from a working install). I am not a proficient Ubuntu user so don't know why this might happen. Can anyone help?confirmed: MongoDB ^4.0.1 is in package.json dependencies. Exact same report I am testing works in another environment (mac).
Error:
A critical error occurred while trying to execute the render command (2). Error while executing user script. Unable to require module mongodb. Unexpected token {
/home/ubuntu/jsreportapp/node_modules/mongodb/lib/bson.js:10
catch { } // eslint-disable-line
^SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/jsreportapp/node_modules/mongodb/lib/utils.js:10:16).1 | const MongoClient = require('mongodb').MongoClient;
| ^
2 | const ObjectId = require('mongodb').ObjectID;
3 | const conns = require('./connStrings');
4 |(1).
caused by error (2):
-> stack
Error:
at onCriticalError (/home/ubuntu/jsreportapp/node_modules/jsreport-cli/lib/commands/render.js:302:19)
at exports.handler (/home/ubuntu/jsreportapp/node_modules/jsreport-cli/lib/commands/render.js:298:12)
at <anonymous>
caused by error (1):
-> meta = {"weak":true,"logged":true}
-> stack
Error: Unable to require module mongodb. Unexpected token {
/home/ubuntu/jsreportapp/node_modules/mongodb/lib/bson.js:10
catch { } // eslint-disable-line
^SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/jsreportapp/node_modules/mongodb/lib/utils.js:10:16)
at safeRequire (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/render/safeSandbox.js:201:15)
at doRequire (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/render/safeSandbox.js:208:8)
at _require (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/render/safeSandbox.js:66:14)
at Object.base.apply (/home/ubuntu/jsreportapp/node_modules/vm2/lib/contextify.js:469:32)
at evaluate-user-script.js:1:21
at ContextifyScript.Script.runInContext (vm.js:59:29)
at VM.run (/home/ubuntu/jsreportapp/node_modules/vm2/lib/main.js:219:62)
at run (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/render/safeSandbox.js:171:19)
at scriptEvalChild (/home/ubuntu/jsreportapp/node_modules/jsreport-scripts/lib/scriptEvalChild.js:210:5)
at scriptExecModuleWrapper (/home/ubuntu/jsreportapp/node_modules/jsreport-core/lib/scriptExecModuleWrapper.js:34:26) -
RE: phantom-pdf crash every time
Hi, thanks for answering. My only reason for using it was that I thought I might have better luck with getting headers to work.
it does crash the jsreport process every time, even on the simplest possible template (no data, just a little text).
The only message that I see is that last line "Executing recipe phantom-pdf".
If you are saying phantom-pdf is basically deprecated I will abandon trying to use it. I'll post separately about my header difficulties if I can't figure them out.
Thanks -
phantom-pdf crash every time
Hello. I am finding that every time I try to run a template using the phantom-pdf recipe, JSReport process crashes.
Initially I had many warnings about dependencies from the npm install, but I think I got rid of all those. My last install attempt looked like:
jsreportapp % npm install jsreport-phantom-pdf --save
npm WARN deprecated request@2.67.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN jsreport-server@ No description
npm WARN jsreport-server@ No repository field.
npm WARN jsreport-server@ No license field.- jsreport-phantom-pdf@2.6.1
updated 1 package and audited 1146 packages in 6.954s
found 99 vulnerabilities (49 low, 20 moderate, 30 high)
runnpm audit fix
to fix them, ornpm audit
for details
The last log entry from JSREport when I ran this report is:
2021-01-28T23:07:06.156Z - debug: Executing script mongoScriptTabular using http-server strategy
(node:79896) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2021-01-28T23:07:06.615Z - debug: Base url not specified, skipping its injection.
2021-01-28T23:07:06.616Z - debug: Rendering engine handlebars using http-server strategy
2021-01-28T23:07:06.745Z - debug: Compiled template not found in the cache, compiling
2021-01-28T23:07:06.746Z - debug: Executing recipe phantom-pdfIs this any kind of known issue? I couldn't find posts that seem similar to this.
Thank you! - jsreport-phantom-pdf@2.6.1
-
cannot GET /client
I am testing JSReport and want to set up a portal. I was following the deep dive screencast from several years ago. Going to localhost:5488/client results in "cannot GET /client". Have things changed since the recording of that video or should I be installing something else?