extractAllToAsync isn't done unzipping when callback is triggered
See original GitHub issueI am using adm-zip
to extract a zip file that is 100 MB in size. I noticed that extractAllToAsync
isn’t done with extracting, although the callback is executed without an error.
zip.extractAllToAsync(dstProject, true, (error: Error) => {
if (error) {
reject(error);
} else {
resolve(); <--- breakpoint here and some files are not extracted yet.
}
});
Only extractAllTo
works as expected though. Any ideas, or am I onto a bug here? For clarification, this seems to be a severe timing issue as I can only reproduce this every x’th time
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
BUG: zip.extractAllToAsync callback not resolving · Issue #407
Hi there! Apparently the callback from the extractAllToAsync never resolves from v0.5.7. This breaks my flows where I await the result by ...
Read more >Wait for an async method to finish - node.js - Stack Overflow
The problem is, before the file gets unzipped asynchronously, the read function gets started and it fails with file not found error. please...
Read more >Using async/await in SwiftUI - Swift Evolution | Peter Friese
A simple way of dealing with this is to just wait until a call has finished and the data we requested has arrived....
Read more >Async Methods - Testing Library
Returning a falsy condition is not sufficient to trigger a retry, the callback must throw an error in order to retry the condition....
Read more >zip and unzip files using expressjs
You can also click on “Extract all” at the top menu. size]; //Read the compressed file zip_file *f = zip_fopen (z, name, 0);...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BrianBothwell Just to be sure you didn’t miss my workaround. Since you need to touch your CI anyway, either with a bump or fix, you can use
extractAllTo
instead ofextractAllToAsync
in the meantimeThis may be because the callback is not triggered, try this https://github.com/cthackers/adm-zip/issues/407#issuecomment-990086783