invalid signature: 0x80014
yinrong opened this issue · 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.
@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
I get a slightly different error: invalid signature: 0x4fcc0d08
+1
Error: invalid signature: 0x9fa2b68e
& Error: invalid signature: 0x4f44213c
If you're still having this issue, I've published unzip-stream which should solve it.
@mhr3 Thanks! This solved the issue for me
@mhr3 I'm getting Error: Invalid signature in zip file in your lib too. Any ideas?
@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.
How does one determine if it's a zip64?
For example mac's unzip
tool wouldn't work.
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?
Only if the archive (or any of the files within) is >=2GB.
I would bet that was it.
Also, what error exactly do you get from node-unzip
? (if you can get that)
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.
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.
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...