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

macOS Ventura 13.0 sync fails due to com.apple.provenance metadata #185

Closed
luckman212 opened this issue Nov 5, 2022 · 18 comments
Closed
Assignees
Labels
Milestone

Comments

@luckman212
Copy link

luckman212 commented Nov 5, 2022

update: This should be fixed once v1.22.2 is released, scroll down for details...

Since upgrading one of my Macs to Ventura 13.0, my folder will no longer sync (getting stuck on a piece of undocumented metadata called com.apple.provenance

I have tried removing the xattr with sudo xattr -d com.apple.provenance /path/to/file but that isn't working either.

Google has nothing about this really... anyone else running into this? Using syncthing-macos 1.22.0-1

see related post on ST forum

@xor-gate
Copy link
Member

xor-gate commented Nov 5, 2022

Thanks for the report, I have old hardware which doesn't run Ventura. So I need to figure out a way to reproduce this or dig up some documentation. I think it is some sort of extra security mechanism (again). Probably I need some help from other people with this unfortunately.

@xor-gate xor-gate added the bug label Nov 5, 2022
@xor-gate xor-gate changed the title com.apple.provenance metadata causing sync to fail macOS Ventura 13.0 sync to fails due to com.apple.provenance metadata Nov 5, 2022
@xor-gate xor-gate changed the title macOS Ventura 13.0 sync to fails due to com.apple.provenance metadata macOS Ventura 13.0 sync fails due to com.apple.provenance metadata Nov 5, 2022
@luckman212
Copy link
Author

Thanks, I've just posted a question over on AskDifferent as well.

@xor-gate
Copy link
Member

xor-gate commented Nov 6, 2022

Hi @calmh I moved it to the https://github.com/syncthing/syncthing project as it is a Syncthing (macOS build) issue and not part of the syncthing-macos application bundle. Thanks!

@xor-gate xor-gate transferred this issue from syncthing/syncthing-macos Nov 6, 2022
@xor-gate
Copy link
Member

xor-gate commented Nov 6, 2022

Moved because it is not an syncthing-macos application bundle problem. But the Syncthing daemon itself with trying to sync xattrs between two devices with macOS Ventura 13.0 and macOS < 13.0. See also the forum.

@calmh
Copy link
Member

calmh commented Nov 6, 2022

As noted on the forum, this can be disabled by configuration, unfortunately only by hand editing the config at the moment:

<folder id="..." ...>
  <xattrFilter>
    ...
    <entry match="com.apple.provenance" permit="false"/>
    <entry match="*" permit="true"/>
  </xattrFilter>
</folder>

We might want to look into some sort of default black list per operating system perhaps, in the future.

@calmh calmh closed this as completed Nov 6, 2022
@xor-gate xor-gate transferred this issue from syncthing/syncthing Nov 6, 2022
@xor-gate xor-gate removed the bug label Nov 6, 2022
@xor-gate
Copy link
Member

xor-gate commented Nov 6, 2022

I need to document the note on manual file editing in the FAQ so I transfered the issue back to syncthing-macos.

As noted on the forum, this can be disabled by configuration, unfortunately only by hand editing > the config at the moment:

<folder id="..." ...>
 <xattrFilter>
   ...
 <entry match="com.apple.provenance" permit="false"/>
 <entry match="*" permit="true"/>
 </xattrFilter>
</folder>

We might want to look into some sort of default black list per operating system perhaps, in the > future.

See also
#185 (comment)

I leave this open until I have documented this in the README.md

Thanks @luckman212 for reporting

@xor-gate xor-gate reopened this Nov 6, 2022
@xor-gate xor-gate self-assigned this Nov 6, 2022
@xor-gate xor-gate added the docs Documentation label Nov 6, 2022
xor-gate added a commit that referenced this issue Nov 6, 2022
Add FAQ note about syncing xattrs from macOS 13.0 to macOS < 13.0. See issue #185.
@xor-gate
Copy link
Member

xor-gate commented Nov 6, 2022

The README.md has been updated with appropiate information. Manual editing is the only way for now. See commit 7fa1d1a

@xor-gate xor-gate added bug and removed docs Documentation labels Nov 6, 2022
@luckman212
Copy link
Author

Adding a note here, regarding somewhat-related bug #8657 (since it relates to syncing xattrs)

@xor-gate
Copy link
Member

xor-gate commented Nov 8, 2022

Note from @luckman212 (here #154 (comment)) copied over here for convience:

Just adding this note here related to debugging going on over at https://forum.syncthing.net/t/com-apple-provenance/19262/17

For anyone who wants to increase the logfile size using the macOS bundle, you can use:

# sets logfile size to 50MB, and keep the last 5 during logrotate 
defaults write com.github.xor-gate.syncthing-macosx Arguments '--log-max-size=52428800 --log-max-old-files=5'

And when you're done debugging, use this to revert things back to default:

defaults delete com.github.xor-gate.syncthing-macosx Arguments

I believe you need to fully quit the Syncthing app after each of these changes (not just stop/start the service) for it to take effect.

Thanks @luckman212 !

@xor-gate
Copy link
Member

xor-gate commented Nov 8, 2022

Commenting on your findings:

I believe you need to fully quit the Syncthing app after each of these changes (not just stop/start the service) for it to take effect.

Yes the Arguments are loaded only on startup. Not when changed.

@luckman212
Copy link
Author

@xor-gate v1.22.2-rc.1 was pushed that aims to fix this, among other things. Is it possible for me to compile my own bundle to test? I have Xcode 14.1 but I don't have a Developer account so I can only sign locally.

@luckman212
Copy link
Author

@xor-gate Answered my own question... and I'm happy to report that this pre-release build has fixed the original issue for me. 🚀 So hopefully once the upstream release drops we can all benefit.

For anyone else who's curious: here are the steps I figured out in order to build a pre-release. It was confusing at first because the default repo branch is develop which is very far out of date from the latest release. I had to clone the 1.22.1-1 branch and build from that in order to get it to work (a full clone and separate git checkout would probably work fine too).

Steps

  1. Clone the repo & some prereqs
git clone --depth 1 --branch v1.22.1-1 https://github.com/syncthing/syncthing-macos
cd syncthing-macos
git submodule update --init
  1. Change version strings
vi syncthing/Scripts/syncthing-resource.sh
  • update SYNCTHING_VERSION (removing the v):
SYNCTHING_VERSION="1.22.2-rc.1"
  • update CFBundleShortVersionString in Info.plist:
vi syncthing/Info.plist
  1. find & export your developer account / codesigning identity:
security find-identity -v -p codesigning
export SYNCTHING_APP_CODE_SIGN_IDENTITY="Apple Development: you@domain (XXXXXXXXXX)"
  1. build
make release
  1. look in syncthing-macos/Build/Products/Release/ for your newly minted Syncthing.app

@xor-gate
Copy link
Member

syncthing-macos only ships releases no -rcs. The README.md includes some build and release management instructions. I will include this build instructions into the readme when I have some spare time. Thanks for reporting the issue is resolved.

@luckman212
Copy link
Author

Not fully out of the woods yet on this one... syncthing/syncthing#8667

@luckman212
Copy link
Author

Compiled a build this morning based on v1.22.2-rc.2 and this is now 100% fixed for me 👍

@xor-gate
Copy link
Member

Good, we need to wait for the v1.22.2 release window on 6 dec. Then we can close this ticket. Thanks for your effort!

@luckman212
Copy link
Author

Still looking good, on 1.22.2-rc.3 now and all is working well.

@xor-gate
Copy link
Member

xor-gate commented Dec 9, 2022

Syncthing macOS is now shipping with release v1.22.2 (see commit bf62e12). Only the auto-updater is broken for some unknown reason, you can wait or download the signed/secure DMG.

@xor-gate xor-gate closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants