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)
      run npm audit fix to fix them, or npm 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-pdf

    Is this any kind of known issue? I couldn't find posts that seem similar to this.
    Thank you!



  • Hi,

    is there a valid reason for using phantom?
    It's not being maintained and insecure. The only valid reason is likely when you need to maintain some existing templates and don't want to migrate them to chrome-pdf.

    Do you get the error for every template? Also for "hello world" one?
    If you run jsreport in console and processes crashes, isn't there some error message printed?



  • 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



  • Yes, going with chrome is definitely the best choice.


Log in to reply
 

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