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

invalid signature: 0x80014

Open yinrong opened this issue 8 years ago • 17 comments

Error: invalid signature: 0x80014 at /Users/yinrong/dev/olap/fetcher/node_modules/unzip/lib/parse.js:59:13 at processImmediate as _immediateCallback

It's just an ordinary zip file and node-unzip can't unzip.

yinrong avatar Nov 20 '15 01:11 yinrong

@EvanOxfeld would you deprecate this project?

For those who encounter the same problem, here are some alternatives I found:

upzip file on disk: https://github.com/hokein/node-minizip

unzip and ignore error: https://github.com/alunny/zstream

yinrong avatar Nov 20 '15 06:11 yinrong

I get a slightly different error: invalid signature: 0x4fcc0d08

Nepoxx avatar Dec 02 '15 20:12 Nepoxx

+1

developeron29 avatar Feb 13 '16 10:02 developeron29

Error: invalid signature: 0x9fa2b68e & Error: invalid signature: 0x4f44213c

will-holley avatar May 05 '16 20:05 will-holley

If you're still having this issue, I've published unzip-stream which should solve it.

mhr3 avatar Feb 27 '17 01:02 mhr3

@mhr3 Thanks! This solved the issue for me

felipeochoa avatar Mar 13 '17 17:03 felipeochoa

@mhr3 I'm getting Error: Invalid signature in zip file in your lib too. Any ideas?

hiddenkirby avatar May 07 '17 00:05 hiddenkirby

@hiddenkirby Is it a zip64? Those are not supported. Otherwise should open a bug there - https://github.com/mhr3/unzip-stream/issues - ideally with the zip attached.

mhr3 avatar May 07 '17 22:05 mhr3

How does one determine if it's a zip64?

hiddenkirby avatar May 07 '17 22:05 hiddenkirby

For example mac's unzip tool wouldn't work.

mhr3 avatar May 07 '17 23:05 mhr3

Hrm. i was able to unzip on the mac. I will say i was able to use https://github.com/cthackers/adm-zip .. if that helps. I'm sorry i cannot provide the zip, but i wonder if size of the zip file matters?

hiddenkirby avatar May 07 '17 23:05 hiddenkirby

Only if the archive (or any of the files within) is >=2GB.

mhr3 avatar May 07 '17 23:05 mhr3

I would bet that was it.

hiddenkirby avatar May 07 '17 23:05 hiddenkirby

Also, what error exactly do you get from node-unzip? (if you can get that)

mhr3 avatar May 07 '17 23:05 mhr3

I have the same issue. I tried unzip-stream to see if it resolved my issue but no luck.

If it can help, here are the values I get when I put a breakpoint here https://github.com/mhr3/unzip-stream/blob/master/lib/unzip-stream.js#L84 chunk.readUInt32LE(0): 1329865020 LOCAL_FILE_HEADER_SIG: 67324752 CENTRAL_DIRECTORY_SIG: 33639248 CENTRAL_DIRECTORY_END_SIG: 101010256

Here, the chunk value should be equal to LOCAL_FILE_HEADER_SIG but it is not, so it default to 'Invalid signature' error.

The file works on mac with unzip and zip -T says everything is ok. File size is 14274730.

Discolure: I don't anything about zip file binary format.

maximeloizeau avatar Jun 08 '17 14:06 maximeloizeau

1329865020 in hexadecimal is 0x4f44213c, which is ASCII for <!DO. Meaning you're passing plain text (looks like start of html/xml markup) to unzip.

mhr3 avatar Jun 08 '17 15:06 mhr3

Oh no. Thanks for the noticing this. The webpage I am downloading the script from is blocking the download if it's not a browser apparently...

maximeloizeau avatar Jun 08 '17 16:06 maximeloizeau