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.

extractAllToAsync isn't done unzipping when callback is triggered

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

2reactions
sebastianrathcommented, Sep 23, 2021

@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 of extractAllToAsync in the meantime

0reactions
KirrsGoolcommented, Dec 9, 2021

although the callback is executed without an error

This may be because the callback is not triggered, try this https://github.com/cthackers/adm-zip/issues/407#issuecomment-990086783

Read more comments on GitHub >

github_iconTop 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 >

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