Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App settings will not persist on macOS 14 #1924

Open
scottrobertson opened this issue Jun 7, 2023 · 87 comments
Open

App settings will not persist on macOS 14 #1924

scottrobertson opened this issue Jun 7, 2023 · 87 comments

Comments

@scottrobertson
Copy link

I have been trying to work out why my app settings are all resetting, and not persisting in macOS 14. This has been happening for apps such as Raycast, iTerm, Rectangle, Bartender etc. I just tried running mackup uninstall and everything is fixed. And then when i run mackup backup again, none of my settings will persist or save again. Any ideas?

@joshmedeski
Copy link
Contributor

Which files storage method are you using? Can you share your ~/.mackup.cfg with us?

@scottrobertson
Copy link
Author

[storage]
engine = icloud

[applications_to_ignore]
oh-my-zsh
espanso

iCloud

@joshmedeski
Copy link
Contributor

I've seen other mackup users using iCloud have has similar issues. Could you try turning off the feature to optimize mac storage and see if that helps? It will be under the iCloud settings.

Screenshot 2023-06-07 at 4 36 32 PM

My thinking is iCloud is removing these config files from your hard drive to save storage.

@scottrobertson
Copy link
Author

scottrobertson commented Jun 7, 2023

Hey. Just tried that, and it did not help, sadly.

I also did the following:

  • mackup uninstall
  • Open an app, all settings are fine
  • Rename/remove ~/Library/Mobile Documents/com~apple~CloudDocs/Mackup
  • Run mackup backup
  • Reopen the same app, and it has reset all settings
  • mackup uninstall
  • Reopen the app, and all the settings are back

@joshmedeski
Copy link
Contributor

Can you confirm the symbolic links that are generated are valid? The Rename/remove step you mentioned could be causing the symbolic links to break.

@lra any ideas?

@scottrobertson
Copy link
Author

To be clear, I had already run mackup uninstall before the rename/remove. I ran that earlier today to get things working. I did the rename/remove just to basically do a "fresh start" to rule out any old files causing issues etc.

@scottrobertson
Copy link
Author

Hey. Just an update here. I just tried this again using

[storage]
engine = file_system
path = Mackup/

And i get the same result. I run mackup backup, open iTerm2 for example, and all settings have wiped, run mackup uninstall and open it again, and settings are back. So i don't think iCloud is the issue.

@codechenx
Copy link

I have same issue

@ahmadawais
Copy link

Same issue. Started happening when I updated to Dropbox beta, and then tried moving to iCloud. Now it's a mess. Not sure what's wrong, unable to predict a pattern here but with latest macOS this happens:

  • All of a sudden some apps loose their config (have to reconfigure)
  • Some apps like iTerm2 or Terminal don't keep their configs no matter what I do (uninstall/install fresh doesn't help)

@Skowt
Copy link

Skowt commented Jun 26, 2023

+1 on this issue. I was going to say I wonder if this is related to the Apple update that basically made it harder for Cloud apps to work on mac. It also meant you had to change the location of your Dropbox drive.

https://help.dropbox.com/installs/macos-support-for-expected-changes

@scottrobertson
Copy link
Author

+1 on this issue. I was going to say I wonder if this is related to the Apple update that basically made it harder for Cloud apps to work on mac. It also meant you had to change the location of your Dropbox drive.

https://help.dropbox.com/installs/macos-support-for-expected-changes

I don’t think it’s that, no. It even stops working if I just use the file system storage method.

@Skowt
Copy link

Skowt commented Jun 26, 2023

Then I would say it's a recent Apple update. For me this started happening in the last week, which is when I updated to Ventura 13.4.1 (might've also been when I updated to 13.4).

It's possible that there's an unknown bug with the latest update or a "security improvement" that's messing with symlinks 🤔

@Skowt
Copy link

Skowt commented Jun 26, 2023

I've done mackup uninstall for now which has fixed everything but it would be interesting if mackup has any logs stored somewhere? To see exactly what was erroring out. Perhaps a permissions issue that was going undetected? Who knows at this point.

@luispedrofonseca
Copy link

Just lost a couple days on this exact issue because it took me a while to figure why a lot of my settings weren't saving and that mackup was the culprit. Hope this gets solved quickly.

@jagajaga
Copy link

jagajaga commented Jul 13, 2023

cc me

@jacobgraf
Copy link

