-
Notifications
You must be signed in to change notification settings - Fork 322
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
Hang on Disabled Windows Notifications #334
Comments
You can't catch any exception due to the right execution of node-notifier. Seems the developer have choosen to print an "error" message about disabled notifications system . Also, for sure, I'm right with you that is an useless info. |
I've done a little more investigation. It appears in this case snoretoast never writes to I have a local fix that passes back the server instance to |
Some more findings: The error output is generated in snoretoast but bypasses standard stdio constructs entirely. It doesn't even come through on |
I've entered a snoretoast bug as well. |
I have a PR that doesn't totally fix the issue (due to snoretoast's behavior) but at least resolves the hanging issue. I think it's important to fix with some kind of change at least temporarily to prevent a permanent hang in certain use cases. |
Expected Behavior
Disabling Windows 10 notifications should not hang
node-notifier
.Actual Behavior
Running
node-notifier
on Windows 10 clients with notifications results in a hang.Repro
The simplest repro is to disable Windows 10 notifications as shown below and run
npm run example
in the repo.I'm trying a scenario like:
I'd just simply like to catch exceptions and silently continue.
However, if notifications are disabled on Windows 10:
This example will hang forever on the command line:
I tried searching the docs and existing issues for a way to "detect" whether notifications are disabled, but I haven't found anything. I'd also like to suppress error output like this if possible. In any case, it doesn't seem like the call to
node-notifier
should hang like this.Tools
node-notifier: 7.0.1
node: 12.18.0
OS: Windows 10 Pro 1909
The text was updated successfully, but these errors were encountered: