Lỗi end central directory record signature not found năm 2024

Rarely, you may attempt to unzip a zip archive and come across an error that states “End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.” This tutorial will attempt to resolve the zip file “End of central directory signature not found” errors when attempting to decompress an archive.

To backup a bit, the reason you typically see the “End-of-central-directory signature not found” error when working with a zip file is because the file is either corrupt, the file download is incomplete, or it’s a multi-part archive file and the other components are not found, or the zip file is not actually a zip archive file. The most probable reason for most users to encounter this error when trying to unzip a zip archive though is that the zip file download is either incomplete, or the zip archive is corrupt.

7 Troubleshooting Fixes for Zip Error “End-of-central-directory signature not found”

The various solutions to resolve this zip error are usually one of the following, you can try any of them and see which works:

  • Re-download the zip archive from the source – simply redownloading the zip archive is most likely to fix the problem if the download was interrupted or corrupted somehow
  • Try to download the zip archive again from a mirror (if possible)
  • Use a different download method for the zip file in question. For example, using a different web browser, or using curl to download the file
  • Try a different unzip program to extract the target zip archive, for example ‘unzip’ at the command line, The Unarchiver for Mac, jar, 7z, rar, gunzip, etc
  • Attempt to repair the zip archive at the command line with the following syntax, replacing file names as needed:

zip -FF ProblemZip.zip --out RepairedZip.zip | unzip

  • If the archive file is multiple parts, make sure all of the zip files are contained within the same directory
  • Verify the origin zip file with sha1 or md5 if possible, this can tell you if the file has been corrupted or modified somehow compared to what you intended to download

This problem can surface in many situations when working with zip files. Usually the easiest way to resolve it is to simply re-download the file if it was corrupted, or if the file was incomplete. Nonetheless sometimes you have to repair the file, or use a different zip app.

I recently encountered this issue repeatedly when trying to configure Signal messenger on a Mac but ultimately was able to resolve it by downloading Signal with curl instead of an (admittedly outdated) web browser, a bit curious, but resolved either way. Using a different download method also often works to fix CPGZ zip file unzip loops, and usually suggests the file was being corrupted for some reason or another.

If you have any other tips, tricks, or suggestions about resolving the “End-of-central-directory signature not found” zip error, share them in the comments below!

This topic has been deleted. Only users with topic management privileges can see it.

  • 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. (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. [as post] (https://reports.luckiihhr.com:5489/studio/assets/client.721def965dc7b7e2a98c.js:1:818620)  
    at Object..methods.forEach.n.API. [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. [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 ()  
    at ImportModal. (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?