Odotocodot / Flow.Launcher.Plugin.OneNote

A OneNote plugin for Flow Launcher.
MIT License
14 stars 2 forks source link

Exception when using nb:\ then it just carried on working fine #21

Closed jasonjac2 closed 5 months ago

jasonjac2 commented 8 months ago

Not sure what happened. had alt+space, typed "o" - I think I use o as the onenote abbreviation, then nb:\ a list of notebooks came up. Not sure if I moved, clicked or just waited. Got the following exception.

Once exception from 11:00 today, I wasn't using the system then, so I think this may be on last reboot.

From Dialogue box: Flow Launcher version: 1.16.2 OS Version: 19045.4170 IntPtr Length: 8 x64: True

Python Path: Node Path: Date: 03/14/2024 15:23:06 Exception: OneNote Exception: Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote Author: Odotocodot Version: 2.0.1 Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042023 ---> System.Runtime.InteropServices.COMException (0x80042023): 0x80042023 at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema) at Odotocodot.OneNote.Linq.OneNoteParser.FindPages(IApplication oneNote, String search) at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search) at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query) at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token) at Flow.Launcher.Core.Plugin.PluginManager.<>cDisplayClass22_0.<b0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 194 --- End of stack trace from previous location --- at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 34 at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 193 --- End of inner exception stack trace --- at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 213 at Flow.Launcher.ViewModel.MainViewModel.<>cDisplayClass139_0.<gQueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 849 --- End of stack trace from previous location --- at Flow.Launcher.ViewModel.MainViewModel.QueryResults(Boolean isReQuery) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 850 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)

From Log file: 15:23:06.9056+00:00 - FATAL - UnHandledException -

Exception

System.Runtime.InteropServices.COMException: 0x80042023
   Source: Interop.Microsoft.Office.Interop.OneNote
   TargetAssembly: Interop.Microsoft.Office.Interop.OneNote, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null
   TargetModule: OneNote.dll
   TargetSite: Void FindPages(System.String, System.String, System.String ByRef, Boolean, Boolean, Microsoft.Office.Interop.OneNote.XMLSchema)
   at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema)
   at Odotocodot.OneNote.Linq.OneNoteParser.FindPages(IApplication oneNote, String search)
   at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search)
   at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query)
   at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token)
   at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<<QueryForPluginAsync>b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 194
--- End of stack trace from previous location ---
   at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 34
   at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 193

Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042023
   Source: Flow.Launcher.Core
   TargetAssembly: Flow.Launcher.Core, Version=1.16.2.0, Culture=neutral, PublicKeyToken=null
   TargetModule: Flow.Launcher.Core.dll
   TargetSite: Void MoveNext()
   at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 213
   at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass139_0.<<QueryResults>g__QueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 849
--- End of stack trace from previous location ---
   at Flow.Launcher.ViewModel.MainViewModel.QueryResults(Boolean isReQuery) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 850
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>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)
Odotocodot commented 6 months ago

This is an issue with getting the COM object. Sometimes it can just fail :(. Has it happened again?