Any updates on this one? I am having the same issues and it's maddening. I will uninstall for now, but hope it gets fixed soon because I really love Mackup.

MacOS: 14.0 Public Beta (23A5286i)
Mackup: 0.8.37

[storage]
engine = file_system
path = SynologyDrive/Backups

[applications_to_ignore]
illustrator
mackup
zsh
path-finder
streamdeck

@davdroman
Copy link

davdroman commented Jul 20, 2023

If for some reason this issue is due to symlinks and effectively impossible to fix going forward, it might be a good idea to offer an alternate mode of backup by copying over files instead of symlinking them, so that at least the tool doesn't become fully obsolete. I wouldn't mind doing a manual export/import every once in a while as a compromise instead of ditching Mackup altogether.

@ahmadawais
Copy link

ahmadawais commented Jul 20, 2023

I'm quite frustrated with losing all the settings again and again. To a point where I'm planning on rewriting this project one way or the other. It's been mentally taxing. 😮‍💨

I understand life gets in a way and this free software. Appreciate all the hardwork.

@jacobgraf
Copy link

If for some reason this issue is due to symlinks and effectively impossible to fix going forward, it might be a good idea to offer an alternate mode of backup by copying over files instead of symlinking them, so that at least the tool doesn't become fully obsolete. I wouldn't mind doing a manual export/import every once in a while as a compromise instead of ditching Mackup altogether.

Exactly. Honestly, I wish this was a feature today. I don’t really need the symlinking anyway. I just want the peace of mind that when I run mackup backup, my settings are copied somewhere that is versioned and backed up.

@godbout
Copy link
Contributor

godbout commented Aug 1, 2023

I've seen other mackup users using iCloud have has similar issues. Could you try turning off the feature to optimize mac storage and see if that helps? It will be under the iCloud settings.

Screenshot 2023-06-07 at 4 36 32 PM My thinking is iCloud is removing these config files from your hard drive to save storage.

same with the new Dropbox in CloudStorage.

@jacobgraf
Copy link

I've seen other mackup users using iCloud have has similar issues. Could you try turning off the feature to optimize mac storage and see if that helps? It will be under the iCloud settings.
Screenshot 2023-06-07 at 4 36 32 PM
My thinking is iCloud is removing these config files from your hard drive to save storage.

same with the new Dropbox in CloudStorage.

I don't use either of these. I use SynologyDrive and have it set to sync everything. I don't think it has anything to do with the storage engine. I've had to temporarily remove Mackup to get things working, but like I said, I'm hoping they add a way to "copy" your prefs to another location instead of doing the whole symlink thing. That would be fine and preferable, for me.

@godbout
Copy link
Contributor

godbout commented Aug 1, 2023

