espanso
espanso copied to clipboard
Search Bar: Error when typing to filter list
Describe the bug
Frequently (but not always) when attempting to filter the list of options in the search bar (e.g. when using the Choice extension), an error will be triggered after a single key is pressed in the search bar's text field:
[Espanso]: An error occurred during rendering, please examine the logs for more information.
To Reproduce Steps to reproduce the behavior:
- Create a match using the Choice extension.
Example:
# Choice Test - triggers: [":test"] label: "Options List" replace: "{{selection}}" vars: - name: selection type: choice params: values: - label: "One" id: "Oneoneone" - label: "Two" id: "Twotwotwo" - label: "Three" id: "Threethreethree" - label: "Four" id: "Fourfourfour"
- Trigger match.
- Attempt to type text to filter the list of choices.
- Error message is output.
Note: The error is triggered when using the search bar in general, but the Choice extension provides a more semi-consistent example that results in the error.
Expected behavior Typing text in the search bar text field should filter the list without errors.
Screenshots N/A
Logs
17:33:08 [worker(31374)] [WARN] rendering was aborted by extension: choice, on var: selection
17:33:10 [worker(31374)] [WARN] extension 'choice' on var: 'selection' reported an error: modulo returned an empty output
17:33:10 [worker(31374)] [ERROR] error during rendering: rendering error
Caused by:
modulo returned an empty output
Setup information
- OS: macOS 12.1
- Version: 2.1.2-alpha
Hey @archetyped,
Thanks for reporting this issue! I'm wondering if the search bar process is crashing. Could you please check if by opening the Console app > Crash Reports you see some Espanso entries?
I'm particularly curious to get a crash report after the search bar crashes with the error you show :)
Cheers :)
Hi, there are no Espanso entries in Console's Crash Reports section.
Please let me know if there's anything else I can check to help debug the issue.
@archetyped I see, thanks! I've opened an issue to improve the modulo error reporting #944. Once that's ready, we'll be (hopefully) able to gather enough information to diagnose this further :) I'll keep you posted
Thanks @federico-terzi. I'll test the new build once it's available and report any details it provides.
Here is log output from an error that occurred when attempting to type in the search bar to filter matches. I believe the currently-installed version has #944 implemented.
- Version: 2.1.6-beta
- Platform: macOS (12.4)
23:37:53 [worker(96609)] [ERROR] modulo exited with non-zero status code: None
23:37:53 [worker(96609)] [WARN] extension 'choice' on var: 'adr_tpl_options' reported an error: modulo returned an empty output
23:37:53 [worker(96609)] [ERROR] error during rendering: rendering error
Caused by:
modulo returned an empty output
Espanso output
[Espanso]: An error occurred during rendering, please examine the logs for more information.
Note: It would be nice if these error messages were displayed as a notification, rather than as text output. Text output requires users to always delete the error message before they can type the desired text, which can be annoying as the error message is somewhat lengthy. Additionally, the error message text may cause issues when output into text fields that act immediatly upon the input (e.g. search as you type fields, etc.).
@archetyped Thanks for reporting and for the feedback, always welcome! I'll try investigating and get back to you if I discover something
Is this still an issue with the current release?