Root cause Error: incorrect header check



  • Hello i'm facing with this issue:
    In my product we get some log below:

    pdf utils failed to remove the hidden marks from pdf, this has no significant impact, but please report the issue. Error: incorrect header check
    at Zlib.zlibOnError [as onerror] (zlib.js:182:17)
    at Zlib.callbackTrampoline (internal/async_hooks.js:126:14)
    at Zlib.writeSync (<anonymous>)
    at processChunkSync (zlib.js:431:12)
    at zlibBufferSync (zlib.js:168:12)
    at Object.syncBufferWrapper [as unzipSync] (zlib.js:766:14)
    at processStream (/opt/app/jsreport/node_modules/jsreport-pdf-utils/lib/utils/processText.js:50:22)
    at processStream (/opt/app/jsreport/node_modules/jsreport-pdf-utils/lib/utils/processText.js:74:13)
    at processStream (/opt/app/jsreport/node_modules/jsreport-pdf-utils/lib/utils/processText.js:74:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
    errno: -3,
    code: 'Z_DATA_ERROR'
    }

    ? How can i find out which cause the error ?
    ? How can i monitor or show out how many request is processing or req frequency ?



  • Please email me to jan.blaha@jsreport.net a minimal jsreport export that replicates this warning. I would check where the error comes from. Thank you



  • what is minimal jsreport ? Is that "jsreport.config.json" ?


  • administrators

    a minimal jsreport export means an export file created by the import-export extension containing/selecting the needed entities to replicate the error (template, assets if any, or scripts if any), with the export we will be able to reproduce the bug for our investigation and eventually the bug fixing.



  • ah. in my case, we have many template run but log error only show like what i recommend in first post. So i dont know which template cost.

    Can u tell me when and how to fix that error?



  • If you check the logs more in detail, you will be able to find the template which caused it.
    There is typically a line like this

    2022-05-12T09:34:22.130Z - info: Rendering template { name: excel, recipe: xlsx, engine: handlebars, preview: false }
    

    Followed by other logs from the particular rendering and then there will be also your warning. Note it is really just a warning, not an error, and you typically won't recognize the different output.



  • If you email me the pdf output that is causing this warning, I should be able to find out the reason.



  • 0_1652547335324_download.jfif

    Hello i find out that is when i save this image with .jpeg. And use jsreport to show it. It's cause the error.



  • I've tried to use the image but it works for me, could you share a workspace with the replicated problem?
    https://playground.jsreport.net/w/anon/K6COeK7T



  • U can follow step:

    • Use jsreport ver 2.10.0
    • Generate my image (Save as JPEG, suggest: JFIF ) to b64
    • create html image tag with source is my B64 Image
    • Generate PDF from that HTML.

    Check log.



  • Hm, I've tried the same and no warnings or errors in the log
    0_1652774668202_upload-0d36af7d-1ae8-4187-9bdd-f21b6bf29535


Log in to reply
 

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