Skip to content
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

favicons seem to never call back in some cases #318

Open
wighawag opened this issue Aug 26, 2020 · 15 comments
Open

favicons seem to never call back in some cases #318

wighawag opened this issue Aug 26, 2020 · 15 comments

Comments

@wighawag
Copy link

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 ?

@alexander-akait
Copy link
Member

Because it is async, we don't support it

@wighawag
Copy link
Author

What do you mean ?

@alexander-akait
Copy link
Member

callback is async and we don't use await callback() in code

@wighawag
Copy link
Author

oh i see, but that is not the issue. what I mean is that the callback never get called (removing async here will not change that)

@alexander-akait
Copy link
Member

@wighawag please create reproducible test repo

@wighawag
Copy link
Author

In this repo https://github.com/wighawag/purple-warlock
the script web/_build/generate.ts call favicon and sometime favicon never call the callback.
I work around this by adding a timeout and try again.

@jdmerinor
Copy link

jdmerinor commented Jan 11, 2021

I'm actually having the same issue and my callback is completely sync (saying that looking at the code that wouldn't really make a difference). I think it was not happening on V5.4.1

@jdmerinor
Copy link

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

@jdmerinor
Copy link

@alexander-akait On the repo mentioned above I added also the logs that I got when it failed and thew handles taken, I'm adding those here for reference, this was basically my output:

[Favicons] General:source: Source type is string...
[Favicons] General:source: Source type is object...
[Favicons] Image:create: Creating empty 16x16 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 16x16 with offset 0...
[Favicons] Image:render: Rendering SVG to 16x16...
[Favicons] Image:create: Creating empty 32x32 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 32x32 with offset 0...
[Favicons] Image:render: Rendering SVG to 32x32...
[Favicons] Image:create: Creating empty 48x48 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 48x48 with offset 0...
[Favicons] Image:render: Rendering SVG to 48x48...
[Favicons] Image:create: Creating empty 16x16 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 16x16 with offset 0...
[Favicons] Image:render: Rendering SVG to 16x16...
[Favicons] Image:create: Creating empty 24x24 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 24x24 with offset 0...
[Favicons] Image:render: Rendering SVG to 24x24...
[Favicons] Image:create: Creating empty 32x32 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 32x32 with offset 0...
[Favicons] Image:render: Rendering SVG to 32x32...
[Favicons] Image:create: Creating empty 48x48 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 48x48 with offset 0...
[Favicons] Image:render: Rendering SVG to 48x48...
[Favicons] Image:create: Creating empty 64x64 canvas with transparent background...
[Favicons] Image:render: Find nearest icon to 64x64 with offset 0...
[Favicons] Image:render: Rendering SVG to 64x64...
[Favicons] Images:composite: Compositing favicon on 16x16 canvas with offset 0...
[Favicons] Images:composite: Compositing favicon on 24x24 canvas with offset 0...
[Favicons] Images:composite: Compositing favicon on 32x32 canvas with offset 0...
[Favicons] Images:composite: Compositing favicon on 48x48 canvas with offset 0...
[Favicons] Images:composite: Compositing favicon on 64x64 canvas with offset 0...
There are 35 handle(s) keeping the process running

# TTYWRAP
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\colors\lib\system\supports-colors.js:149 - stdout: getSupportLevel(process.stdout),

# SIGNALWRAP
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\colors\lib\system\supports-colors.js:149 - stdout: getSupportLevel(process.stdout),

# TTYWRAP
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\colors\lib\system\supports-colors.js:150 - stderr: getSupportLevel(process.stderr),

# Timeout
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\testFavicons\index.js:25 - const timeoutVar = setTimeout(function () {

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# generic
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:884 - sharp.pipeline(this.options, (err, data, info) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:883 - return new Promise((resolve, reject) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:118 - return this._pipeline(is.fn(options) ? options : callback);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\dist\helpers.js:265                  - }).toBuffer()).then(Jimp.read);

# generic
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:884 - sharp.pipeline(this.options, (err, data, info) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:883 - return new Promise((resolve, reject) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:118 - return this._pipeline(is.fn(options) ? options : callback);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\dist\helpers.js:265                  - }).toBuffer()).then(Jimp.read);

