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!

41 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. Brilliant! Herzlichen Dank, MK.

    ReplyDelete
  4. 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
  5. Thanks for posting this. Nice to see a solution to this problem!

    ReplyDelete
  6. 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
  7. 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
  8. This worked PERFECTLY! Thanks for solving an annoying problem!

    ReplyDelete
  9. Thank you so much!!!
    Got this problem for months and didnt find any solution 'til now!

    ReplyDelete
  10. It worked great. Thanks so much!

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

    thank you, thank you, thank you!

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

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

    ReplyDelete
  14. 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
  15. Excelent... Matthias.

    Thx 4 sharing this procedure

    ReplyDelete
  16. 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
  17. Thank you! It solved my problem...! :)))

    ReplyDelete
  18. 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
  19. 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
  20. 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
  21. How you figured that out, I have not idea... but well done. Thanks!

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

    ReplyDelete
  23. thank you, thank you and thank you!!!!

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

    ReplyDelete
  25. 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
  26. Well that was easy. Glad I found found your blog post.

    ReplyDelete
  27. Thank you VERY MUCH!

    ReplyDelete