Skip to content
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

Notification platform is unavailable error #1772

Closed
1 task done
raindropsfromsky opened this issue Jan 9, 2023 · 19 comments · Fixed by #2047
Closed
1 task done

Notification platform is unavailable error #1772

raindropsfromsky opened this issue Jan 9, 2023 · 19 comments · Fixed by #2047
Assignees
Labels
bug Something isn't working

Comments

@raindropsfromsky
Copy link

Checks

  • I have checked that this issue has not already been reported.

Problem Description

Please open new issue in: https://github.com/Flow-Launcher/Flow.Launcher/issues/new

  1. upload log file: D:\Downloads\Flow-Launcher-Portable\FlowLauncher\app-1.11.0\UserData\Logs\1.11.0\2023-01-10.txt
  2. copy below exception message

Flow Launcher version: 1.11.0
OS Version: Microsoft Windows NT 10.0.22621.0
IntPtr Length: 8
x64: True

Python Path:
Node Path:
Date: 01/10/2023 01:21:05
Exception:
System.Runtime.InteropServices.COMException (0x803E0105): The notification platform is unavailable. (0x803E0105)
at WinRT.ExceptionHelpers.g__Throw|20_0(Int32 hr)
at ABI.Windows.UI.Notifications.IToastNotificationManagerStaticsMethods.CreateToastNotifier(IObjectReference _obj, String applicationId)
at Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier(String applicationId)
at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.CreateToastNotifier()
at Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder.Show(CustomizeToast customize)
at Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder.Show()
at Flow.Launcher.Notification.Show(String title, String subTitle, String iconPath) in C:\projects\flow-launcher\Flow.Launcher\Notification.cs:line 35
at Flow.Launcher.PublicAPIInstance.<>c__DisplayClass13_0.b__0() in C:\projects\flow-launcher\Flow.Launcher\PublicAPIInstance.cs:line 97
at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke(Action callback)
at Flow.Launcher.PublicAPIInstance.ShowMsg(String title, String subTitle, String iconPath, Boolean useMainWindowAsOwner) in C:\projects\flow-launcher\Flow.Launcher\PublicAPIInstance.cs:line 95
at Flow.Launcher.PublicAPIInstance.ShowMsg(String title, String subTitle, String iconPath) in C:\projects\flow-launcher\Flow.Launcher\PublicAPIInstance.cs:line 91
at Flow.Launcher.Plugin.Explorer.ContextMenu.<>c__DisplayClass13_0.b__4(ActionContext ) in C:\projects\flow-launcher\Plugins\Flow.Launcher.Plugin.Explorer\ContextMenu.cs:line 134
at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /
/Flow.Launcher.Plugin/Result.cs:line 219
at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 276
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

To Reproduce

  1. ...
  2. ...
  3. ...

Screenshots

No response

Flow Launcher Version

v1.11.0

Windows Build Number

10.0.22621 Build 22621

Error Log

Replace this line with the important log contents.
@raindropsfromsky raindropsfromsky added the bug Something isn't working label Jan 9, 2023
@raindropsfromsky
Copy link
Author

Here is the log file:
2023-01-10.txt

@raindropsfromsky
Copy link
Author

When the app crashed, I was just trying to change a few settings and trying it out. Nothing radical.

@z1nc0r3
Copy link
Member

z1nc0r3 commented Jan 11, 2023

Have you tried disabling the Explorer module?

@raindropsfromsky
Copy link
Author

Have you tried disabling the Explorer module?

If I turn off the Explorer plugin, FL stops showing results altogether!

@z1nc0r3
Copy link
Member

z1nc0r3 commented Jan 12, 2023

@raindropsfromsky Sorry, I'm confused about your issue. Can you please describe it a little bit? Can you start FL or not (crashing before starting)?

@VictoriousRaptor
Copy link
Contributor

Looks like something wrong with your clipboard. @taooceros Is it similar to the clipboard shortcut issue you've fixed before?

