Outlookgooglecalendarsync: Unable to reclaim orphan calendar entries in Outlook calendar - System.NullReferenceException

Created on 26 Mar 2019  路  20Comments  路  Source: phw198/OutlookGoogleCalendarSync

:package: Hotfix is posted on this comment.

OGCS Version: v2.7.8.0
Installed or Portable: Installed

Problem Description
O->G works fine, G->O bombs out
"System.NullReferenceException: Object reference not set to an instance of an object."

Steps to Reproduce the Issue
Happens every sync.

Any other information
Originally working fine - not clear what triggered the problem. Relevant extract from log attached.

OGcalsync - extract.log

2019-03-26 00:01:11,568 DEBUG  9 OutlookGoogleCalendarSync.Console [0] -  Checking for orphaned items...
2019-03-26 00:01:12,440 ERROR  9 OutlookGoogleCalendarSync.Console [0] -  Unable to reclaim orphan calendar entries in Outlook calendar.
2019-03-26 00:01:13,034 DEBUG  9 OutlookGoogleCalendarSync.Console [0] -  The following error was encountered during sync:-
2019-03-26 00:01:13,034 ERROR  9 OutlookGoogleCalendarSync.OGCSexception [0] -  System.NullReferenceException: Object reference not set to an instance of an object.
2019-03-26 00:01:13,034 ERROR  9 OutlookGoogleCalendarSync.OGCSexception [0] -  Code: 0x80004003;-2147467261
2019-03-26 00:01:13,034 ERROR  9 OutlookGoogleCalendarSync.OGCSexception [0] -     at OutlookGoogleCalendarSync.Sync.Engine.googleToOutlook(List`1 googleEntries, List`1 outlookEntries, String& bubbleText)
   at OutlookGoogleCalendarSync.Sync.Engine.synchronize()
   at OutlookGoogleCalendarSync.Sync.Engine.<>c__DisplayClass19_0.<Start>b__0(Object o, DoWorkEventArgs args)
2019-03-26 00:01:13,034 ERROR  9 OutlookGoogleCalendarSync.Console [0] -  Object reference not set to an instance of an object.
bug high resolved

All 20 comments

Hi, could you increase the logging level to FINE, reproduce the error and upload the logfile again? Hopefully it will then provide a bit more detail on the calendar item causing the problem...

@phw198
Having the same issue at the moment. Fine logging here:
log.log

@phw198 A further log from me - with ultra-fine. Error doesn't seem related to a specific entry (though I may be misreading the log)
OGcalsync - extract ultra-fine.log

Thanks for the logs and sorry for the delay in getting to them.

Also, as taken from #691 post:

I too experienced a similar issue yesterday when I did a drag / drop of an Outlook calendar item to a new date and time (earlier date). All subsequent sync attempts produced the same error "Unable to reclaim orphan calendar entries in Outlook calendar. Object reference not set to an instance of an object." message until I deleted the items from both Outlook and Google.

Also, log file as uploaded on #701 actually captures the drag/drop action and then subsequent sync failures:

2019-04-02 09:51:45,353 INFO  6 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  Item paste event caught.
2019-04-02 09:51:45,356 DEBUG  6 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  We've got 1 items selected for copy.
2019-04-02 09:51:45,363 DEBUG  6 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  2-4-2019 08:00 => "IT Glue Deployment Guide doornemen (taak in BMS project)"
2019-04-02 09:51:45,427 INFO  6 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  Temporarily removing OGCS properties from copied Outlook appointment item.
2019-04-02 09:51:45,560 DEBUG  6 OutlookGoogleCalendarSync.OutlookOgcs.CustomProperty [0] -  Removed googleEventID property.
2019-04-02 09:51:45,582 DEBUG  6 OutlookGoogleCalendarSync.OutlookOgcs.CustomProperty [0] -  Removed googleCalendarID property.
2019-04-02 09:51:47,656 DEBUG  18 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  Repopulating IDs to original copied Outlook item
2019-04-02 09:51:47,670 DEBUG  18 OutlookGoogleCalendarSync.OutlookOgcs.ExplorerWatcher [0] -  3-4-2019 11:30 => "IT Glue Deployment Guide doornemen (taak in BMS project)"

Looking pretty certain the meta data is getting corrupted on copy/paste - I'll do my best to post a hotfix over the weekend...

Just to give my history from the other issue:

701

02-04:
Experienced this error since today. Tried the following:
Disconnect and reconnect Gmail, no luck.
Tried finding if there was a corrupted appointment, not found.
Tried on two different machines, both same error.

05-04:
Started working again all of the sudden today on my laptop. Haven't changed anything as far as settings/OGCS goes.
Might be because a faulty appointment has expired, not sure.
Will try on my other PC when I get home and will report back.

Just got home and my sync is also working on my home PC.
So it just seemed to have resolved itself somehow...

:package: Please could you try with v2.7.8.1.zip (see instructions for applying).

This should prevent the cause of the problem from happening again (a bug with click and dragging an Outlook appointment, or copy-and-pasting an appointment).

However, it won't fix items that _already_ have the problem, but it will now report which item(s) cause the sync to fail - these will need to be manually recreated.

Appears to have corrected the problem, I tried a number of combinations, both ways, (move on Outlook, then sync, move on Google, then sync), with drag and drop of event(s). All seemed to work just fine!!

I had no failures of "existing" items that already have the problem as I had already corrected the one that failed last week a few days ago.

The issue above seems to have resolved with the hotfix. However, it appears that a previous issue is back where items some that were successfully synced/created in Google by O->G are then attempted to be deleted by G->O in Outlook immediately thereafter.

Seems similar to the previous #688.

@Omnimercador can you reproduce that on brand new calendar items, or is v2.7.8.1 trying to remove items that you may have copied and pasted/clicked and dragged whilst using v2.7.8.0?

i have tried to install the hotfix with the applying instructions given by you but the version in the About tab shows the old version v2.7.8.0 instead of v2.7.8.1 and also the problem has not been solved.

If I do a complete new installation from scratch, will that work?

@Omnimercador can you reproduce that on brand new calendar items, or is v2.7.8.1 trying to remove items that you may have copied and pasted/clicked and dragged whilst using v2.7.8.0?

I created a new appointment in Outlook post hotfix application (no dragging/updating/...). O->G synced fine. OGCS that started syncing G->O and requested deletion. I denied the deletion request.

I tried to see what happens after: nothing. It doesn't pick up any discrepancies O->G in next sync run, or on G->O. Not sure whether that is a function of the previously denied deletion request, but the total number of entries on both side are reporting equal.

@patrickverzijden One can only assume you didn't extract the hotfix OutlookGoogleCalendarSync.exe file over the top of your installed v2.7.8.0 file. Installing from scratch won't achieve anything aside from ensure you run v2.7.8.0; applying a hotfix is a process distinct from installation/upgrade, hence the instructions on how to apply a hotfix.

@Omnimercador Doesn't feel like what you're experiencing now is related to this issue, though could be due to previous click-and-drag items causing strange behaviour. Could you

  • Restart OGCS
  • Set the sync window to a single day (0 days in future and past)
  • Set logging to FINE
  • Create an Outlook item and sync to reproduce the problem
  • Upload your log file

How can I get the hotfix? I'm not able to use the application because of this error.

By scrolling up?

Thanks Paul. That fixed the problem!

Also reported as fixed on #422

Was this page helpful?
0 / 5 - 0 ratings