Jump to content

Workflows dismissing themselves


Recommended Posts

I'm having a problem with a couple of workflows when trying to open them: Alfred disappears, flashes up for a microsecond, and disappears again

 

The thing is, these workflows worked fine when I installed them, so I suspect it's something else in my configuration that has changed.

 

How can I debug this better?

https://alfred.app/workflows/zeitlings/scratchpad/
https://alfred.app/workflows/xilopaint/things/

 

Steps to reproduce: type 'pad' or 'todo' and then choose an option after it loads. With pad, very rarely, it actually works (the first time after I reinstalled it)

 

Things I've tried

- Reinstalling the macros, setting them to default

- Launching MacOS with no other apps running

 

I hope that's enough to go on

Thanks!

Oli


OS 14.4.1 Alfred 5.5

Link to comment

@Oli F Welcome to the forum :) 

 

First, I can see that you're on an older build of macOS Sonoma, so I'd recommend updating macOS to the current version (14.6 currently)

 

When this happens, which app takes focus in the menu bar top left? Alfred will yield focus when an app requests it. In normal conditions, this will be when you launch an app or Finder window via Alfred intentionally, but in your case it seems another app is stealing focus, causing Alfred to disappear.

 

Alternatively, if it happens *any* time you pop up Alfred, it may be that you've set another app to use the same hotkey combo, but it's slower to respond, so Alfred shows then the other app steals focus.

Link to comment
On 8/18/2024 at 8:49 AM, Vero said:

@Oli F Welcome to the forum :) 

 

First, I can see that you're on an older build of macOS Sonoma, so I'd recommend updating macOS to the current version (14.6 currently)

 

When this happens, which app takes focus in the menu bar top left? Alfred will yield focus when an app requests it. In normal conditions, this will be when you launch an app or Finder window via Alfred intentionally, but in your case it seems another app is stealing focus, causing Alfred to disappear.

 

Alternatively, if it happens *any* time you pop up Alfred, it may be that you've set another app to use the same hotkey combo, but it's slower to respond, so Alfred shows then the other app steals focus.

Thank you Vero

 

I've updated to 14.6.1

 

No app seems to take focus – the menubar just shows the name of the app that was already in front. And it doesn't happen any time I launch Alfred, just on some workflows that have more than one step in them (e.g. a list of results, meant to be followed by another).

 

I've tried logging in holding Shift, which disables most startup items from running, and the problem is still there. The strange thing is sometimes I'll do something unrelated – quit a process or eject a disk, and it starts working for a bit. But it's not repeatable, and it quickly goes back to the previous behaviour.

 

GIF attached

 

P.S. Seeing you were in Cambridge, where I hail from, played a small role in my decision to purchase the Powerpack!

 

Video: https://www.icloud.com/iclouddrive/028A6-GZwariurpTJ2bUlAnyw#Video

 

 

 

 

Link to comment

@Oli F Open the debugger and you’re bound to see an error. Probably something you’ll need to report to the author of the workflow (in the Alfred Gallery page you’ll find links to GitHub and the forum page where they are published). But if you paste the debugger output here, I’ll be able to confirm.

Link to comment

Thanks for the reply @vitor

 

The strange thing is that very occasionally the Scratchpad runs fine, triggered in exactly the same way.

The Things workflow worked a few times too.

That's why I thought it could be in my setup, rather than an error in the workflows.

 

Here it is from Scratchpad.

 

[22:13:45.720] Scratchpad[Script Filter] Queuing argument '(null)'
[22:13:45.816] Scratchpad[Script Filter] Script with argv '(null)' finished
[22:13:45.821] Scratchpad[Script Filter] {"skipknowledge":true,"items":[{"title":"First Pad","arg":"/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/1.md","type":"file","variables":{"active_pad":"1","dot":"🟡"},"icon":{"path":"icons/1.png"}},{"title":"Second Pad","arg":"/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/2.md","type":"file","variables":{"active_pad":"2","dot":"🟠"},"icon":{"path":"icons/2.png"}},{"title":"Third Pad","arg":"/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/3.md","type":"file","variables":{"active_pad":"3","dot":"🔴"},"icon":{"path":"icons/3.png"}},{"title":"Fourth Pad","arg":"/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/4.md","type":"file","variables":{"active_pad":"4","dot":"🟣"},"icon":{"path":"icons/4.png"}},{"title":"Fifth Pad","arg":"/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/5.md","type":"file","variables":{"active_pad":"5","dot":"🔵"},"icon":{"path":"icons/5.png"}}]}
[22:13:46.751] Scratchpad[Script Filter] Processing complete
[22:13:46.752] Scratchpad[Script Filter] Passing output '/Users/[Removed]/Library/Application Support/Alfred/Workflow Data/com.zeitlings.notes/1.md' to Arg and Vars
[22:13:46.753] Scratchpad[Arg and Vars] Processing complete
[22:13:46.754] Scratchpad[Arg and Vars] Passing output '🟡' to Conditional
[22:13:46.755] Scratchpad[Conditional] Processing complete
[22:13:46.756] Scratchpad[Conditional] Passing output '🟡' to Arg and Vars
[22:13:46.757] Scratchpad[Arg and Vars] Processing complete
[22:13:46.758] Scratchpad[Arg and Vars] Passing output '🟡' to JSON Config
[22:13:46.759] Scratchpad[JSON Config] Processing complete
[22:13:46.760] Scratchpad[JSON Config] Passing output '' to Conditional
[22:13:46.760] Scratchpad[Conditional] Processing complete
[22:13:46.776] Scratchpad[Conditional] Passing output '' to Junction
[22:13:46.777] Scratchpad[Junction] Processing complete
[22:13:46.778] Scratchpad[Junction] Passing output '' to JSON Config
[22:13:46.779] Scratchpad[JSON Config] Processing complete
[22:13:46.779] Scratchpad[JSON Config] Passing output '' to Text View
[22:13:46.780] Scratchpad[Arg and Vars] Passing output '🟡' to Call External Trigger
[22:13:46.781] Scratchpad[External] Processing complete
[22:13:46.781] Scratchpad[External] Passing output '🟡' to Junction
[22:13:46.782] Scratchpad[Junction] Processing complete
[22:13:46.783] Scratchpad[Junction] Passing output '🟡' to Run Script

 

Here it is from Things

 

[22:22:04.025] Things[Script Filter] Queuing argument '(null)'
[22:22:05.130] Things[Script Filter] Script with argv '(null)' finished
[22:22:05.136] Things[Script Filter] {"items":[{"title":"Inbox","subtitle":"","arg":"TMInboxListSource","icon":{"path":"images/icons/inbox.png"}},{"title":"Today","subtitle":"","arg":"TMTodayListSource","icon":{"path":"images/icons/today.png"}},{"title":"Anytime","subtitle":"","arg":"TMNextListSource","icon":{"path":"images/icons/anytime.png"}},{"title":"Upcoming","subtitle":"","arg":"TMCalendarListSource","icon":{"path":"images/icons/upcoming.png"}},{"title":"Someday","subtitle":"","arg":"TMSomedayListSource","icon":{"path":"images/icons/someday.png"}},{"title":"Logbook","subtitle":"","arg":"TMLogbookListSource","icon":{"path":"images/icons/logbook.png"}},{"title":"Trash","subtitle":"","arg":"TMTrashListSource","icon":{"path":"images/icons/trash.png"}},{"title":"Home","subtitle":"","arg":"TdmZQ5zUH2YDD7tYWFSBEo","icon":{"path":"images/icons/area.png"}},{"title":"Projects","subtitle":"","arg":"MJux59p6zqDsNonSmvoQ7H","icon":{"path":"images/icons/area.png"}},{"title":"Work","subtitle":"","arg":"MAbapAB4irs47RzyKGayKG","icon":{"path":"images/icons/area.png"}},{"title":"Promotion","subtitle":"","arg":"9sKQ5vq37qiXYmRwwSWcF6","icon":{"path":"images/icons/area.png"}},{"title":"Studio","subtitle":"","arg":"Q2yyHr61v5xuHSf4pVMfST","icon":{"path":"images/icons/area.png"}}]}
[22:22:06.264] Things[Script Filter] Processing complete
[22:22:06.265] Things[Script Filter] Passing output 'TMNextListSource' to Arg and Vars
[22:22:06.265] Things[Arg and Vars] Processing complete
[22:22:06.266] Things[Arg and Vars] Passing output '' to Script Filter
[22:22:06.283] Things[Script Filter] Queuing argument '(null)'

 

 

Link to comment
1 minute ago, Oli F said:

That's why I thought it could be in my setup, rather than an error in the workflows.

 

Yes, but the problem in your setup could be causing an error in the workflow, and by seeing the latter it may be possible to figure out the former.

 

Nothing immediately jumps as an obvious problem in there, so I do recommend you contact the authors.

Link to comment
  • 2 weeks later...

I've actually noticed this too. Sometimes Alfred just closes itself while I'm in the middle of a multi-step workflow. It happens without any errors in the scripts it's running. It will be showing the results of a random list filter / script filter and BAM, the window just disappears. It's a rare but annoying phenomenon.

Link to comment

@Floating.Point What app is taking focus in macOS after Alfred disappears?

 

Does it happen in any Alfred mode (e.g. in workflows, clipboard, or while doing a simple search)? 

 

There are two possibilities:

1. If it's a specific workflow, it could be that a workflow's connection itself needs to be set to "Don't close" in the connection configuration.

 

image.png

 

2. If it happens seemingly at random regardless of workflow or Alfred mode, then a third-party is asking macOS for focus and Alfred yields, by design. In that case, you'll need to work out what other app, menu bar item or background app is requesting focus.

 

If it takes focus in a way that shows its name in the top left of the menu bar, you have an easy answer as to which app is the cause, but if it's more subtly taking focus only briefly or isn't a standard focused app, it may be trickier to identify. You'll need to work out what's running on your Mac, perhaps try running fewer menu bar apps for a little while to see if it still happens.

 

Alfred won't just *disappear* without reason so it'll be either of those causes. Hope this helps!

 

Cheers,
Vero

Link to comment

Hey @Vero, thank you, yes this is helpful, it gives me something to look out for next time it happens! I have only ever noticed it during workflows that take more than a few seconds to operate, but it's so rare this correlation might just be coincidental. I'll keep a keen eye on the menubar next time it happens and hope to catch the culprit, and go from there!

 

To clarify, it is happening across multiple workflows, but I've never noticed it in other activities (clipboard manager / standard search). In my use those activities generally require much less time, so it could just be coincidental I've not caught it there.

Edited by Floating.Point
Link to comment

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...