@raindropsfromsky
Copy link
Author

@raindropsfromsky Sorry, I'm confused about your issue. Can you please describe it a little bit? Can you start FL or not (crashing before starting)?

This happened only once, while I was tinkering with the plugins and settings.
FL simply disappeared and popped up this error.
I simply copied it and pasted it here.

It is not repeatable.

@taooceros
Copy link
Member

taooceros commented Jan 13, 2023

This error seems to relate to the notification module (and probably the windows version you are using). Could you check typing "reload plugin data" and see whether the error is reproducible?

@jjw24 jjw24 added the Waiting for response Waiting for poster to respond to Team message label Jan 13, 2023
@raindropsfromsky
Copy link
Author

raindropsfromsky commented Jan 17, 2023

Could you check typing "reload plugin data" and see whether the error is reproducible?

I tried this, and got a confirmation message. FL works fine after that.

That said, I must also mention that after I got that error message a few days ago, I have been using FL heavily, but never faced any crash. All these days I haven't reloaded the plugin data, and yet FL worked stable.

In other words, the crash seemed to be one-off.

@taooceros
Copy link
Member

Yeah it seems like the toast notification is not available in your computer, but flow didn't use that much so it's not gonna affect your daily usage. Could you share which windows version you are using?

@raindropsfromsky
Copy link
Author

I am using Windows 11 Home 64 bit

@jjw24 jjw24 removed the Waiting for response Waiting for poster to respond to Team message label Jan 19, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 6, 2023
@github-actions
Copy link

This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2023
@jjw24 jjw24 removed the Stale label Mar 19, 2023
@jjw24 jjw24 changed the title BUG: Flow popped up an error (see the text below) Notification platform is unavailable error Mar 19, 2023
@jjw24 jjw24 reopened this Mar 19, 2023
@jjw24
Copy link
Member

jjw24 commented Mar 19, 2023

I sometimes run into this error during startup in debug mode as well. @taooceros @VictoriousRaptor Have you also run into this error before?

@VictoriousRaptor
Copy link
Contributor

I sometimes run into this error during startup in debug mode as well. @taooceros @VictoriousRaptor Have you also run into this error before?

Sometimes in debug mode.

@C0nfusion1
Copy link

I experience this issue. I uninstalled and reinstalled Flow Launcher. It crashes as soon as I start the setup.

@jjw24 jjw24 mentioned this issue Mar 29, 2023
2 tasks
@jjw24 jjw24 self-assigned this Apr 10, 2023
@jjw24
Copy link
Member

jjw24 commented Apr 10, 2023

Taking a look at this issue, it appears to be from the Bump ModernWpfUI from 0.9.4 to 0.9.6 change.

This causes flow's notification to error out, and in turn causes the following critical issues when error happens on user machine:

  • Cannot install plugin because the install process uses notification, this also leaves behind just the zip file in the plugin folder
  • When starting up flow, no notification of any plugin that failed to load
  • Generally any other process that uses the notification will not be able to complete

Code location:

image

For me only reproducible via debug mode while running Visual Studio. Error does not appear if running a build from the repo's ci pipeline.

Reproduce in Visual Studio debug mode:
Trigger notification, this can be by pressing F5 on the search window or install a plugin.

Downgrading ModernWpfUI from 0.9.6 to 0.9.4, clean and rebuild then trigger notification, the error no longer is thrown.

Environment:
This error happens to me on Windows 10, and Windows 11 on Parallels Desktop, both only in Visual Studio debug mode.

@jjw24
Copy link
Member

jjw24 commented Apr 12, 2023

Additional investigation to above:

I can replicate the issue from v1.12.0 onwards.

Removing the Programs plugin will also stop the error from happening, which leads me to think it could be related to this microsoft/CsWinRT#623 (comment)

@jjw24
Copy link
Member

jjw24 commented Apr 13, 2023

Traced the error to this change made to the way we load plugin dlls #367, reverting to the commit before this change will also resolve the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants