EvanOxfeld / node-unzip

node.js cross-platform unzip using streams
MIT License
613 stars 343 forks source link

invalid signature: 0x80014 #89

Open yinrong opened 8 years ago

yinrong commented 8 years ago

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 commented 8 years ago

@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

Nepoxx commented 8 years ago

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

developeron29 commented 8 years ago

+1

will-holley commented 8 years ago

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

mhr3 commented 7 years ago

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

felipeochoa commented 7 years ago

@mhr3 Thanks! This solved the issue for me

hiddenkirby commented 7 years ago

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

mhr3 commented 7 years ago

@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.

hiddenkirby commented 7 years ago

How does one determine if it's a zip64?

mhr3 commented 7 years ago

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

hiddenkirby commented 7 years ago

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?

mhr3 commented 7 years ago

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

hiddenkirby commented 7 years ago

I would bet that was it.

mhr3 commented 7 years ago

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

maximeloizeau commented 7 years ago

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.

mhr3 commented 7 years ago

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.

maximeloizeau commented 7 years ago

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...