Error uploading image "central directory record signature not found"



  • I have duplicated our environment on the second server. on the first server no issue with images.

    I am getting this error on server 2 with images.

    Error: end of central directory record signature not found
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:187:14
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:631:5
        at /home/ubuntu/jsreportapp/node_modules/fd-slicer/index.js:32:7
        at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5)... Error: Error: end of central directory record signature not found
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:187:14
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:631:5
        at /home/ubuntu/jsreportapp/node_modules/fd-slicer/index.js:32:7
        at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5)...
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:187:14
        at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:631:5
        at /home/ubuntu/jsreportapp/node_modules/fd-slicer/index.js:32:7
        at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5)...
        at f (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:818366)
        at https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:819089
        at b.callback (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:8120)
        at b.<anonymous> (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:6090)
        at b.r.emit (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:6:109337)
        at XMLHttpRequest.t.onreadystatechange (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:9813)
    From previous event:
        at T.j [as _captureStackTrace] (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:1059825)
        at T._resolveFromExecutor (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:1089522)
        at new T (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:1082760)
        at Object.d.forEach.h.<computed> [as post] (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:818620)
        at Object._.methods.forEach.n.API.<computed> [as post] (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:83:287757)
        at ImportModal._callee$ (https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:1905:53)
        at m (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:219330)
        at Generator._invoke (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:219083)
        at Generator.forEach.e.<computed> [as next] (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:39:219510)
        at step (https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:1728:191)
        at https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:1728:437
        at new Promise (<anonymous>)
        at ImportModal.<anonymous> (https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:1728:99)
        at ImportModal.validate (https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:1943:21)
        at onClick (https://reports.luckiihhr.com:5489/studio/assets/studio-extensions.client.6a5cad9dde67859271c1.js:2231:33)
        at Object.s (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:458)
        at f (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:601)
        at https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:747
        at v (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:833)
        at at (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:16338)
        at ot (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:16171)
        at st (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:55:16527)


  • Hmm, didn't see this error before. It looks like it's crashing when decompressing something.
    You mentioned it's a problem with 2 images? What does this mean? Could you elaborate?
    Are you behind a corporate proxy? Could you check the network in F12 tools and share which request is actually crashing? Thank you



  • Sorry for the miss understanding:
    There is only one image company logo being used, same image on both servers.
    Server one images work fine
    Server two images crash with the error.

    
    /home/ubuntu/.pm2/logs/server-error.log last 15 lines:
    0|server   | 2021-03-25T15:21:37.367Z - debug: fs store sync is triggering reloa                                              d, because /home/ubuntu/jsreportapp/data/els/shared/luckii_logo.png was changed                                               by other process
    0|server   | 2021-03-25T15:21:37.383Z - debug: Sending external-modification soc                                              ket to the studio
    0|server   | 2021-03-25T15:21:37.436Z - debug: OData query on templates
    0|server   | 2021-03-25T15:21:37.528Z - debug: Data item not defined for this te                                              mplate.
    0|server   | 2021-03-25T15:21:37.528Z - debug: Resources not defined for this te                                              mplate.
    0|server   | 2021-03-25T15:21:37.529Z - debug: Base url not specified, skipping                                               its injection.
    0|server   | 2021-03-25T15:21:37.531Z - error: Rendering request 37 finished wit                                              h error in 4 ms
    0|server   | 2021-03-25T15:21:37.531Z - error: Error when processing render requ                                              est 37 Asset ../shared/luckii_logo.png not found in the store and also not on th                                              e disk: Unable to find or read file /home/ubuntu/shared/luckii_logo.png. ENOENT:                                               no such file or directory, open '/home/ubuntu/shared/luckii_logo.png' Error: As                                              set ../shared/luckii_logo.png not found in the store and also not on the disk: U                                              nable to find or read file /home/ubuntu/shared/luckii_logo.png. ENOENT: no such                                               file or directory, open '/home/ubuntu/shared/luckii_logo.png'
    0|server   |     at readAsset (/home/ubuntu/jsreportapp/node_modules/jsreport-as                                              sets/lib/assets.js:232:15)
    0|server   | 2021-03-25T15:21:37.532Z - error: Error during processing request a                                              t https://reports.luckiihhr.com:5489/api/report/pdf_daily-account-balance
    0|server   | 2021-03-25T15:21:55.902Z - error: Error during processing request a                                              t https://reports.luckiihhr.com:5489/api/validate-import?fullImport=true&targetF                                              older=wyy9jS9, details: Error: end of central directory record signature not fou                                              nd
    0|server   |     at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:187:14
    0|server   |     at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:631:5
    0|server   |     at /home/ubuntu/jsreportapp/node_modules/fd-slicer/index.js:32:                                              7
    0|server   |     at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5)


  • 1|server  | 2021-03-26T14:41:45.309Z - error: Error during processing request at https://reports.luckiihhr.com:5489/api/validate-import?fullImport=false&targetFolder=wyy9jS9, details: Error: end of central directory record signature not found
    1|server  |     at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:187:14
    1|server  |     at /home/ubuntu/jsreportapp/node_modules/yauzl/index.js:631:5
    1|server  |     at /home/ubuntu/jsreportapp/node_modules/fd-slicer/index.js:32:7
    1|server  |     at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5)
    


  • I see two errors in the log.

    The first one...

     2021-03-25T15:21:37.531Z - error: Error when processing render requ                                              est 37 Asset ../shared/luckii_logo.png not found in the store and also not on th                                              e disk: Unable to find or read file /home/ubuntu/shared/luckii_logo.png. ENOENT
    

    Could you verify you have this asset stored?

    The second error

    2021-03-25T15:21:55.902Z - error: Error during processing request a                                              t https://reports.luckiihhr.com:5489/api/validate-import?fullImport=true
    

    This means you are uploading invalid zip file to the import.



  • If I upload an asset it worked. But when the import upload of the png file that is when it failed.



  • I am a bit lost. Please try to describe exactly what steps do you do to reproduce the error.
    You are trying to upload the jsreport export zip, using the studio, and it fails on one server and not on the other?
    I am afraid I don't have a hypothesis why this could happen. Maybe you have a proxy before jsreport that could modify the request?


Log in to reply
 

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