Friday, February 21, 2014

Fixing Outlook synchronization issue 0x000710D2 (no instances) when synchronizing Google Calendar

I got annoyed with the following warning whenever Outlook synchronized my Google Calendar: Task 'Internet Calendar Subscriptions' reported error (0x000710D2) : 'The VEVENT, "...", defined near line ..., contains a recurrence pattern that has no instances.'

So I downloaded the ICS (via the URL you had to enter when configuring the synchronization between Outlook and Google Calendar) and looked at the VEVENT at the specified line. There I found the name of the event and went to Google Calender to delete the problematic event. Alas, bummer: the search did not show up the event. Nor did scrolling through the calendar within the date range of the VEVENT.

So instead I made friends with the Google API explorer:

  1. Go into Outlook account settings, find your internet calendar, and copy the URL address of the calendar.
  2. Paste that URL into a browser and go. Choose "save" When asked to save or open the file.
  3. Open the downloaded text file with some application that shows line numbers. Most text editors will do. You might as well use MS Excel.
  4. Scroll down to the vicinity of the line number cited in the offending error message. Verify that this is the troublemaker, and then find the line starting “UID: “. This is the iCalUID that you will need later.
  5. Go to the Google Calendar API
  6. Enable authentication with the OAuth slider on the right. A dialog "Select OAuth 2.0 scopes" pops up. Check both options and click Authorize
  7. Click calendar.calendarList.list and then Execute on the following page. Below the Execute button, two headlines Request and Response. If the Response is 401 Unauthorized, the previous step has failed. Try again. Otherwise you get a list of your calendars with each entry starting like this: { "kind": "calendar#calendarListEntry", "etag": ... "id": "THIS IS THE ID OF THE CALENDAR", "summary": "THIS IS THE NAME OF THE CALENDAR", Put down the ID of the calendar. The ID of your main calendar seems to be identical with your email address.
  8. Use calendar.events.list with the calendar ID and the iCalUID from the ICS. You should get only a single entry like this: { "kind": "calendar#event", "etag": ... "id": "THE ID THAT WE NEED", "status": "confirmed", ... "summary": "THIS IS THE NAME OF THE EVENT", ... Put down the ID of the event. This ID seems to be just the same as the one in the ICS without @google.com at the. Just specifying the calendar ID should show up ALL events, but the problematic event showed up only if you specified its iCalUID.
  9. Use calendar.events.delete with the calendar ID and event ID to delete the event. Problem solved!

In hindsight, you may as well go directly to calendar.events.delete and use your email address for calendarId and the ID from the ICS without @google.com for eventId. But no guarantee.

Now this was really fun. Felt a little like debugging sendmail via telnet on 25.

Update on May 28th 2014 because authorizaton changed and more explicit steps were requested.

Update on July 15th 2014: more details how to get the iCalUID. Thanks to Linda Stoutenburgh!

96 comments:

  1. It worked. Thanks. Subtle difference on the iCalUID vs. ID, just as you described. Took a couple attempts to realized that.

    Have you encountered a ballooning Internet Calendar Subscription pst file associated with your google calendar before? I have one that will start at less than 1MB and grow beyond 1GB+. Wasn't sure if this was related to the empty VEVENT entries or not. Will monitor now that I've removed the problematic event. Thanks again.

    ReplyDelete
    Replies
    1. I have the same balooning ICS.pst file issue, hoping this fixes it long-term.

      Delete
    2. Praise you - I have been trying to fix this problem for over a year and this worked!!

      Delete
  2. thank you for posting, this did the trick !

    ReplyDelete
  3. I was so excited to see these instructions, at the prospect of being able to fix this stupid error that has plagued me for months! However, when I entered the iCalUID for each of the problem events, I received the following response:

    {
    "kind": "calendar#events",
    "etag": "\"2P51478ogOpU1KCwGtKZ5NrhIGI/nC5RUe1kp6Sf1qn4cv_fZrgXia4\"",
    "summary": "[user_name]@gmail.com",
    "updated": "2014-04-17T19:14:45.149Z",
    "timeZone": "America/New_York",
    "accessRole": "owner",
    "items": [
    ]
    }

    There is no event ID!

    Any ideas?? Any help would be greatly appreciated!

    ReplyDelete
    Replies
    1. The Calendar API returned an empty list without any events. Either you've been hit by another problem or there is some error in the request you submitted to get the above result.

      Delete
    2. Make sure to use the UID of the offending event from the file you downloaded. I got this same error by using the line number rather then the UID.

      Delete
    3. Hey, I know this is 4 years later but I had the same issue and found a fix for it.
      Go to Calendar.events.list and type in the Calendar ID.
      This will give you a list of all events in the calendar.
      From here, press Ctrl F and find your event in question.
      The ID should be listed here under the "etag".
      You can use this ID to delete the event

      Delete
    4. After years of seeing the same task errors, I used Anonymous process from Dec 24, 2018 and it finally worked!! I am so happy to NOT see that error message at the bottom of my Outlook bar. Finally! Thank you for this thread!

      Delete
    5. After years of seeing the annoying send/ receive error at the bottom of my outlook, I've been able to FINALLY get rid of it!! Thank you for this thread!!

      Delete
    6. Tip when using Anonymous' approach: Make sure you increase the optional 'maxResults' parameter which is by default set to 250 and hence doesn't necessarily list all events in the calendar.

      Delete
  4. Thanks for posting this. Nice to see a solution to this problem!

    ReplyDelete
  5. Can't get past "3. Use calendar.calendarList.list to list all your calendars".
    When I went through your procedure and get to the calendar.calendarList.list I don't get a list of my calendars but a menu with things like:
    Services > Calendar API v3 > calendar.calendarList.list
    maxResults
    minAccessRole
    .
    .
    .
    .Execute

    I must be doing something wrong. Suggestions appreciated.
    I'm not a web prgrammer

    ReplyDelete
    Replies
    1. You can leave all the fields empty in this step and just click submit. In the following steps, you have to fill in the fields as described in my post. HTH

      Delete
  6. Is it possible to be very explicit with these directions for those of us not familiar with web programming? I'm desperate to fix this error. I found your page in my quest. I'm having a hard time navigating Calendar API. For example, how do you know the iCalUID for the problem event?
    Directions for lay people would be so nice.

    ReplyDelete
    Replies
    1. I made the directions more explicit. Hope this helps. The iCalUID is the very long, cryptic ID in the ICS file.

      Delete
    2. Finding the iCalUID can be confusing if you didn't previously download and open the calendar file (outside or Outlook) in your attempts to fix this annoying error. Here's how to find the iCalUID for step 4:
      Go into Outlook account settings, find your internet calendar, and copy the URL address of the calendar. Paste that URL into a browser and go. Get a message to save or open. I chose save, then go to the file and right click and “open with” and use MS Excel. Scroll down to the vicinity of the line number cited in the offending error message. Verify that this is the troublemaker, and then find the line starting “UID: “. This is the iCalUID cited in step 4 of the instructions.
      Continue following instructions as indicated.

      Mr. Kraaz - thank you from the bottom of my heart for sharing this solution! An entire year I had been plagued by this error.

      Delete
  7. This worked PERFECTLY! Thanks for solving an annoying problem!

    ReplyDelete
  8. It worked great. Thanks so much!

    ReplyDelete
  9. thanks for the help; finally ditched two error messages i've been getting for over a year!

    thank you, thank you, thank you!

    ReplyDelete
  10. Thank you so much! This has been a problem for me for over a year and it's finally resolved. Thanks again!

    ReplyDelete
  11. This worked perfectly. Thank you so much for your electronic detective work!

    ReplyDelete
  12. Thank you for sharing this blog with us. This is quite helpful for us. For more information to this visit at How to setup Outlook

    ReplyDelete
  13. Excelent... Matthias.

    Thx 4 sharing this procedure

    ReplyDelete
  14. Oh, man, thank you so much. This fixed a problem that was bugging me for years... pun intended. The calendar items that I just removed were from 2012 (three years ago) and they've been showing as errors this entire time. THANK YOU SO MUCH!!!

    ReplyDelete
  15. Thank you! It solved my problem...! :)))

    ReplyDelete
  16. Thank you for the instructions. I used the calendar.events.update to undelete an event from 2014 that was causing the error. By changing enddate, startdate and (for example) description, the event became visible again.

    ReplyDelete
  17. I really appreciate the step-by-step help! I've made it to step 8, but instead of finding the ID we need, I find a red box saying "The resource was not found." At one point, I thought I found CLOSE to the right information, and it came up with most of the file I needed, but it didn't actually have the ID on it that I'm supposed to be looking for. It had the first part:
    {
    "kind": "calendar#event",
    "etag": ...

    but that's where the similarity ended. Now I can't even get it to repeat that. I DID try to do a delete in step 9 using your "In hindsight, you may as well go directly to calendar.events.delete and use your email address for calendarId and the ID from the ICS without @google.com for eventId. But no guarantee." just in case it would work. Alas, my Outlook is still giving me the error messages (I get the great privilege of having not one but TWO VEVENT error messages!) Any help, or tips on where I might have gone wrong would be greatly appreciated!

    ReplyDelete
    Replies
    1. Sorry for answering this late. I noticed your question only now.

      I suggest trying calendar.calendarList.list leaving all fields empty just to check if the API basically still works for your. If it doesn't there is probably some problem with the authentication. If it returns lots of result (actually your complete calender) it the search criteria that you have entered before.

      If you succeed to get out SOME data but can't make sense of it drop me a line at matthias dot kraaz at gmx dot de and I'll try to sort it out.

      I also started with multiple offending VEVENTs but could delete them one by one.

      Delete
  18. Matthias, I really appreciate your publishing these notes.
    I have a much larger problem than "one or two" errors. When Outlook syncs my Google calender, it reports "many" errors (like, maybe 50 or so?); and over time, it keeps finding new ones - as I add more events to my Google calendar. So, using your procedure once or twice won't solve the problem for me. And in the meantime, as others have described, my .pst file keeps growing to ridiculous sizes.

    So...
    1. Do you have any insight as to what causes the error? Is it a particular kind of event in Gcal that Outlook chokes on? I've tried various ideas and can't find a theme. It's not just recurring events, it's not just events with a reminder... etc.

    2. Do you have any idea how to see and delete the errors that Outlook is storing in the .pst? I can't find any way to view them, archive them, delete them, etc. (Often, in other contexts, Outlook will write an item to a folder that looks like an email or a note -- for example, synchronization failures.)

    Thanks for any further help.

    ReplyDelete
    Replies
    1. The root cause for the problem that I describe above is Google Calendar keeping meaningless entries in the database which do not render into a real event that would be visible in the Google Calendar GUI or in Outlook. I have the suspicion that these "empty" events are the residue of recurring events that got all instances deleted one by one.

      If you have been using Google calendar for a long time, it's not implausible that you have accumulated a lot of the empty events.

      Regarding 2: there is a special folder just for synchronization failures in Outlook. That folder is going to fill up quickly in your situation with 50 errors per sync. That would also explain your growing pst.

      Delete
    2. Hi Matthias,
      So I realized there was an update, and the email had gone to my spam... ugh.

      I've looked and looked. I don't have a Synchronization Failures folder anywhere. (I know what you're talking about; I used to have a folder under my Inbox that had sync failures when I used Outlook on two different machines at the same time.)

      But in my Internet Calendars.pst, there is no sync failures folder -- nor anything else. The only folder there is my google calendar, and it says its size is about 3MB. When I look in Windows Explorer, the .pst is over 200MB. When I go back into Outlook and right-click > Properties > Advanced > CompactNow, the .pst is reduced to about 140MB -- but within a few hours it's back to 200+MB again.

      I have reset the Send/Receive groups in outlook, such that Internet Calendars are only updated a couple of times per day, and this has slowed the growth of the file.

      But I can't figure out how to further reduce the mess, because I can't see what the mess is.

      You have any more thoughts?

      Delete
  19. How you figured that out, I have not idea... but well done. Thanks!

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. thank you, thank you and thank you!!!!

    ReplyDelete
  22. Thank you very much ! Couldn't get rid of a phantom event for two years now, now it's gone.

    ReplyDelete
  23. So, after infinite searching over several years, I finally came across a really great workaround for this problem, which (after setup) requires no manual intervention.

    icalfilter.com

    Thumbnail sketch: This brilliant little tool lets you put a filter in between the publisher of your calendar (in my case, Google Calendar) and your Outlook session. On the site, you can add as many filters as you want, based on simple matching criteria. So you can say, "if any element in an event has a label TRIGGER and a value of VALUE=DATE-TIME, then remove that event or that property of the event from the file. Then, you have Outlook subscribe to the filtered version of the file. Presto, Outlook no longer throws any errors.

    The site has its own tutorial, and it took me about 30 minutes to get four different calendars setup in Outlook, with no errors.

    God bless whoever is the kind soul who built and shared this tool!!

    ReplyDelete
  24. Well that was easy. Glad I found found your blog post.

    ReplyDelete
  25. Thank you VERY MUCH!

    ReplyDelete
  26. Worked a treat. Thank you so much.

    ReplyDelete
  27. Worked for me too, thanks!

    ReplyDelete
  28. Thanks for posting this, worked perfectly

    ReplyDelete
  29. Worked!
    Had many errors "Outlook cannot parse the property TRIGGER near line ...". Error occurs due to some corrupt alarm entry format, I ended deleting these entries and setting them up again. Except for one, which wasn't visible in the gmail calender any more but still gave the error in outlook. By your step-by-step instructions I was able to find and delete the entry. Thanks!

    ReplyDelete
  30. Worked well - except on this step
    "Go to calendar.events.delete with the calendar ID and event ID to delete the event"

    Had to exit and renter calendar.events.delete and re-execute. Second time it worked! First time it returned a 401??!

    ReplyDelete
  31. Worked well except on this step...

    calendar.events.delete

    Had to go exit and re-enter then re-execute. Couple of times did the trick. First time got a 401. Now is great. Offending UID has gone!

    ReplyDelete
  32. Thank you Matthias Kraaz. The internet needs more people like you.

    ReplyDelete
  33. Echoing Kevin above: Thanks Matthias!

    ReplyDelete
  34. Echoing Kevin above: Thanks Matthias!

    ReplyDelete
  35. Hi, thanks for your help.
    I think it would also be possible to go directly to events list, insert your email as the calendar ID and use value "true" for "show deleted". This way you can see all the weird stuff created over years, and for every event you can click to link which takes you inside your calendar. if it is the problematic event created by a problem with iphone or incorrectly set up reccurence, it is in fact a deleted event, but this link will anyway take you to settings of the event and you can click "delete". this solves the problem. you do not need any UID or so. for repeating events I suggest to set up the recurrence in google calendar again.

    ReplyDelete
  36. Worked for me. Thank you very much.

    ReplyDelete
  37. Danke Matthias, endlich frei von der blĂśden FM

    ReplyDelete
  38. Just found this. Lifesaver! Thanks, Mattias.

    ReplyDelete
  39. Nice work Matthias.
    Had five errors for ages and couldn´t locate them in the calendar (probably orphans). Got rid of them!

    MANY THANKS !!!!

    ReplyDelete
  40. working through my 100s of errors this way. thanks!

    ReplyDelete
  41. THANK YOU! This problem has been making my life miserable for a couple of years. This fixed it beautifully.

    ReplyDelete
  42. Thank you! Funny how this bug still persists after 3 years.

    ReplyDelete
  43. And your solution continues to be appreciated more than 3 years after you published it - thanks a lot!

    ReplyDelete
  44. Finally got around to to looking into fixing this error as it kept blowing up Outlook 2016 on Windows 10. Awesome, the steps worked great to fix it.

    ReplyDelete
  45. Thanks. I have been trying to cleanup for years. Worked perfectly.

    ReplyDelete
  46. Thank you. I have tried for years to clean up these bad events. I am finally free ;)

    ReplyDelete
  47. Excellent. Very didactic, the rebel VEVENT got squashed!

    ReplyDelete
  48. Hi Matthias,
    first of all thanks a lot for sharing your knowledge with the rest of the world.
    I tried your description above and got as far as to retrieve the entry I was looking for. Unfortunately, there was no ID or status attached to it. Is there a solution for this?
    etag": "\"p33ga5pldu36du0g\"",
    "summary": "xxxx@gmail.com",

    ReplyDelete
    Replies
    1. At which step (API function) did you fail? Assuming you got to calendar.events.list:

      An event starts with "kind: calendar#event". Is that the kind of beast you found? Then it should have an ID. If the ID is missing, it probably is a different kind of beast.

      Delete
    2. The complete result for my search was:
      {
      "kind": "calendar#events",
      "etag": "\"p33ga5pldu36du0g\"",
      "summary": "my-name@gmail.com",
      "updated": "2019-01-01T15:17:06.332Z",
      "timeZone": "Europe/Amsterdam",
      "accessRole": "owner",
      "defaultReminders": [
      {
      "method": "popup",
      "minutes": 30
      }
      ],
      "nextSyncToken": "COCi5q3wzN8CEOCi5q3wzN8CGAU=",
      "items": [
      ]
      }

      which would indicate that we talk about a different kind of beast then. Which also would mean that I have to hope that you can indicate another kind of solution. But from what I saw from the API fields, deletion would require the UID, so, not much hope here.

      Anyway, thanks a lot for your effort to help troubled people.

      Delete
    3. That's an empty list that calendar.events.list returned. You either specified the ID of the wrong calendar or some filter criterion that doesn't match the searched event.

      Delete
  49. Here's the result of a download of my calendar entries:

    BEGIN:VEVENT
    DTSTART;TZID=Europe/Berlin:20181015T100000
    DTEND;TZID=Europe/Berlin:20181015T120000
    EXDATE;TZID=Europe/Berlin:20181015T100000
    RRULE:FREQ=WEEKLY;UNTIL=20181021T215959Z;INTERVAL=1;BYDAY=MO
    DTSTAMP:20190101T154458Z
    UID:7133841651599
    CREATED:20181012T110517Z
    DESCRIPTION:
    LAST-MODIFIED:20181105T103338Z
    LOCATION:Geschw.-Scholl-Pl. 1 (M) - M 118
    SEQUENCE:1
    STATUS:CONFIRMED
    SUMMARY:01076 - Einführung in die Philosophie und Erkenntnistheorie (Thurne
    r)
    TRANSP:OPAQUE
    END:VEVENT

    The UID is the one I used, but it looks different from other entries. As I have only one gmail-account there should be no mistake in the selection of the calendar.

    ReplyDelete
  50. All the other recurring entries have an entry saying "recurrence.ID" which is missing in this specific entry. So it looks as if it is an empty event. Can I delete this one with any other unique identifyer like the etag?

    ReplyDelete
  51. Fantastic - just used this to fix my issues up. Thanks for sharing!

    ReplyDelete
  52. Problem solved - thank you for sharing this! I found that no ID was returned in step 8, but that using calendar.events.delete with the UID found in step 4 did the trick.

    ReplyDelete
  53. thanks, merci & danke!

    ReplyDelete
  54. We are still appreciating this post with the steps to follow. Danke!

    ReplyDelete
  55. I was doing ok until I had to open the file with MS Excel - and it wasn't an option. No amount of searching finds it.

    Please can you help???

    ReplyDelete
    Replies
    1. Use a text editor instead. Use Windows File Explorer to find the file and right-click to open it.

      Delete
  56. Thank you Matthias! I've been struggling with a "ghost" event in my calendar for months. I finally got rid of it and no more Outlook errors! Brilliant!

    ReplyDelete
  57. Thank you so much for posting this! I just resolved my error messages using the hindsight option "In hindsight, you may as well go directly to calendar.events.delete and use your email address for calendarId and the ID from the ICS without @google.com for eventId. But no guarantee." - worked like a charm. Anyone attempting this, please note that the correct ID is located ABOVE the event name in the ics file.

    ReplyDelete
  58. Hi, I'm having trouble with step 6... The link from step 5 sends me to the API reference. I probably need to access the API first, somehow. Do you know if there is an in-browser way to access the API, or do I need to set this all up in python? I'm not very experienced in this, but would really like to get rid of the error message in Outlook.

    ReplyDelete
  59. feel free to disregard my previous question.

    the link for step 5 is indeed outdated, this is the correct link to delete events through the API without setting up a whole interface:

    https://developers.google.com/calendar/v3/reference/events/delete

    ReplyDelete
  60. Great guide, thanks! This has been issue for my for years.

    ReplyDelete
  61. 10 years later this post is still accurate!

    ReplyDelete