for me things started failing with Dropbox when they moved to the new CloudStorage shit. (see #1891.) now you can't be certain that Dropbox starts at a proper time. i think the whole symlink thing should be gone yeah. maybe there's something also related to macOS 14 itself, where now it seems we need Apple's approval to read and write our own UserDefaults 🤣️

@neoromantic
Copy link

I've been debugging same issue for past hour, and finally understood that it's due to mackup.

I'm running Sonoma beta.

Here's how it look:

rejecting write of key(s) mainWindowPositionCache in { com.raycast.macos, sergey.petrov, kCFPreferencesAnyHost, /Users/sergey.petrov/Library/Preferences/com.raycast.macos.plist, managed: 0 } from process 7061 (Raycast) because Path not accessible

@romancin
Copy link

Same problem here with Sonoma RC. Mackup is broken :(

@iarchean
Copy link
Contributor

I am experiencing a similar issue, but it is quite strange. My Intel iMac is functioning properly, while my M2 MacBook has stopped working.

@olssonm
Copy link

olssonm commented Sep 29, 2023

Can confirm, having major issues in Sonoma, both for app settings but also system plists; (com.apple.* for example). Discovered it when settings for Tower (the Git-client) and system-level keyboard shortcuts (Library/Preferences/com.apple.symbolichotkeys.plist) didn't persist between reboots.

mackup.cfg:

[storage]
engine = icloud

[applications_to_ignore]
zsh

@gabrielkoerich
Copy link

gabrielkoerich commented Oct 2, 2023

Same issue, settings are not persisted.

Only 'fix' for now is mackup uninstall

my backup workflow is now mackup backup --force && mackup uninstall

@reitermarkus
Copy link

Just as additional information, defaults also doesn't work if the preferences file is a symlink but works with a plain file. So definitely symlinks are the problem.

@ChrisChinchilla
Copy link

ChrisChinchilla commented Oct 5, 2023

Same here as soon as I installed Sonoma, damn… I have a lot of other "non-standard" setup with symlinks too, I really hope they're not all broken…

Edit… They still seem to work thankfully.

@devantler
Copy link

devantler commented Apr 2, 2024

For now this can be used when using Git as a backup store.

That workaround is already known for half a year: #1924 (comment), the point is - it should simply become a native mode as mentioned here: #1924 (comment)

That is true, I just wanted to highlight it a bit more, as the comment you link to does not explain how to do this when restoring. So I just commented to make it a bit easier to understand for anyone else landing here in a search for a quick fix :-)

@ashtonian
Copy link

Not all apps break when symlinking to ~/Library and for other things in home symlinks aren't affected at all. I know this adds to the complexity of the app .cfg files, but w

Do you have an example of app configs persisting when linking to ~/lLibrary? Does this issue seem to only be impacting ~/Library/Application Support and be related to where the files are stored on the file system or more of an issue with the permission set of the consuming application?

@dzogrim
Copy link
Contributor

dzogrim commented Apr 10, 2024

I have to say that I also tried everything I could and it breaks on macOS 14 w/Dropbox, still working perfectly on my macOS 13. I have to avoid shutting down or restarting the Mac under Sonoma… 😢 Don't know if it is coming from Sonoma and/or CloudStorage 😠
I love both Mac and mackup!
Could it be some kind of permissions change or else?
I also could see the issue before the switch of Dropbox in CloudStorage…

@jhirn
Copy link

jhirn commented Apr 12, 2024

Not all apps break when symlinking to ~/Library and for other things in home symlinks aren't affected at all. I know this adds to the complexity of the app .cfg files, but w

Do you have an example of app configs persisting when linking to ~/lLibrary? Does this issue seem to only be impacting ~/Library/Application Support and be related to where the files are stored on the file system or more of an issue with the permission set of the consuming application?

I've modified my configuration a lot over the past few months until finally stumbling on this thread on symlinks breaking so it's quite possible I'm not correct about some apps working. This comment #1924 (comment) reinforced my belief that and app could possibly support write through on symlinks but I'm really not sure.

@sinewave
Copy link

I'm running into this issue on Sonoma and finally took the time to track it down and came across this issue.

After reading most of this thread, am I correct in assuming there is no current fix for iCloud sync? It seems the solution mentioned above is only for GitHub.

Is the current recommendation to uninstall Mackup?

@Lincest
Copy link

Lincest commented Apr 25, 2024

Same problem, It's causing many of my apps to work exceptionally (e.g. iterm2's config file won't save), and all the app's shortcut keys reset automatically on every restart.

It took me quite a while to locate the problem 😭

@ViaxCo
Copy link

ViaxCo commented Apr 25, 2024

For me, after running mackup uninstall, some files are just straight up missing, and I can't find them in the Mackup folder. I'm using file_system as the engine. My iTerm's settings don't seem to stick either.

@octoxan
Copy link

octoxan commented May 14, 2024

Same issue. It's so bad that I basically can't use Apple Music when using Mackup. Every single login to my computer it shows me the welcome screen for Apple Music, Bartender, etc. Only when having it set to iCloud storage.

@jhirn
Copy link

jhirn commented May 16, 2024

I'm running into this issue on Sonoma and finally took the time to track it down and came across this issue.

After reading most of this thread, am I correct in assuming there is no current fix for iCloud sync? It seems the solution mentioned above is only for GitHub.

Is the current recommendation to uninstall Mackup?

@sinewave

I've been doing what's suggested above which is to mackup backup --force && mackup uninstall. This will overwrite your saved config with the files in place and it's good enough to generate a git diff which I then commit and push up. You'll have to edit your config files in place because they are no longer symlinked.

I really wish at least the README would get updated because right now this tool will basically break your system forcing you to

I'm doing this until another solution comes along because I don't think there will be any solution for symlinks to work with ~/Library anytime soon. Apple shut it down quietly perhaps due to an exploit and AFAIK don't recognize it as an issue to be resolved.

@victor-falcon
Copy link

It's possible, somehow, to just disable this files backups. Something like this?

[applications_to_ignore]
macos

@weeebdev
Copy link

weeebdev commented Jul 8, 2024

It's possible, somehow, to just disable this files backups. Something like this?

[applications_to_ignore]
macos

Would love to see that!

@sinewave
Copy link

I'm running into this issue on Sonoma and finally took the time to track it down and came across this issue.
After reading most of this thread, am I correct in assuming there is no current fix for iCloud sync? It seems the solution mentioned above is only for GitHub.
Is the current recommendation to uninstall Mackup?

@sinewave

I've been doing what's suggested above which is to mackup backup --force && mackup uninstall. This will overwrite your saved config with the files in place and it's good enough to generate a git diff which I then commit and push up. You'll have to edit your config files in place because they are no longer symlinked.

I really wish at least the README would get updated because right now this tool will basically break your system forcing you to

I'm doing this until another solution comes along because I don't think there will be any solution for symlinks to work with ~/Library anytime soon. Apple shut it down quietly perhaps due to an exploit and AFAIK don't recognize it as an issue to be resolved.

Thx @jhirn , assuming I'd need to switch from iCloud to Github as my storage system?

@tshu-w
Copy link

tshu-w commented Jul 13, 2024

I'm looking for an alternative to mackup, since soft links no longer work on macOS 14, and mackup temporarily doesn't support copying (the only solution is mackup backup --force && mackup uninstall).

I found unison to be a good alternative. It can perform two-way synchronization between directories with many advanced features (including watch, merge, backup, atomic directory, etc.).

The only thing needed to migrate from mackup to unison is to manually convert mackup's configuration to unison's profile. For example, this is my default profile.

Then we can use the unison -batch -repeat watch to synchronize our configurations. I hope this can help others with similar needs.

@victor-falcon
Copy link

I just discovered this is actually an option.

[applications_to_ignore]
macosx

I'm testing it right now.

@jhirn
Copy link

jhirn commented Aug 12, 2024

I just discovered this is actually an option.

[applications_to_ignore]
macosx

I'm testing it right now.

Results @victor-falcon. I'm so burnt out I don't even want to test it myself. I got bit the other day editing my .profile because I was editing the saved version which is no longer linked and really wish I never switched from my simple script to mackup.

@jussapaavo
Copy link

jussapaavo commented Aug 14, 2024

I just discovered this is actually an option.

[applications_to_ignore]
macosx

I'm testing it right now.

I don't think it makes any difference. MacOS doesn't seem to support symlinks in general in the Application Support directory, so just ignoring the OS preferences is not enough. There are so many other applications using that directory for storing plist files etc and they won't work either.

I didn't find any viable way to use mackup and I followed tshu-w's advice on migrating to unison. I also use dotfiles managers (like chezmoi) for managing my dev env and non-sensitive configs.

@jhirn
Copy link

jhirn commented Aug 14, 2024

I just discovered this is actually an option.

[applications_to_ignore]
macosx

I'm testing it right now.

I don't think it makes any difference. MacOS doesn't seem to support symlinks in general in the Application Support directory, so just ignoring the OS preferences is not enough. There are so many other applications using that directory for storing plist files etc and they won't work either.

I didn't find any viable way to use mackup and I followed tshu-w's advice on migrating to unison. I also use dotfiles managers (like chezmoi) for managing my dev env and non-sensitive configs.

Yeah I traded in my 9 year old ./install.sh 8 line script specifically because this worked with ios application settings. It's a shame that Apple killed it but was more concerning is nothing has been done to address this in mackup (to my knowledge).

Thanks for the recs. I will check out those out before going back to that.

chrisbloom7 added a commit to chrisbloom7/homebrew-core that referenced this issue Aug 19, 2024
The `mackup` program works by moving config files to an off-disk backup location (usually a cloud storage provider like iCloud or Dropbox, etc.) and then replacing the original file with a symlink to the backed up version. The intended use is to make sure program configuration settings and preferences can be restored if you need to replace computers, factory reset, etc.

As documented [here](lra/mackup#2035), [here](lra/mackup#1924), [here](lra/mackup#1969 (reply in thread)), `mackup backup` no longer works on MacOS Sonoma (possibly due to [security changes](lra/mackup#1924 (comment)) in the app sandbox in Sonoma) and running the command will result in the loss of all preference files. Users who backup to a storage provider that has versioning or backup snapshots may be able to restore preferences to an older version. For users backing up to other storage providers that do not have this feature, such as iCloud, the command results in total data loss. This issue has been known to the developer for over a year but there is no fix, no mention of the issue in the project README, no warning when running the command, and no indication in the program output that the backup process may not have completed properly - neither in the dry-run mode nor in live mode.
chrisbloom7 added a commit to chrisbloom7/homebrew-core that referenced this issue Aug 19, 2024
`mackup` works by moving config files to an
off-disk backup location (usually a cloud storage
provider like iCloud or Dropbox, etc.) and then
replacing the original file with a symlink to the
backed up version. The intended use is to make
sure program configuration settings and
preferences can be restored if you need to replace
computers, factory reset, etc.

As documented
[here](lra/mackup#2035),
[here](lra/mackup#1924),
[here](lra/mackup#1969 (reply in thread)),
`mackup backup` no longer works on MacOS Sonoma
(likely due to [security
changes](lra/mackup#1924 (comment))
in the app sandbox in Sonoma) and running either
the backup or restore commands on MacOS Sonoma
will result in the loss of all preference files.
Users who backup to a storage provider that has
versioning or backup snapshots may be able to
restore preferences to an older version. For users
backing up to other storage providers that do not
have this feature, such as iCloud, the command
results in total data loss. This issue has been
known to the developer for over a year but there
is no fix, no mention of the issue in the project
README, no warning when running the command, and
no indication in the program output that the
backup process may not have completed properly -
neither in the dry-run mode nor in live mode.
chrisbloom7 added a commit to chrisbloom7/homebrew-core that referenced this issue Aug 19, 2024
`mackup` works by moving config files to an
off-disk backup location (usually a cloud storage
provider like iCloud or Dropbox, etc.) and then
replacing the original file with a symlink to the
backed up version. The intended use is to make
sure program configuration settings and
preferences can be restored if you need to replace
computers, factory reset, etc.

As documented
[here](lra/mackup#2035),
[here](lra/mackup#1924),
[here](lra/mackup#1969 (reply in thread)),
`mackup backup` no longer works on MacOS Sonoma
(likely due to [security
changes](lra/mackup#1924 (comment))
in the app sandbox in Sonoma) and running either
the backup or restore commands on MacOS Sonoma
will result in the loss of all preference files.
Users who backup to a storage provider that has
versioning or backup snapshots may be able to
restore preferences to an older version. For users
backing up to other storage providers that do not
have this feature, such as iCloud, the command
results in total data loss. This issue has been
known to the developer for over a year but there
is no fix, no mention of the issue in the project
README, no warning when running the command, and
no indication in the program output that the
backup process may not have completed properly -
neither in the dry-run mode nor in live mode.
andrewwestling added a commit to andrewwestling/dotfiles that referenced this issue Sep 8, 2024
Since macOS 14 (Sonoma), Mackup has been broken 😞

See here:
- lra/mackup#1924
- https://www.reddit.com/r/macapps/comments/1f1j41a/avoid_mackup_if_you_are_runing_sonoma_or_later/

There are some workarounds but I am taking this opportunity to just simplify my setup a bit

Most of my settings are not that precious that I rely on Mackup to perfectly replicate between machines; I can just do some manual configuration and get most of the way there

I'm removing references to Mackup and its configuration from this repo in this commit
andrewwestling added a commit to andrewwestling/dotfiles that referenced this issue Sep 8, 2024
* Deprecate Mackup in my setup

Since macOS 14 (Sonoma), Mackup has been broken 😞

See here:
- lra/mackup#1924
- https://www.reddit.com/r/macapps/comments/1f1j41a/avoid_mackup_if_you_are_runing_sonoma_or_later/

There are some workarounds but I am taking this opportunity to just simplify my setup a bit

Most of my settings are not that precious that I rely on Mackup to perfectly replicate between machines; I can just do some manual configuration and get most of the way there

I'm removing references to Mackup and its configuration from this repo in this commit

* Update brewfile

Added new things since last time
- 1password-cli
- Keycastr

* Add setup steps for `.zshrc` and `.gitconfig`/`.gitignore`

I still want a way to "sync" my zshrc and git configuration, so I made a little set of instructions and manual steps to perform for this

Between VS Code tasks and README steps, it's here

* Clean up README

Some little things that annoyed me:

- Minor copy edits
- No longer need Obsidian symlink; we're using Obsidian Sync so the iCloud setup is unneeded
hwartig added a commit to hwartig/dotfiles that referenced this issue Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests