mikaelbr / node-notifier

A Node.js module for sending notifications on native Mac, Windows and Linux (or Growl as fallback)
MIT License
5.72k stars 323 forks source link

Timeout on macOS #434

Closed lucasriondel closed 1 year ago

lucasriondel commented 1 year ago

I'm trying to use node-notifier to display notifications on macOS but it fails everytime.

I've tried with a NotificationCenter, without, nothing work, it always timeouts.

Here's a few samples:

const NotificationCenter = require("node-notifier").NotificationCenter;
var notifier = new NotificationCenter({
  withFallback: false, // Use Growl Fallback if <= 10.8
  customPath: undefined, // Relative/Absolute path to binary if you want to use your own fork of terminal-notifier
});

notifier.notify(
  {
    title: "test",
    message: "test",
  },
  function (err, response, metadata) {
    console.log({ err, response, metadata });
    // Response is response from notification
    // Metadata contains activationType, activationAt, deliveredAt
  }
);

logs:

{
  err: null,
  response: 'timeout',
  metadata: {
    activationType: 'timeout',
    activationAt: '2023-05-22 12:36:43 +0200',
    deliveredAt: '2023-05-22 12:36:33 +0200'
  }
}
CleanShot 2023-05-22 at 12 37 24@2x

CleanShot 2023-05-22 at 12 38 23@2x

Any ideas ?

DominicGBauer commented 7 months ago

@lucasriondel how did you solve this?