afrog icon indicating copy to clipboard operation
afrog copied to clipboard

Atom should handle corrupted cache situations better "npm ERR! zlib: unexpected end of file"

Open taw00 opened this issue 4 years ago • 5 comments

Hello, good Atom people,

I don't know if this is a bug or a feature request. Or neither.

Some of us ran into this problem where a package would simply not update: https://github.com/braver/fonts/issues/97

Now, it seems like it turned out to be some corrupted cache. Why it became corrupted, I have no idea, but this notification in the debug file hints at something that can be detected by atom's package installer and handled with more care:

Installing “[email protected]” failed.
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file

I'm guessing, but Atom could do a number of things perhaps:

  1. nuke the cache and try again (but you have to be confident that is the right decision).
  2. nuke the cache specific to the failed install and try again.
  3. improve the debug log messaging
  4. pop up a handy little message stating that the package didn't install and maybe, just maybe this will fix you:
    npm cache clean --force
    npm cache verify
    

Or something along those lines. Or maybe add this to the debugging FAQ?

The long and short of it is that I suspect this can be handled better than a cryptic message in a debug file. Those are some suggestions. I don't know the code, but this bug was rather annoying. :)

Keep up the good work! -t

taw00 avatar May 22 '20 21:05 taw00

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of Atom
  2. Comment that the issue is still reproducible and include:
    • What version of Atom you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

Issues that are labeled as triaged will not be automatically marked as stale.

stale[bot] avatar Jun 26 '21 03:06 stale[bot]

this should probably still be open

icecream17 avatar Jun 26 '21 15:06 icecream17

This issue not only should be open, it's still ruining some updates that should be automatic. Npm or apm, given enough time something is bound to be corrupted on download and then Atom refuses to update or install the offending packages, forcing manual intervention from the user. A neater way of handling it could be useful.

stringdom avatar Mar 26 '22 18:03 stringdom

Two years and no commentary by Atom folks except the stale-bot and folks burnt by this? Come on Atom people. :)

taw00 avatar Aug 25 '22 17:08 taw00

Unfortunately, nowadays any contributions are voluntary and not by the Microsoft team so there's not much work on Atom

icecream17 avatar Aug 25 '22 17:08 icecream17