-
Notifications
You must be signed in to change notification settings - Fork 30
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
Stream finished in an invalid state, uncompression failed #14
Comments
Difficult to say without the zip file itself, might be a fixable bug, might be that the zip file was produced in a way that makes it impossible to process by streaming. From README:
|
Yep, that’s what I figured, since I’m actually reading it from a stream that’s coming from an Amazon S3 object :-).
Best to switch the approach, I guess, and copy the object from the S3 bucket to a local file, then process it.
- Kevin
… On Feb 4, 2018, at 5:05 PM, Michal Hruby ***@***.***> wrote:
Difficult to say without the zip file itself, might be a fixable bug, might be that the zip file was produced in a way that makes it impossible to process by streaming.
From README:
Please note that the zip file format isn't really meant to be processed by streaming, though this library should succeed in most cases, if you do have complete zip file available, you should consider using other libraries which read zip files from the end - as originally intended (for example yauzl or decompress-zip).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#14 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAOsDQ_Zxp_EhewMa3vohHXbsvNNoc2bks5tRinHgaJpZM4R4rK3>.
|
If you have control over the original zip file you can just try to compress it with a different program - for example the Mac archive utility should produce zips that can be always processed with a streaming unzip. |
Thanks — I’ll keep that in mind, but for this project I need to process several thousand ZIP files that already exist.
- Kevin
… On Feb 4, 2018, at 5:10 PM, Michal Hruby ***@***.***> wrote:
If you have control over the original zip file you can just try to compress it with a different program - for example the Mac archive utility should produce zips that can be always processed with a streaming unzip.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#14 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAOsDQWXvymimt7YpDjUb4WDADvXa5SFks5tRirLgaJpZM4R4rK3>.
|
Fair enough, if you have an example zip that can be shared, I can have a look if it's something fixable. |
Hi,
Erro thrown is as shown below: Error: Stream finished in an invalid state, uncompression failed |
I got same error. Before unzip, I print out the file size. The file size is correct. (node:25) UnhandledPromiseRejectionWarning: Error: Stream finished in an invalid state, uncompression failed |
Getting the same error occasionally:
For some context, I am piping a read stream into Incidentally, I get an equivalent error under the same circumstances with related |
I'm getting the error "Stream finished in an invalid state, uncompression failed" on some ZIP files. Do you know what might be the cause? When it happens, is there a proper way to shut down the stream so that it no longer produces entries?
The text was updated successfully, but these errors were encountered: