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

Problem with event deleted after sync - Apple iCloud changes immutable ID #447

Closed
Lorenzo-81 opened this issue Jan 30, 2018 · 19 comments
Closed
Assignees
Labels
enhancement New feature resolved Working hotfix available
Milestone

Comments

@Lorenzo-81
Copy link

Hi,
I have this problem. I'm using my phone (Samsung) to put in google calendar the event. The OGCS sync on Microsoft Outlook ( version 2010 - 32bit ) the event without problem, but at the second sync OGCS delete first of all from GOOGLE and after that from Outlook. I using the setting in the picture below
image

Please help me, thanks.

My OGCS version is 2.7.0.0, but this problem is present also in the previous version.

Thanks a lot

@phw198
Copy link
Owner

phw198 commented Jan 31, 2018

And can you replicate this issue by creating the Google event in https://calendar.google.com instead of your Samsung phone?

@Lorenzo-81
Copy link
Author

Yes the problem is same. I discovered today the problem. Is the settings of "show me as". If you create the event on google calendar app or web or via samsung calendar, of default setting it on busy. But when the OGCS sync with outlook set it on available. There is the problem, infact when OGCS re-sync, first of all, delete the event from Google after that from Outlook. I tried to create an event from google and set to available, and all sync is ok

@Lorenzo-81
Copy link
Author

I've an update. The problem is already appear ... I tried with busy and available, but it's same problem. Look the picture below.
image

I changed the direction setting from outlook to google and the result is that OGCS create another two events with same entries.

@phw198
Copy link
Owner

phw198 commented Feb 1, 2018

Yes, I don't think the busy/available setting has relevance here.

Are you manually creating the new entries in Google from scratch, or duplicating an already existing Google event that's previously been synced by OGCS?

@Lorenzo-81
Copy link
Author

I tried both mode. And the problem is same. OGCS sync at first and the second sync delete the event, first of all from Google and after from Outlook. Below the settings of Outlook
image

@phw198
Copy link
Owner

phw198 commented Feb 3, 2018

Please could you apply the below build and then turn on Create CSV exports in OGCS application behaviour settings. This will create various CSVs (in the same directory as your OGcalsync.log file) of the items being synced.

I'm suspecting that the ID of the synced iCloud item in Outlook is changing between when it is saved there by OGCS and when the next sync occurs, which causes the match to fail and because you have two-way sync on, resulting in the deletions.

You'll need to capture the CSVs after the first successful sync (eg ZIP them up) and again after the next sync where it wants to delete the Google item. Please could you then upload those two sets of CSVs - no problem to delete all the other lines and just leave your test case).

📦 v2.7.0.2.zip (see instructions for applying).

@Lorenzo-81
Copy link
Author

Lorenzo-81 commented Feb 5, 2018 via email

@phw198
Copy link
Owner

phw198 commented Feb 7, 2018

🖇️ Sorry, files can't be attached to the ticket when replying by email - please log in to GitHub to upload files.

@Lorenzo-81
Copy link
Author

ok
google_create.zip

phw198 added a commit that referenced this issue Feb 11, 2018
@Lorenzo-81
Copy link
Author

Hello,
I looked the link, but which is the operation ? Save files ? And if is yes, where is the position of file on the pc?

@phw198
Copy link
Owner

phw198 commented Feb 12, 2018

Hi, what link are you referring to? The code commit I made yesterday doesn't require any action on you, it's just me changing the code behind OGCS as related to this issue.

However, once I've released the next beta release (v2.7.1) I'll need you to upgrade and produce the CSVs again - including the Outlook CSV files as these are likely more important than the Google CSVs you zipped up before.

@Lorenzo-81
Copy link
Author

ok, perfect. When will the beta version be available? ? I needed to solve this problem. Thanks a lot

@phw198
Copy link
Owner

phw198 commented Feb 14, 2018

Sorry I meant alpha (not beta) and it's available now.

⏫ Upgrade to latest release by going to the About tab in OGCS, ticking the Check for Alpha releases box and then clicking Check for Update.

@Lorenzo-81
Copy link
Author

Hi, I've upgrade this morning, the version, but the problem is same.
Attached all the file create, from Google and Oultook
event.zip

@phw198
Copy link
Owner

phw198 commented Feb 17, 2018

Thanks for that. So I've followed through the various files and confirmed that unfortunately, the "Global ID" of the Outlook items changes after it's been saved.

On creation in Outlook (having been synced from Google), it's value is (I've added the asterisks):
040000008200E00074C5B7101A82E00800000000**700DCFC06CA6D301**0000000000000000100000007B50203616522240BE1758D033C69C7A
Where 700DCFC06CA6D301 is the time it was created and the end of the code is the unique code.

However, on the next sync, the Outlook ID for the same item has now changed:
040000008200E00074C5B7101A82E00800000000**0000000000000000**00000000000000002F0000007643616C2D55696401000000343434372D30374532303230462D303231372D304433352D464632322D303037334100
You can see the timestamp code has been zeroed out(!) and the unique code after it is completely different and much longer.

The problem is, as per the Microsoft documentation, "After it [the ID] is set for a Calendar object, the value of this property MUST NOT change." So given it appears Apple aren't following this, there's nothing I can do to prevent subsequent deletions - OGCS is built on the assumption other calendar providers will follow the rules as specified by Microsoft.

One way sync with iCloud is going to be the only supported method using OGCS, I'm afraid.

@phw198 phw198 changed the title Problem with event deleted after sync Problem with event deleted after sync - Apple iCloud changes immutable ID Feb 17, 2018
@Lorenzo-81
Copy link
Author

Ok, only one doubt, relatively of your information about the sync.
The question is, but if you deleted the same event from google and outlook, you can match the same value. If the code is different, the OGCS, should be create a duplicate event both google and/or Outlook, but don't delete it. I don't understand why OGCS deletes the event both google and Outlook.

@phw198
Copy link
Owner

phw198 commented Feb 19, 2018

Because you have two way sync configured.

When OGCS creates the Outlook item or syncs it to Google, it stores the outlook ID. When the Outlook ID changes (which it never should) Google can no longer find the Outlook ID in Outlook so interprets that as you deleting it in Outlook...and it replicates that in Google. Now Outlook, which also knows about the Google item (whose ID never changed) sees the delete and replicates that also in Outlook.

There is an outside chance I can improve this to also check the Google IDs during two way sync (which isn't changing) and rely on that instead/as well - but I don't have time to investigate further for a few days at least...

@phw198
Copy link
Owner

phw198 commented Feb 25, 2018

📦 OK, could you try v2.7.1.2.zip and see if that copes better (see instructions for applying)?

Let me know how it goes...

@Lorenzo-81
Copy link
Author

Hi, for the tests that I made, the problem is solves !!! Thank you so much.

@phw198 phw198 self-assigned this Feb 26, 2018
@phw198 phw198 added this to the v2.7.0 milestone Feb 26, 2018
@phw198 phw198 added enhancement New feature resolved Working hotfix available labels Feb 26, 2018
@phw198 phw198 closed this as completed in 80429ab Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature resolved Working hotfix available
Projects
None yet
Development

No branches or pull requests

2 participants