Jump to content

Debugger erroneously reports errors for Script Filters [Fixed 2.6 b372]


Recommended Posts

As best as I can tell, any output to STDERR will cause Alfred to prefix the output with


[ERROR: alfred.workflow.input.scriptfilter]


in the debugger.


While more experienced users/developers will recognise that


[ERROR: alfred.workflow.input.scriptfilter] Code 0:


(especially if Alfred also show results) means that there wasn't actually an error, this behaviour is misleading for less expert users because Alfred's debugger says there was an ERROR when there actually was none.


Alfred should not automatically prefix output to STDERR with ERROR.


ERROR should only be printed if the exit code is non-zero and/or the returned XML was invalid. Otherwise it's misleading and causes users to report errors that aren't errors.


There may well actually be something wrong, but as Alfred's default behaviour is the same in the case of zero results and an actual error (i.e. show fallback searches), it can easily result in users reporting an "error" when they're just getting an empty result set.


I'm posting this in Bug Reports because it's logically wrong to report ERROR when there isn't actually one.

Edited by deanishe
Link to comment
Share on other sites



Will all STDERR output continue to be shown in Errors and Warnings or only if there's an error?


Anything logged to stderr will be shown in the "Errors and Warnings" mode regardless of script exit status... I may rename it to something like "Interesting Information" or something like that.

Link to comment
Share on other sites

In that case, what's the difference between "All information" and "Errors and Warnings" (or "Interesting Information")?


They seem to do pretty much the same thing.


"All Information" also shows general internal stuff output by the different processors... for example, if you set to "All Information", you'll see the XML output listed in the debug view for a script processor.

Link to comment
Share on other sites

Hmm. It doesn't show the XML output from my Script Filters, only the STDERR messages.


Could it be that it only shows the XML if there's no STDERR output?


I've turned off logging in the workflow, and suddenly the XML is logged.


Ah yeah, you are right... error takes priority. I'll fix that now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...