# generic
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:884 - sharp.pipeline(this.options, (err, data, info) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:883 - return new Promise((resolve, reject) => {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\sharp\lib\output.js:118 - return this._pipeline(is.fn(options) ? options : callback);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\dist\helpers.js:265                  - }).toBuffer()).then(Jimp.read);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52                    - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14              - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40                       - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:40                - var png = new _pngjs.PNG({
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-sync.js:36               - var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:15                  - return pack(png, options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:45                - return _pngjs.PNG.sync.write(png, {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\promisify.js:21     - fun.bind(ctx).apply(void 0, args);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52                    - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14              - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40                       - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:40                - var png = new _pngjs.PNG({
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-sync.js:36               - var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:15                  - return pack(png, options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:45                - return _pngjs.PNG.sync.write(png, {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\promisify.js:21     - fun.bind(ctx).apply(void 0, args);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52                    - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14              - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40                       - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:40                - var png = new _pngjs.PNG({
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-sync.js:36               - var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:15                  - return pack(png, options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:45                - return _pngjs.PNG.sync.write(png, {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\promisify.js:21     - fun.bind(ctx).apply(void 0, args);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52                    - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14              - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40                       - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:40                - var png = new _pngjs.PNG({
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-sync.js:36               - var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:15                  - return pack(png, options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:45                - return _pngjs.PNG.sync.write(png, {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\promisify.js:21     - fun.bind(ctx).apply(void 0, args);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:18              - zlib.Inflate.call(this, opts);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\sync-inflate.js:155             - return zlibBufferSync(new Inflate(opts), buffer);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-sync.js:85               - inflatedData = inflateSync(inflateData, { chunkSize: imageSize, maxLength: imageSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:10                  - return parse(buffer, options || {});
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:196 - this.bitmap = this.constructor.decoders[_mime](data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\index.js:431              - _imageBitmap.parseBitmap.call(this, data, null, finish);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52                    - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14              - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40                       - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:40                - var png = new _pngjs.PNG({
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-sync.js:36               - var compressedData = zlib.deflateSync(filteredData, packer.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png-sync.js:15                  - return pack(png, options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\png\dist\index.js:45                - return _pngjs.PNG.sync.write(png, {
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\image-bitmap.js:251 - var buffer = this.constructor.encoders[mime](this);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\@jimp\core\dist\utils\promisify.js:21     - fun.bind(ctx).apply(void 0, args);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52       - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14 - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40          - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\parse-png\index.js:10        - let png = new PNG(opts);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-async.js:72 - this._inflate = zlib.createInflate({ chunkSize: chunkSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser.js:273      - this.inflateData(data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:133 - read.func.call(this, smallerBuf.slice(0, read.length));
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:187 - this._processReadAllowingLess(read);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:61  - this._process();

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52       - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14 - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40          - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\parse-png\index.js:10        - let png = new PNG(opts);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-async.js:72 - this._inflate = zlib.createInflate({ chunkSize: chunkSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser.js:273      - this.inflateData(data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:133 - read.func.call(this, smallerBuf.slice(0, read.length));
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:187 - this._processReadAllowingLess(read);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:61  - this._process();

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52       - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14 - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40          - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\parse-png\index.js:10        - let png = new PNG(opts);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-async.js:72 - this._inflate = zlib.createInflate({ chunkSize: chunkSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser.js:273      - this.inflateData(data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:133 - read.func.call(this, smallerBuf.slice(0, read.length));
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:187 - this._processReadAllowingLess(read);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:61  - this._process();

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52       - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14 - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40          - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\parse-png\index.js:10        - let png = new PNG(opts);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-async.js:72 - this._inflate = zlib.createInflate({ chunkSize: chunkSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser.js:273      - this.inflateData(data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:133 - read.func.call(this, smallerBuf.slice(0, read.length));
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:187 - this._processReadAllowingLess(read);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:61  - this._process();

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer.js:52       - return this._options.deflateFactory(this.getDeflateOptions());
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\packer-async.js:14 - this._deflate = this._packer.createDeflate();
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\png.js:40          - this._packer = new Packer(options);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\parse-png\index.js:10        - let png = new PNG(opts);

# ZLIB
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser-async.js:72 - this._inflate = zlib.createInflate({ chunkSize: chunkSize });
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\parser.js:273      - this.inflateData(data);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:133 - read.func.call(this, smallerBuf.slice(0, read.length));
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:187 - this._processReadAllowingLess(read);
D:\Personal stuff\Desktop\TestRigs\TestVue\test-favicons\favicons\node_modules\pngjs\lib\chunkstream.js:61  - this._process();

@zhnoah
Copy link

zhnoah commented Mar 16, 2021

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

@jdmerinor
Copy link

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 :(

@peksipatongeis
Copy link

Same thing happens to me. Randomly stalls to the same [Favicons] Images:composite: Compositing favicon on 64x64 canvas with offset 0... line.

Windows 11 and Node v16.14.2

@andy128k
Copy link
Collaborator

@peksipatongeis may you try to reproduce the issue with favicons 7.0.0-beta.4?

@peksipatongeis
Copy link

peksipatongeis commented Apr 19, 2022

@peksipatongeis may you try to reproduce the issue with favicons 7.0.0-beta.4?

Tested with [email protected] and it gets similarly stuck as it did with v6.

There are 5 handle(s) keeping the process running

# Timeout
C:\code\testFavicons\index.js:34 - const timeoutVar = setTimeout(function () {

# FILEHANDLE
(unknown stack trace)

# generic
C:\code\testFavicons\node_modules\sharp\lib\output.js:1184    - sharp.pipeline(this.options, (err, data, info) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:1183    - return new Promise((resolve, reject) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:143     - return this._pipeline(is.fn(options) ? options : callback);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:252 - }).toBuffer();
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:282 - const image = await this.resize(source, width, height, options.pixelArt);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:294 - const images = await Promise.all(properties.map((props) => this.createPlaneFavicon(sourceset, props, `${props.width}x${props.height}.rawdata`, true)));

# generic
C:\code\testFavicons\node_modules\sharp\lib\output.js:1184    - sharp.pipeline(this.options, (err, data, info) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:1183    - return new Promise((resolve, reject) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:143     - return this._pipeline(is.fn(options) ? options : callback);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:252 - }).toBuffer();
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:282 - const image = await this.resize(source, width, height, options.pixelArt);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:294 - const images = await Promise.all(properties.map((props) => this.createPlaneFavicon(sourceset, props, `${props.width}x${props.height}.rawdata`, true)));

# generic
C:\code\testFavicons\node_modules\sharp\lib\output.js:1184    - sharp.pipeline(this.options, (err, data, info) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:1183    - return new Promise((resolve, reject) => {
C:\code\testFavicons\node_modules\sharp\lib\output.js:143     - return this._pipeline(is.fn(options) ? options : callback);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:252 - }).toBuffer();
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:282 - const image = await this.resize(source, width, height, options.pixelArt);
C:\code\testFavicons\node_modules\favicons\dist\index.cjs:294 - const images = await Promise.all(properties.map((props) => this.createPlaneFavicon(sourceset, props, `${props.width}x${props.height}.rawdata`, true)));

Edit. I wonder if this issue is similar to what we have in here?

@andy128k
Copy link
Collaborator

andy128k commented May 2, 2022

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.

andy128k added a commit that referenced this issue May 3, 2022
andy128k added a commit that referenced this issue May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants