Jump to content

Changing Syncing location causes a lot of issues


noahm

Recommended Posts

Hello!

 

I am aware of this page: https://www.alfredapp.com/help/advanced/sync/

 

What I have done:

  • Set my sync folder to "~/Documents/Alfred/". I do have iCloud Drive enabled but Desktop & Documents folder is disabled (so it's technically not syncing to anything, I just moved the folder location; should I have done this?)
  • Force quit all Alfred processes and reopened (done after the issues came up)

 

Issues that have occurred:

  • Alfred Hotkey does not work. It was on "⌘Space" before changing the folder. After setting it to the folder (and restarting), the Hotkey was still set, but didn't work. I changed it to something else, and back again, and "⌘Space" does not work. Spotlight is not using this keyboard shortcut either so there are no conflicts.
  • Snippets Auto-Expansion is still checked but does not do anything. Unchecking and re-checking does not change anything.
  • Themes are not recognised when using Alfred (i.e. if I Spotlight for Alfred, then the window opens up, my theme is not applied, despite a theme being selected within Alfred Preferences)
  • How we looks (Appearance → Options) does reflect any of the checkboxes.

 

I don't really use any of the other stuff mentioned soon the page I linked above, so I cannot confirm if things are the way they should be.

 

In the meantime, can someone please tell me how to revert what I have done?

I quit Alfred, removed "Alfred.alfredpreferences" from the folder and opened Alfred again. Then the message came up about preferences not being found, and continued on. Everything went back to normal.

 

My setup:

  • macOS Big Sur Version 11.5.1 (20G80)
  • Alfred Version 4.5.1 (1256) (20F71)

 

Thanks for your time.

Edited by noahm
Link to comment
Share on other sites

5 hours ago, noahm said:

Then the message came up about preferences not being found, and continued on. Everything went back to normal.

 

It hasn't exactly gone back to normal. If Alfred can't find your synced preferences bundle, it uses the default one in ~/Library/Application Support/Alfred (creating a new, empty one if necessary).

 

It sounds like your original preferences bundle is screwed up. Where was it before? Which sync system did you use before?

Link to comment
Share on other sites

18 hours ago, deanishe said:

It sounds like your original preferences bundle is screwed up. Where was it before? Which sync system did you use before?

 

It was not being synced anywhere actually. It was just using the default location as you mentioned!

Link to comment
Share on other sites

Alfred needs read/write access to a local (static) location on your Mac to be able to correctly sync the files. If the location you've set is transient or remote, Alfred may be unable to persist or read preferences.

 

An example of this is setting to iCloud drive (or the Documents folder with macOS configured to keep documents in the cloud), and macOS then "optimising" your storage by removing all of Alfred's configuration files from your local Mac, and making them Cloud only.

 

If you're having issues, the best option is to quit Alfred then make sure the latest copy of Alfred.alfredpreferences is back in the default location of:

 

~/Library/Application Support/Alfred/Alfred.alfredpreferences

 

then delete the following file, which is where Alfred stores the location of the above package:

 

~/Library/Application Support/Alfred/prefs.json

 

Cheers,

Andrew

Link to comment
Share on other sites

So basically Alfred preference sync is not working with iCloud Drive? That sounds problematic given that there is no cloud sync in Alfred and it even explicitly mentions DropBox as a way to sync config files.

 

Also, given that this happens immediately after turning on syncing and choosing the file, after making sure everything in that folder is synced, I think there is most likely more to this issue than just that. It's not complaining that it can't read the config or anything (and as said, it is fully synced and local), it just seems to refuse to honor a lot of things in that config file. None of my workflows are executing and the hotkey I set up for Alfred doesn't work. Even if I configure it again in Alfred. For me it is always stuck to option+space, no matter what key combination I actually configure (and what is shown in Alfred).

Link to comment
Share on other sites

2 hours ago, virpio said:

I think there is most likely more to this issue than just that.

 

There almost certainly is, but it sounds like something is screwed up with your prefs bundle. Have you actually checked the contents of the bundle? What about file permissions?

Link to comment
Share on other sites

I have to scenarios that both failed which makes me believe it is probably not an issue with the preference bundle itself:

 

I first tried to initiate syncing from this machine by choosing a folder in iCloud Drive and let Alfred copy over the preference bundle to that location. It immediately stopped recognizing the key command or any of my workflows. I looked through the preference bundle and it looked like my workflows were in there. Console.app was not showing any error logs for Alfred.

 

I then reverted back to using a local file simply by deleting that preference file and Alfred was immediately back to normal. I now initialized syncing on a different Mac in a different folder and that Mac was (and is) working like before. The hot key worked, all my workflows are there etc. I then pointed the original Mac back to that file and it again immediately stopped working, not recognizing the right key command and not being able to recognize any of my workflows.

 

Looking at the access rights for that preference bundle on the machine that has the broken behavior I see this:

drwxr-xr-x@  5 <username>  staff      160 Jul 22 11:45 Alfred.alfredpreferences

 

This, I believe, is the way it should be?

 

I can grab other debug logs if you need them, and send them to you via a support email if you tell me what to grab.

Link to comment
Share on other sites

4 hours ago, virpio said:

It immediately stopped recognizing the key command or any of my workflows

 

What happens if you tell Alfred to use a directory that isn’t in your iCloud Drive? If that works, then iCloud Drive is most likely the problem.

 

Thing is, that shouldn't even be necessary: there's no difference between a synced prefs bundle and a non-synced one as far as Alfred is concerned. It treats them exactly the same.

 

The most probable explanation – because it's something that has happened many times before – is that iCloud screwed up your prefs bundle.

 

4 hours ago, virpio said:

This, I believe, is the way it should be?

 

That's the bundle itself. What about the stuff inside it? The prefs bundle is just a directory. You need to check its contents to see if it's okay.

Link to comment
Share on other sites

Fair point. I just deleted the file at

~/Library/Application Support/Alfred/prefs.json

and restarted Alfred. I verified that everything worked again (key command and workflows) and then told Alfred to sync to ~/Downloads, which is not on iCloud Drive. It immediately stopped working again after the restart of Alfred. The key command is back to option+space instead of cmd+space and no workflow can be found.

 

So I started looking through the other aspects of the configuration on both systems and finally found the issue:

 

On the Mac that wasn't working I haven't granted Alfred permission for Full Disk Access. I am not sure why this is showing in this way since it can clearly read the config file without issues (it shows the correct key command and all my workflows in the preferences inside Alfred, it just doesn't honor them).

 

So this still sounds like a bug in Alfred to me, but at least I can now sync my config between different Macs.

Link to comment
Share on other sites

2 hours ago, virpio said:

So this still sounds like a bug in Alfred to me

 

 

I'd certainly agree that Alfred shouldn't let read/write failures pass silently.

 

I'm not sure how well checking for Full Disk Access would work, though: macOS has a bug where it revokes Full Disk Access from an app but still claims it has access.

Link to comment
Share on other sites

If there's any more debug info I can gather, let me know. Happy to help.

 

In this case, I am almost certain I probably never granted Alfred full disk access in the first place as I am typically very restrictive with these kind of permissions unless I see a clear benefit and use case for me.

 

I'm not super familiar with these APIs, but my understanding is that even without full disk access, Alfred should always be able to access a file I pointed it to previously via an open dialog. Also given that this happen immediately after I choose a config file location and given that Alfred shows the correct key command in its preferences it seems to be able to read the config file. So it sounds to me like there might be something else going on here that's a bit more subtle than Alfred being unable to read the config file.

Link to comment
Share on other sites

6 hours ago, virpio said:

So it sounds to me like there might be something else going on here that's a bit more subtle than Alfred being unable to read the config file

 

If granting Full Disk Access fixed the issue, then it was a knock-on effect, wasn't it?

 

6 hours ago, virpio said:

Alfred should always be able to access a file I pointed it to previously via an open dialog.

 

It should. But the bottom line is that Alfred is not designed to work without Full Disk Access. Alfred's whole purpose is to let you quickly access all your stuff and it requires access to all your stuff to be able to do that.

 

Anything that goes wrong because a user hasn't granted Full Disk Access is ultimately a user configuration error. Alfred should do its best to warn about that, but ultimately there's little point investing effort in trying to work around such a crippling misconfiguration.

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