Skip to content

onenote: failed to respond! #24

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
AMDehghani opened this issue Jul 25, 2024 · 24 comments
Closed

onenote: failed to respond! #24

AMDehghani opened this issue Jul 25, 2024 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@AMDehghani
Copy link

2024-07-26.txt

Flow Launcher version: 1.18.0
OS Version: 22621.3880
IntPtr Length: 8
x64: True

Python Path: C:\Users\AMD\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path:
Date: 07/26/2024 02:45:35
Exception:
OneNote Exception:
Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote
Author: Odotocodot
Version: 2.1.0
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019
---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019
at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema)
at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search)
at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query)
at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query)
at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token)
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass23_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 196
--- 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 195
--- End of inner exception stack trace ---
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass23_1.b__1(ActionContext ) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 224
at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /
/Flow.Launcher.Plugin/Result.cs:line 246
at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 307
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)

@Odotocodot
Copy link
Owner

Hi, was this when you searched or when you selected a result?

@AMDehghani
Copy link
Author

hi,
image
image
thanks for your attention.

@Odotocodot
Copy link
Owner

hi,
image
image
thanks for your attention.

How often does this happen? Is it constant?

@AMDehghani
Copy link
Author

yes all the time

@Odotocodot
Copy link
Owner

That is very strange!
The issue stems from retriving the OneNote COM object which can fail sometimes especially if many calls have happened. But for constant crashes!? as well as the fact I cant replicate the issue.

Im assuming it was working at some point, what changed when the crashes started?

@AMDehghani
Copy link
Author

I don't think It was working at first, maybe some odd OS conflict.
thank you by the way .

@Odotocodot
Copy link
Owner

Hmm I see, if you don't mind what OS are you on and what version of OneNote are you using?

@meskallito
Copy link

I've seen the same error on the machine without One Note installed. FYI.

@Odotocodot
Copy link
Owner

Ah, that would explain the COM Exception. That might be the fix, @AMDehghani this plugin is local only, you need an installation of OneNote. I should add that to the readme if I haven't already.

@jeregon1
Copy link

it happens to me too, could it be Flow Launcher 1.19?

@Odotocodot
Copy link
Owner

Perhaps, alas Flow Launcher 1.19 hasnt caused me any issues.
@jeregon1 what installation of OneNote do you have? Also could you try installing Flow Launcher 1.18 and see if the problem persists?

@jeregon1
Copy link

Sure, the version is 2408 (Build 17928.20156) and using Flow Launcher 1.18 still causes the issue, this is the log:

2024-09-28.txt

Please open new issue in: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote/issues 1. upload log file: C:\Users\jesus\Downloads\FlowLauncher\app-1.18.0\UserData\Logs\1.18.0\2024-09-28.txt 2. copy below exception message Flow Launcher version: 1.18.0 OS Version: 22631.4169

IntPtr Length: 8
x64: True

Python Path:
Node Path:
Date: 09/28/2024 10:30:34
Exception:
OneNote Exception:
Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote
Author: Odotocodot
Version: 2.1.0
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019
---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019
at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema)
at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search)
at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query)
at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query)
at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token)
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass23_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 196
--- 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 195
--- End of inner exception stack trace ---
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass23_1.b__1(ActionContext ) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 224
at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /
/Flow.Launcher.Plugin/Result.cs:line 246
at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 307
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)

@Odotocodot
Copy link
Owner

Hey @jeregon1 can you try this version and send the logs? It has some extra exception checks and logs.
OneNote-2.1.0-test.zip

@jeregon1
Copy link

Yeah, this is the result:
2024-09-28.txt

Please open new issue in: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote/issues 1. upload log file: C:\Users\jesus\AppData\Roaming\FlowLauncher\Logs\1.19.2\2024-09-28.txt 2. copy below exception message Flow Launcher version: 1.19.2 OS Version: 22631.4169 IntPtr Length: 8 x64: True

Python Path: C:\Python312\pythonw.exe
Node Path: C:\Program Files\nodejs\node.exe
Date: 09/28/2024 11:42:08
Exception:
OneNote Exception:
Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote
Author: Odotocodot
Version: 2.1.0
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019
---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019
at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema)
at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search)
at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query)
at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query)
at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token)
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 248
--- 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 247
--- End of inner exception stack trace ---
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_1.b__1(ActionContext ) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 276
at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /
/Flow.Launcher.Plugin/Result.cs:line 246
at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389
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)

@Odotocodot
Copy link
Owner

Okay tweaked some things again. Please try this version!
OneNote-2.1.0-test-2.zip

Also what version of OneNote are you using, and are you on Windows 10 or 11?

