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

feat: Move to yauzl to fix FD error #264

Merged
merged 2 commits into from
Feb 27, 2020

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Feb 27, 2020

unzipper would throw an FD error occasionally.
Relevant issue: ZJONSSON/node-unzipper#104
There is a pending PR,
but it seemed simpler to simply move to yauzl.

The error:

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: EBADF: bad file descriptor, read
Emitted 'error' event at:
    at lazyFs.read (internal/fs/streams.js:165:12)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:467:17)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@seebees seebees requested a review from a team February 27, 2020 21:15
`unzipper` would throw an FD error occasionally.
Relevant issue: ZJONSSON/node-unzipper#104
There is a pending PR,
but it seemed simpler to simply move to `yauzl`.

The error:

```
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: EBADF: bad file descriptor, read
Emitted 'error' event at:
    at lazyFs.read (internal/fs/streams.js:165:12)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:467:17)
```
@seebees seebees force-pushed the fix-bad-file-descriptor branch from e009975 to 77af2a0 Compare February 27, 2020 21:20
Both node and browser should have a similar implementation.
This is simpler than dealing with the stream directly.
Copy link

@scottarc scottarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, these changes make sense.

@seebees seebees merged commit 1dd5a86 into aws:master Feb 27, 2020
@seebees seebees deleted the fix-bad-file-descriptor branch February 27, 2020 23:26
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

Successfully merging this pull request may close these issues.

2 participants