gulp-notify icon indicating copy to clipboard operation
gulp-notify copied to clipboard

toaster missing in action in error handler, works fine otherwise

Open MarByteBeep opened this issue 5 years ago • 2 comments

Hi there,

When executing the following:

[...]
return src("test.js")
	.pipe(notify("Hi"))
	.pipe(uglify())
	.pipe(dest("test.min.js"))

I get a nice notification popup. But as soon as I move that notify("Hi") to an error handler, no notification pops up when generating an error:

[...]
return src("test.js")
	.pipe(uglify())
	.on('error', function (err) {
		console.log(err.toString());
		notify("Hi");
		this.emit('end');
	})	
	.pipe(dest("test.min.js"))

The console properly displays the error, but the toaster is remaining silent. When using notify.onError like this:

[...]
return src("test.js")
	.pipe(uglify())
        .on("error", notify.onError("Error: <%= error.message %>"))			
	.pipe(dest("test.min.js"))
```	

I do get output in my console:

`gulp-notify: [Error running Gulp] Error: unable to minify JavaScript`

but again, no toaster...


I am using Windows 10 and SnoreToast is displaying all notifications.

Any clue on what I'm doing wrong here?

Cheers,

M

	

MarByteBeep avatar Mar 20 '20 10:03 MarByteBeep

ADD: When rebooting, suddenly the error notifications do appear in my notification center. But all new ones are missing. Until the next reboot.

Sounds like a windows issue? But the weird thing is that all normal notifications so show up immediately. Just not the ones that are spawned inside the on('error') callback.

MarByteBeep avatar Mar 20 '20 11:03 MarByteBeep

@MarByteBeep same here. At least for me, it helped to replace the snoretoast.exe with newer version (https://download.kde.org/stable/snoretoast/)

jarred-cz avatar Jul 31 '20 17:07 jarred-cz