espanso icon indicating copy to clipboard operation
espanso copied to clipboard

Search Bar: Error when typing to filter list

Open archetyped opened this issue 3 years ago • 6 comments

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:

  1. 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"
    
  2. Trigger match.
  3. Attempt to type text to filter the list of choices.
  4. 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

archetyped avatar Jan 12 '22 03:01 archetyped

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 :)

federico-terzi avatar Jan 12 '22 15:01 federico-terzi

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 avatar Jan 12 '22 16:01 archetyped

@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

federico-terzi avatar Jan 14 '22 21:01 federico-terzi

Thanks @federico-terzi. I'll test the new build once it's available and report any details it provides.

archetyped avatar Jan 19 '22 02:01 archetyped

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 avatar Jul 09 '22 09:07 archetyped

@archetyped Thanks for reporting and for the feedback, always welcome! I'll try investigating and get back to you if I discover something

federico-terzi avatar Jul 28 '22 20:07 federico-terzi

Is this still an issue with the current release?

smeech avatar Feb 13 '24 16:02 smeech