@jeregon1
Copy link

jeregon1 commented Oct 8, 2024

Recent pages work, but the rest still fails. Using Windows 11.

2024-10-08.txt

Flow Launcher version: 1.19.2 OS Version: 22631.4169 IntPtr Length: 8 x64: True Python Path: C:\Python312\pythonw.exe Node Path: C:\Program Files\nodejs\node.exe Date: 10/08/2024 17:14:01 Exception: OneNote Exception: Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote Author: Odotocodot Version: 2.1.0 Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019 ---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019 at Microsoft.Office.Interop.OneNote.ApplicationClass.FindPages(String bstrStartNodeID, String bstrSearchString, String& pbstrHierarchyXmlOut, Boolean fIncludeUnindexedPages, Boolean fDisplay, XMLSchema xsSchema) at Odotocodot.OneNote.Linq.OneNoteApplication.FindPages(String search) at Flow.Launcher.Plugin.OneNote.SearchManager.DefaultSearch(String query) at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query) at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token) at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 248 --- 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 40 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 282 --- End of inner exception stack trace --- at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_1.b__1(ActionContext _) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 276 at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /_/Flow.Launcher.Plugin/Result.cs:line 246 at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389 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)

@Odotocodot Odotocodot added the bug Something isn't working label Oct 8, 2024
@Odotocodot Odotocodot self-assigned this Oct 8, 2024
@Odotocodot
Copy link
Owner

Odotocodot commented Oct 8, 2024

Thats strange that recent pages still work.
Here is yet another version, hopefully with a fix this time.
OneNote-2.1.0-test-3.zip
Ignore above please use this one
OneNote-2.1.0-test-4.zip

@jeregon1
Copy link

jeregon1 commented Oct 9, 2024

I'm sorry, doesn't work yet but i forgot to mention notebook explorer nb:\ does work perfectly.
2024-10-09.txt

Flow Launcher version: 1.19.2 OS Version: 22631.4169 IntPtr Length: 8 x64: True Python Path: C:\Python312\pythonw.exe Node Path: C:\Program Files\nodejs\node.exe Date: 10/09/2024 15:56:25 Exception: OneNote Exception: Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote Author: Odotocodot Version: 2.1.0 Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019 ---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019 at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query) at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token) at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 248 --- 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 40 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 282 --- End of inner exception stack trace --- at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_1.b__1(ActionContext _) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 276 at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /_/Flow.Launcher.Plugin/Result.cs:line 246 at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389 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)

@Odotocodot
Copy link
Owner

Okay, given the notebook explorer works, can you try a scoped search?

@jeregon1
Copy link

jeregon1 commented Oct 10, 2024

Yeah, here there should appear at least one page in which i have the word charisma:

image

Logs:
2024-10-10.txt

Flow Launcher version: 1.19.2
OS Version: 22631.4169
IntPtr Length: 8
x64: True

Python Path: C:\Python312\pythonw.exe
Node Path: C:\Program Files\nodejs\node.exe
Date: 10/10/2024 11:36:08
Exception:
OneNote Exception:
Websites: https://github.com/Odotocodot/Flow.Launcher.Plugin.OneNote
Author: Odotocodot
Version: 2.1.0
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: 0x80042019
---> System.Runtime.InteropServices.COMException (0x80042019): 0x80042019
at Flow.Launcher.Plugin.OneNote.SearchManager.Query(Query query)
at Flow.Launcher.Plugin.OneNote.Main.QueryAsync(Query query, CancellationToken token)
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 248
--- 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 40
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 282
--- End of inner exception stack trace ---
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass28_1.b__1(ActionContext ) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 276
at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in /
/Flow.Launcher.Plugin/Result.cs:line 246
at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389
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)

@Odotocodot
Copy link
Owner

It seems that the crash is related to using the FindPages API on the COM object.

@Odotocodot
Copy link
Owner

Given the issue is only in the FindPages API it might be something related to your Windows Search. Given the OneNote API docs says that it requires it.
A temporary solution is to use the title search feature (on *) since it does not use FindPages. However, as the name suggests it only searches via the title of the page, section, section group or notebook.

@jeregon1
Copy link

jeregon1 commented Nov 2, 2024

Windows Search? Wait! I have it deactivated! No wonder it doesn't work, sorry for the confusion and the time. I use Everything instead of it.

@Odotocodot
Copy link
Owner

That would be it. From the docs:

FindPages works only if you have Microsoft Search 3.0 or 4.0 installed on your computer. Windows Vista and Windows 7 include this component. However, if you are running an earlier version of Windows, you must install Windows Search for FindPages to work.

Glad we got this sorted finally!

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

No branches or pull requests

4 participants