electron-windows-interactive-notifications icon indicating copy to clipboard operation
electron-windows-interactive-notifications copied to clipboard

Activator C++ code does not fire on clicking notification.

Open RandomEngy opened this issue 2 years ago • 0 comments

I've done the following things

  • Manually copied InteractiveNotifications.dll to resolve a runtime error
  • Fixed up calls to v8::String::Value compile error in notification_bindings.cc
  • Manually updated CLSID in two places in InteractiveNotifications.cpp to the correct value
  • Verified I have the correct CLSID by running lnk-parser on my Squirrel-generated shortcut.
  • Called registerComServer() and registerActivator() during startup.
  • Verified that a registry key is created under Computer\HKEY_CURRENT_USER\Software\Classes\CLSID\{d52b1d2e-f9cd-56b2-bd84-21a832557d71} - LocalServer32 has a default value of C:\Users\me\AppData\Local\MyApp\app-1.0.0\MyApp.exe
  • Send a notification via NodeRT ToastNotification, using the exact template from the readme, and sent after the registration. The notification shows just fine.
  • I've set up my app to accept protocol activations and enforce single-instance and validated that it's working by invoking from Start -> Run. (But I don't think it's making it that far)

But nothing happens when I hit the button. It hasn't worked in any other combination, like with a standalone button either. It doesn't seem to work at all when I specify activationType="foreground" so I've left it at activationType="background".

I dug into the code and can see that the Activate method in InteractiveNotifications.cpp is set up to handle the notification activation and launch the protocol URI with ShellExecuteW. I put some code at the top of the function to write a log message to a file, but the file is never written. So I don't think it's making it inside that method at all.

What else can I check here? Are there any debug logs for notification activations? Have I missed something?

RandomEngy avatar Dec 08 '22 23:12 RandomEngy