Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid signature: 0x8080014 when piping from HTTP #73

Open
Cyberuben opened this issue Feb 13, 2015 · 11 comments
Open

Invalid signature: 0x8080014 when piping from HTTP #73

Cyberuben opened this issue Feb 13, 2015 · 11 comments

Comments

@Cyberuben
Copy link

I am getting the following error when running node-unzip in combination with a http.get request, then piping it into node-unzip.

The code I use:

var extractor = unzip.Extract({path: tempPath});
extractor.on("close", function() {
    log.debug("Done downloading "+file);
    callback(null, file);
});
extractor.on("error", function (err) {
    log.error(err);
    callback(err, null);
});

http.get(url, function (res) {
    res.pipe(extractor);
});

tempPath is defined properly, and the said code works fine on Windows. Now, on my CentOS server, it outputs the error like this: invalid signature: 0x8080014

I'm 100% sure the XML file is valid, the exact file works on Windows.

@nmehta6
Copy link

nmehta6 commented Feb 17, 2015

+1

@pbochynski
Copy link

Have the same issue on Mac. Strange thing is that if I write http response to the zip file on disk and then process it from file it works.

stream.js:94
  throw er; // Unhandled stream error in pipe.
        ^
 Error: invalid signature: 0x8080014

@Cyberuben
Copy link
Author

Same here @pbochynski

@izqui
Copy link

izqui commented Mar 28, 2015

+1 :(

@dvalentiate
Copy link

Bad news: This repo appears to be abandoned.
Good news: https://www.npmjs.com/package/unzip2 patches this problem and streaming of uncompressed zip content.

It comes down to the lines in lib/parse.js:161

setImmediate(function() {
  self._pullStream.unpipe();
  self._pullStream.prepend(extra);
  self._processDataDescriptor(entry);
});

should be

self._pullStream.unpipe();
self._pullStream.prepend(extra);
setImmediate(function() {
  self._processDataDescriptor(entry);
});

@woodedlawn
Copy link

Thank you @dvalentiate

@snowdream
Copy link

Same here @pbochynski

@joswhite
Copy link

Thanks you as well!! unzip2 fixed a similar problem I had in unzipping folders made with the archiver module.

@roboshoes
Copy link

Thank you @dvalentiate for the tip. Swichting to unzip2 fixed it for me: 👬

@tlianglstyle
Copy link

Thank you @dvalentiate for the tip. Swichting to unzip2 fixed it for me: 👬

theobat added a commit to betondirect/node-odt that referenced this issue Jul 9, 2017
EvanOxfeld/node-unzip#73
2017-07-09T20:19:31.408545+00:00 app[web.1]: 1499631571408 - Origin: Worker (PID 35)
2017-07-09T20:19:31.408547+00:00 app[web.1]:    [Error] Error: invalid signature: 0x8080014
2017-07-09T20:19:31.408548+00:00 app[web.1]:     at /app/node_modules/unzip/lib/parse.js:63:13
2017-07-09T20:19:31.408549+00:00 app[web.1]:     at runCallback (timers.js:800:20)
2017-07-09T20:19:31.408550+00:00 app[web.1]:     at tryOnImmediate (timers.js:762:5)
2017-07-09T20:19:31.408554+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:733:5)
@marcusflat
Copy link

Thanks !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests