Jump to content

Menu Search


Recommended Posts

None of my MacBooks uses optimized storage. I referred to iCloud syncing just to emphasize that the .alfredworkflow files are identical on each one. It's a simple workflow that doesn't evolve or change. By the way, I have a third MacBook that also works properly with the workflow. It's just this one that doesn't that I need help troubleshooting because the diagnostic information that I can find offers no insight beyond Alfred's not finding that workflow Id.

Link to comment

Revealing in Finder solved it. I saw that the workflows are actually local files and then remembered that my versions saved in iCloud are exported from Alfred for archival purposes I simply deleted the misbehaving workflow via Alfred preferences, then imported it as new from my archived file.

 

I can't remember specifically what I did on the working computers to update the Menu Bar Search workflow, or what I might have done differently on the non-working computer. My workflows and Alfred hacking are pretty much set-it-and-forget-it, but I'll put this in my notes and hopefully remember to check those notes the next time a workflow needs to be updated.

Link to comment

Wait a minute, there's something else going on here. Some time after I delete and install the workflow on one computer, it goes bad on other computers in the way described above. So there's some kind of syncing going on that I don't know about or forgot. All I see in the advanced preferences is syncing for my preferences. Does that include workflows somehow? In any case, my preferences file is synced via iCloud, but hasn't changed in more than a year, so it appears the same on all the computers.

 

One other detail: I modify the Menu Bar Search workflow to accept an external trigger, and I detach the hotkey. I exported the modified workflow, then that's the one I import on the laptops. What am I doing wrong?

Link to comment
1 hour ago, marfon said:

How might syncing break this workflow?

 

@marfon If your Mac is set up to use iCloud for syncing, it is possible for that to be the source of the issue. With Optimised Storage enabled, your Mac can arbitrarily move files to online-only, at which point Alfred no longer has access to them. This is why I highlighted first that Optimised Storage has to be disabled.

 

Before you try anything else, let's take syncing out of the equation. Please create an Alfred folder in your user directory (the same ~/ base folder where you have your Documents, Downloads, etc but not within any of those folders) then set Alfred's preferences to be stored in ~/Alfred/ from Alfred's Advanced preferences.

 

Once you've done this, your preferences will be stored locally so that you can see if you're seeing normal behaviour on that Mac. Let us know how you get on. :)

Link to comment

As I responded earlier: None of my MacBooks uses optimized storage.

 

At the time of reading your post, I'd already begun the following experiment: remove the workflow from all laptops, then reinstall it. That means remove it from one, let them all sync, add it to one, let them all sync, then test. At the moment, I've removed it from one and have observed the second delete it automatically via syncing. My third computer is offline in another location. I'll sync it in a few hours, add back the workflow, then see what happens. Unless, of course, you recommend otherwise.

Edited by marfon
Link to comment
29 minutes ago, marfon said:

I'll sync it in a few hours, add back the workflow, then see what happens.

 

@marfon It's not clear what you mean by "adding back the workflow", could you clarify what you're doing?

 

If you're manipulating the preferences directly, rather than installing a workflow on one Mac by double-clicking and allowing Alfred preferences to import it, this may be having an unpredictable impact.

 

It may also be wise to exclude Keyboard Maestro from this process for the time being to work out whether the workflow, when triggered from a normal hotkey or keyword, while unsynced, works normally.

 

The more variable change at the same time, the trickier it makes it to work out why the workflow isn't behaving as expected on one of your Macs.

Link to comment

I add a workflow by dragging and dropping its .alfredworkflow file onto the workflows list in preferences. When I do that, the cursor turns into a white plus sign on a green disk, so I infer drag-and-drop functionality is supported. After I add back and sync, I'll try triggering the workflow directly from the Alfred bar, then post here.

 

ADDED: I produced the .alfredworkflow file by installing the workflow from the gallery per earlier advice in this thread, modifying it to accept an external trigger, then exporting that to the .alfredworkflow file for archival purposes on my hard drive.

Edited by marfon
Link to comment

OK, after deleting from all three computers, I added the workflow back to one via dragging-and-dropping. This time, I created a keyword for it: double-tap the command key. I verify the operation on computer 1. The workflow gets synced to computer 2, but when I double-tap cmd, there's no response. Nothing gets listed in the debugger. Computer 3 is on and syncing at a different location. Any suggestions of what to troubleshoot?

Link to comment

I've now verified laptop 3 after it synced its Alfred preferences: the workflow functions properly, but only via the Karabiner external trigger. Even though it shows the double-cmd button hotkey is set up correctly, it doesn't respond to it. with nothing showing in the debugger log. To sum up, after deleting, syncing the deletion, adding the workflow, then syncing the add, the workflow behaves in three different ways on three different laptops.

Link to comment
15 hours ago, marfon said:

I added the workflow back to one via dragging-and-dropping.

I feel we need to simplify things a little. Why not try retaining the workflow on the laptop where it works as expected, deleting it on the other two machines, ignoring this "dragging and dropping” action and simply relying on synchronisation of preferences to transfer the workflow to the other laptops?

 

To be clear, I don't know why you're trying to transfer the workflow to other machines via drag and drop when synchronisation of preferences should anyway do the trick. Maybe I'm misunderstanding something about your workflow: apologies if so but this does seem to have beccme very complicated and I've never seen anyone report anything quite like it before so there does seem to be something unusual about what you're doing.

 

Stephen

Link to comment
39 minutes ago, Stephen_C said:

Why not try retaining the workflow on the laptop where it works as expected, deleting it on the other two machines, ignoring this "dragging and dropping” action and simply relying on synchronisation of preferences to transfer the workflow to the other laptops?

That's exactly what I do: I drag and drop it to one machine only, then I wait for the other two machines to sync it. Apologies if I didn't explain that clearly. Doing what you describe is precisely what has led to the present situation of three different behaviors on three different machines.

Link to comment
1 minute ago, marfon said:

That's exactly what I do: I drag and drop it to one machine only,

Sorry, I'm clearly being obtuse, but I still don't understand where the necessity for drag and drop starts. I suspect it's lost in the history of this thread but would you mind explaining exactly why you're having to drag and drop a workflow rather than, for example, simply double-clicking to install it.

 

Stephen

Link to comment

I drag and drop the .alfredworkflow file to install it simply because, as far as I know, that's one normal way to install a workflow that's been exported to a .alfredworkflow file. I suppose I could double-click the .alfredworkflow file from the Finder as well to achieve the same result (right?)

Link to comment

I have to confess that I've always installed Alfred workflows by double-clicking on the downloaded file. I wonder whether it might be worth trying that in your case to see if it resolves the problem (i.e., install that way on one machine and let the installed workflow synchronise to the other machines after first deleting it on those other machines).

 

Stephen

Link to comment

OK, I deleted the workflow from laptop 1, then waited until laptops 2 and 3 synced the deletion. Then I double-clicked the workflow on laptop 1, which brought up the same installation dialog as when I drag-and-drop it onto Alfred preferences. I waited until the installation was synced on the other two laptops. Here's the result:

 

laptop 1: doesn't respond at all to the hotkey, but responds correctly to the external trigger

 

laptop 2: Alfred pops up an "Unable to run task" window as a response to the hotkey and also to the external trigger.

 

laptop 3: I'll fill this in later when I return to that location.

Link to comment

If you’re getting a warning about /bin/bash, there’s something seriously wrong with the setup on that machine. Bash has shipped with macOS even before it was called that, always in the same location, and even its version does not change.

 

A bunch of things don’t look right. First, reading back on the conversation I see that we’re on the wrong thread. You shouldn’t be using this workflow but the one linked by @Stephen_C which is a different one. It is likely you now have two workflows. Please make sure you delete all Menu Bar Search workflows before reinstalling the one from the Gallery and trying again.

 

It’s also not clear to me how you’re doing syncing. You mention iCloud, but that error suggests your preferences are in your Documents folder. What exactly is your setup? If you’re installing the workflow individually and manually on each machine, your Hotkey won’t transfer. Hotkeys are always stripped on import so as to not clobber some other hotkey on a different machine.

 

Finally, the right workflow has a Keyword to trigger it. Try that, with the debugger open and we can go from there. That should be done only after the steps above, and only if that hasn’t worked.

Link to comment

I am using the one (2.0) linked by @Stephen_C per his earlier advice.

 

The path to my preferences file is ~/Documents/var/computing/Apple/MacOS/Alfred/Alfred.alfredpreferences

 

I'm not installing individually and manually on each machine. I install on one machine, then the others sync.

 

I'll do it all again: I'll delete from one machine. After I verify all three machines have synced, I'll install one one laptop from the gallery link instead of my .alfredworkflow file. After I verify that all three machines have synced the new install, I'll test again and post here. That should take about 24 hours because I'll first get all three machines online simultaneously.

Link to comment
35 minutes ago, marfon said:

I am using the one (2.0) linked by @Stephen_C per his earlier advice.


To clarify, the request is specifically to make sure you don’t have the other one. Since it is possible for both to be installed at the same time.

 

35 minutes ago, marfon said:

I install on one machine, then the others sync.


But how? That’s the question. Are you using the iCloud setting to sync your Desktop and Documents, is that it?

 

35 minutes ago, marfon said:

I'll test again and post here.


Please do it by calling via the Keyword and having the debugger open. Both of those are important and we need the output of the latter.

 

Doing that and recording a video could help. We often catch the root of a problem like that.

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