Getting a 502 Gateway error when running a template using the fop-pdf recipe.
Ubuntu 18.04 server behind nginx on separate Ubuntu 18.04 server. Jsreport version 2.6.1. Samples using chrome-pdf recipe function correctly.
FOP-PDF template was created by writing a simple Word 2019 doc and exporting it to Word 2003 XML format using the Microsoft Word2FO.xsl stylesheet as a transform. Copy and pasted file contents into empty template created in jsreport studio application. Set recipe for template to fop-pdf, saved template, than ran it, getting the 502 Gateway error. Logs show the following info:
console.log
{"level":"info","message":"Starting rendering request 1 (user: trboyden)","timestamp":"2019-10-11T10:51:28.340Z"}
{"level":"info","message":"Rendering template { name: demo_xsl-fo, recipe: fop-pdf, engine: jsrender, preview: true }","timestamp":"2019-10-11T10:51:28.344Z"}
{"level":"debug","message":"Data item not defined for this template.","timestamp":"2019-10-11T10:51:28.345Z"}
{"level":"debug","message":"Resources not defined for this template.","timestamp":"2019-10-11T10:51:28.346Z"}
{"level":"debug","message":"Base url not specified, skipping its injection.","timestamp":"2019-10-11T10:51:28.352Z"}
{"level":"debug","message":"Rendering engine jsrender","timestamp":"2019-10-11T10:51:28.352Z"}
{"level":"debug","message":"Compiled template not found in the cache, compiling","timestamp":"2019-10-11T10:51:28.470Z"}
{"level":"debug","message":"Executing recipe fop-pdf","timestamp":"2019-10-11T10:51:28.472Z"}
{"level":"info","message":"Rendering fop start.","timestamp":"2019-10-11T10:51:28.473Z"}
{"level":"info","message":"Rastering pdf child process start.","timestamp":"2019-10-11T10:51:28.474Z"}
{"level":"info","message":"Rastering pdf child process end.","timestamp":"2019-10-11T10:51:29.611Z"}
error.log
2019-10-11T10:51:29.617Z - error: uncaughtException: Cannot read property 'error' of undefined date=Fri Oct 11 2019 10:51:29 GMT+0000 (Coordinated Universal Time), pid=12413, uid=0, gid=0, cwd=/opt/jsreportapp, execPath=/usr/bin/node, version=v10.16.3, argv=[/usr/bin/node, /usr/lib/node_modules/pm2/lib/ProcessContainerFork.js], rss=96587776, heapTotal=56885248, heapUsed=49991104, external=538207, loadavg=[0.013671875, 0.0673828125, 0.0322265625], uptime=74117, trace=[column=30, file=/opt/jsreportapp/node_modules/jsreport-fop-pdf/lib/fop.js, function=null, line=51, method=null, native=false, column=5, file=child_process.js, function=ChildProcess.exithandler, line=301, method=exithandler, native=false, column=13, file=events.js, function=ChildProcess.emit, line=198, method=emit, native=false, column=16, file=internal/child_process.js, function=maybeClose, line=982, method=null, native=false, column=5, file=internal/child_process.js, function=Process.ChildProcess._handle.onexit, line=259, method=onexit, native=false], stack=[TypeError: Cannot read property 'error' of undefined, at /opt/jsreportapp/node_modules/jsreport-fop-pdf/lib/fop.js:51:30, at ChildProcess.exithandler (child_process.js:301:5), at ChildProcess.emit (events.js:198:13), at maybeClose (internal/child_process.js:982:16), at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)]
Hopefully someone can help me troubleshoot this. I am hoping to allow users to create report templates in MS Word, convert them to XSL-FO and fill them via jsreport.
Thanks,
Tim