Closed Portur closed 9 months ago
More digging, it seems the file is actually opened and is uncaught
.
The problem is there are no events created for error
zipfile.on("close", function() {
console.log("closed yauzl read");
});
zipfile.on("error", function(e) {
console.log("error yauzl read");
})
With those created I catch the error successfully. Could I recommend that in a case where the user forgets to add those listeners, could you perhaps throw
rather than shutdown
there is a section of the docs that explains how to avoid crashing the process.
Hi,
When unzipping a file (~40kb) I get a signature error (
Uncaught Error: invalid central directory file header signature: 0xbfef2b1c
) and the process immediately stops and ends nodejs.I noticed the error emitted in emitErrorAndAutoClose
Below is how I use it. You'll notice the
try/catch
is ignored (?)Here is the stack
Not sure f it makes a difference but this specific file has made it rounds through various email clients. Also this is a
kmz
, which is a zippedkml
which is sugar for zippedxml
.Here it is https://storage.googleapis.com/coverage-hosting-public/Clear%20Access%20FTTH%20August%202020.kmz