favicons: favicons seem to never call back in some cases

I have the following code

favicons(icon, config, async (error, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log(response);
  }
});

and sometime, the callback never get called. I have to stop the process any idea ?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I think this is why the program hangs when I use favicons-webpack-plugin.

I created this super simple example and I explained how to make it fail. I also added the module “why-is-node-running” to it and like that it’s possible to see the handles that are holding the process https://github.com/jdmerinor/testFavicons

I was not able to reproduce this on Linux, but somehow this happens from time to time on Windows virtual machine. I am afraid, this is some sort of low-level concurrency issue with Sharp and specific to Windows.

Is there an update on this? With the new version of Node JS it gets stuck even worse… now not even with a retry it will be able to come back to life 😦