passepartoutvpn / passepartout-app

VPN client for Apple platforms.
https://passepartoutvpn.app
GNU General Public License v3.0
768 stars 119 forks source link

iCloud syncing does not work on iOS/macOS #483

Closed keeshux closed 5 months ago

keeshux commented 5 months ago

However, it's reportedly working when sharing profiles with the TV. This can make sense as sync across device/device (Profiles) and device/TV (SharedProfiles) happens in different Core Data stores.

keeshux commented 5 months ago

Version from the iPhone App Store. Can confirm that the app does not fetch iCloud profiles after activating the "Sync with iCloud" toggle.

Same behavior with TestFlight. iCloud profiles are not fetched upon clean install.

keeshux commented 5 months ago

It could really be as stupid as the fact the iCloud containers have an identifier that Apple doesn't like:

iCloud.com.algoritmico.Passepartout
iCloud.com.algoritmico.Passepartout.Shared

The latter might cause silent problems due to the dot, whereas it's probably safer to use e.g.:

iCloud.com.algoritmico.Passepartout-Shared

This works properly in development, but the identifier issue may only affect production environments (TestFlight included).

keeshux commented 5 months ago
error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:](2796): <NSCloudKitMirroringDelegate: 0x2815e0780>: Error recovery failed because the following fatal errors were found: {
    "<CKRecordID: 0x282b932e0; recordName=F209A1B2-1AAE-49B6-891A-556188225282, zoneID=com.apple.coredata.cloudkit.zone:__defaultOwner__>" = "<CKError 0x28242f1e0: \"Invalid Arguments\" (12/2006); server message = \"Cannot create or modify field 'CD_encryptedJSON' in record 'CD_CDProfile' in production schema\"; op = 2EFCD50590D3537B; uuid = 6996B4E5-43D5-45B3-BD44-3B7166A438A8; container ID = \"iCloud.com.algoritmico.Passepartout\">";
}
keeshux commented 5 months ago

Got it. The encryptedJSON field was only deployed to the Passepartout.Shared container (i.e. the Apple TV profiles), not to the main Passepartout container (iOS/macOS).

Just deployed the change to production, so apps should now fix themselves without an update.