Sync stopped working: "You can't delete the same record twice in a single operation"

Testing version:
2.0.17

What were you doing:
Had a conflict and deleted one file

What feature did you use:
“Delete”

What happened:
Sync from Mac to iPhone stopped. iPhone to Mac still seems to work mostly

2023/12/08 02:03:08:940 -[SFNoteCloudKitSyncOperation uploadLocalChanges]:392 Start uploading chunk 1 item to upload 12 item to delete 20
2023/12/08 02:03:08:940 -[SFNoteCloudKitSyncOperation getUploadLocalChangesOperationWithRecordsToSave:recordIDsToDelete:]_block_invoke:496 CKError while uploading → <CKError 0x6000032e7660: “Invalid Arguments” (12); “You can’t delete the same record (<CKRecordID: 0x600003d66cc0; recordName=0C7CFB07-FD04-4282-ADC2-EB40247A6D7C, zoneID=Notes:defaultOwner>) twice in a single operation”>

What did you expect to happen:
Mac updates to sync to iPhone

Deleted the entries with id 0C7CFB07-FD04-4282-ADC2-EB40247A6D7C from ZSFCHANGEITEM table, and it started syncing again. Not sure if it will have any side effects…

Hi w0nsng,

i have the same issue and its super frustrating. Mac stopped to synch notes created from Mac. The other way still works fine.
In my log files I see the same error:

CKError while uploading → <CKError 0x600000c42790: “Invalid Arguments” (12); “You can’t delete the same record (<CKRecordID: 0x6000003fa040; recordName=SFNote2Intro2_file1, zoneID=Notes:defaultOwner>) twice in a single operation”>

If you are familiar with SQL, might wanna try deleting the records from ZSFCHANGEITEM table like I did, at least it’s been working fine for me since then. Or wait for Bear team to release a fix :wink:

I’ve experienced the same problem. In my case, the Mac app stopped uploading my notes to the cloud. It was attempting to delete the same record twice on the cloud (since there were duplicates with the same unique id in the local database).

I contacted Bear support about this on 8th November 2023 and sent them a full log. So I’m hopeful they have the information they need to implement a fix or workaround.