node-unzip icon indicating copy to clipboard operation
node-unzip copied to clipboard

Error: invalid signature: 0x7d70fadf

Open imaffett opened this issue 11 years ago • 6 comments

I've got a script that downloads zips from github and unzips them into a temporary directory.

On machines with 4 gigs or less, it's crashing on any file over 2 megs.

https://github.com/gomobile/sample-counting-beads - that is a sample that I'm getting the zip from.

Below is the message I am seeing. The signature changes each time, but it happens on mac, linux, and windows. On my macbook pro with 8 gigs of ram, it works fine (I've pulled down 20 meg files).

Error: invalid signature: 0x7d70fadf
    at C:\my_project\node_modules\unzip\lib\parse.js:1:1127
    at process._tickCallback (node.js:351:13)

imaffett avatar Aug 29 '13 17:08 imaffett

I got this error, and it turned out to be a bad zip file. Worked once the zip file was valid.

tphalp avatar Aug 30 '13 21:08 tphalp

I got this error because there was a 'stored' (not 'deflated') entry in the zip file. That's perfectly valid, but node-unzip chokes on it.

cscott avatar Nov 19 '13 19:11 cscott

like @cscott - having the same problem with a "STORE" compression. It has successfully unextracted one folder but fails on the rest of the archive

0cv avatar Nov 23 '13 20:11 0cv

Getting the same issue here. Same zip, works on my Mac, not on a FreeBSD server.

nathggns avatar Dec 29 '13 17:12 nathggns

Getting such error some times on extracting file via ftp. Solution was to subscribe stream to 'error' event. Simplified to fs, like

function unzipFile(file, callback) {
    fs.createReadStream(file).pipe(unzip.Parse())
        .once('error', function () {
            unzipFile(file, callback)
         })
        .on('entry', function (entry) {
            var data = ''
            entry.on('data', function (chunk) {
                data += chunk
            }
            entry.on('end', function () {
                callback(null, data)
         }
    }

Should work, if you get this error not permanent, but from time to time

Alexsey avatar Jul 25 '14 11:07 Alexsey

FYI. in case anyone still need the solution: patches in http://github.com/glebdmitriew/node-unzip-2 just resolved the problem.

Oneway102 avatar Sep 09 '15 02:09 Oneway102