Summary: | Notification does not show | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Snoretoast | Reporter: | Daniel <daniel> |
Component: | general | Assignee: | Hannah von Reth <vonreth> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | daniel |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Daniel
2019-06-24 11:32:20 UTC
Hm thx for the report. That debugview++ doesn't show anything makes me doubt that the correct SnoreToast.exe is executed. where.exe SnoreToast.exe returns the correct path? If the correct version is used, could you remove the all SnoreToast shortcuts from your start menu and try again? ``` C:\Program Files\SnoreToast\bin>where SnoreToast.exe C:\Program Files\SnoreToast\bin\SnoreToast.exe ``` Waiting until bug #409124 is resolved before further investigation. Ok. Bug #409124 is resolved, let's go! For some reason it did not work the first time, but worked the second time I executed `SnoreToast.exe -t Hello -m World`, here is the log: First: ``` "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl LinkHelper::installShortcut(const class std::filesystem::path &,const class std::filesystem::path &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) Installing shortcut: "C:\\Users\\dee\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\SnoreToast\\0.5.99\\SnoreToast.lnk" "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" Snore.DesktopToasts.0.5.99 {383803B6-AFDA-4220-BFC3-0DBF810106BF} "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl LinkHelper::installShortcut(const class std::filesystem::path &,const class std::filesystem::path &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) SOFTWARE\Classes\CLSID\{383803B6-AFDA-4220-BFC3-0DBF810106BF}\LocalServer32 "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl LinkHelper::installShortcut(const class std::filesystem::path &,const class std::filesystem::path &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) 943195062 "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 void __cdecl SnoreToasts::printXML(void) ------------------------ <toast launch="action=clicked;notificationId=5968;version=0.5.99;"><visual><binding template="ToastText02"><text id="1">Hello</text><text id="2">World</text></binding></visual><audio src="ms-winsoundevent:Notification.Default" silent="false"/></toast> ------------------------ "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 bool __cdecl Utils::checkResult(const char *,const long,const char *,const long &) C:\_\3878ba29\snoretoast\src\snoretoasts.cpp long __cdecl SnoreToasts::createToast(void) : Error: -2147023728 Element not found. "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl SnoreToasts::createToast(void) Failed to retreive NotificationSettings ensure your appId is registered ``` Second: ``` "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl LinkHelper::tryCreateShortcut(const class std::filesystem::path &,const class std::filesystem::path &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &) Path: "C:\\Users\\dee\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\SnoreToast\\0.5.99\\SnoreToast.lnk" already exists, skip creation of shortcut "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 void __cdecl SnoreToasts::printXML(void) ------------------------ <toast launch="action=clicked;notificationId=1308;version=0.5.99;"><visual><binding template="ToastText02"><text id="1">Hello</text><text id="2">World</text></binding></visual><audio src="ms-winsoundevent:Notification.Default" silent="false"/></toast> ------------------------ "C:\\Program Files\\SnoreToast\\bin\\SnoreToast.exe" v 0.5.99 long __cdecl ToastEventHandler::Invoke(struct ABI::Windows::UI::Notifications::IToastNotification *,struct ABI::Windows::UI::Notifications::IToastDismissedEventArgs *) The toast has timed out ``` In the first run it detected that there is no shortcut with an app id is installed, so it creates one. As there was no valid app id when the application was lunched windows prevents the display of the notification. In the second run everything works fine as the shortcut and app id are known. If you plan to use snoretoast with your own project, I'd recommend to install a shortct first, see the nsis script as an example, and pass the app id to snoretoast. Ok, I already though that this was the issue. I just expected the shortcut to be created before the notification was issued, but of course it makes sense to only run the shortcut logic when the notification fails. Will definitely use our own app id, thank you for the NSIS example. The shortcut is created before, but I guess there is some magic on the Windows side happening. Maybe a wait would help but as the internal id is mainly for dev purpose or simple shell scripts a missed notification is not a big deal. |