question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yauzl throws uncatchable error

See original GitHub issue

yauzl throws this error that I seem to be unable to catch or prevent:

 events.js:183
       throw er; // Unhandled 'error' event
      ^
 Error: invalid characters in fileName: some name\, de something something 5.6.vcf
     at /app/node_modules/yauzl/index.js:417:70
     at /app/node_modules/yauzl/index.js:622:5
     at /app/node_modules/fd-slicer/index.js:32:7
     at FSReqWrap.wrapper [as oncomplete] (fs.js:658:17)

Am I doing something wrong? This started happening a few weeks ago, on very few files. Sanitizing file names doesnt seem to solve it.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
thejoshwolfecommented, Oct 5, 2018

Backslashes are now silently converted to forward slashes as of https://github.com/thejoshwolfe/yauzl/commit/6a9e652e3fee41938bb1fb436f363b3ffc7e0b0f published in yauzl 2.10.0.

1reaction
thejoshwolfecommented, Nov 15, 2017

It looks like you’re not listening for the error event on the zipfile object. See https://github.com/thejoshwolfe/yauzl/blob/master/README.md#how-to-avoid-crashing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js: An uncatchable error is thrown when the child ...
Registering an 'error' handler to the stdin stream seems to prevent the error from being thrown. Like this:
Read more >
yauzl - npm
Start using yauzl in your project by running `npm i yauzl`. ... openReadStream(entry, function(err, readStream) { if (err) throw err; ...
Read more >
Why asynchronous exceptions are uncatchable with callbacks
Throwing an error asynchronously means that an error is thrown in the JavaScript code of an asynchronously executed callback. Throwing exception asynchronously.
Read more >
Top 5 yauzl Code Examples - Snyk
Learn more about how to use yauzl, based on yauzl code examples created from ... zipFile) => { if (err) throw err zipFile.on('error',...
Read more >
Is "ECONNREFUSED, Connection refused" uncatchable?
Does this work? node.js:63 throw e; ^ Error: ECONNREFUSED, Connection refused at IOWatcher.callback (net:854: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found