aluxnimm / outlookcaldavsynchronizer

Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
GNU Affero General Public License v3.0
922 stars 97 forks source link

ERROR index Out of Range #371

Open ZieddenCoding opened 1 year ago

ZieddenCoding commented 1 year ago

Hi, My Setup Windows 10 with Outlook 2019 (Orginal buy from Microsoft) I will sync with the newest sogo Groupware (SOGo 5.5.1) for ubuntu.

if i would sync my calendar then become i this error:

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ProfileName>Sogo (Persönlicher Kalender)</ProfileName>
  <ProfileId>1845869a-eaf5-42b0-ba6e-cfc87a8ca3f8</ProfileId>
  <StartTime>2022-11-01T21:32:00.885508Z</StartTime>
  <ADelta>Unchanged: 0 , Added: 0 , Deleted 0 ,  Changed 0</ADelta>
  <BDelta>Unchanged: 0 , Added: 1 , Deleted 0 ,  Changed 0</BDelta>
  <AJobsInfo>Create 0 , Update 0 , Delete 0</AJobsInfo>
  <BJobsInfo>Create 0 , Update 0 , Delete 0</BJobsInfo>
  <LoadErrors>
    <LoadError>
      <EntityId>/SOGo/dav/nico.zieten/Calendar/personal/1EA2-635ED180-7-76CB1280.ics</EntityId>
      <Error>System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er darf nicht negativ und kleiner als die Sammlung sein.
Parametername: index
   bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   bei CalDavSynchronizer.Implementation.CalDavRepository`1.DeserializeCalendar(String iCalData, IStringSerializer calendarSerializer)
   bei CalDavSynchronizer.Implementation.CalDavRepository`1.TryDeserializeCalendar(String iCalData, IICalendar&amp; calendar, WebResourceName uriOfCalendarForLogging, IStringSerializer calendarSerializer, ILoadEntityLogger logger)</Error>
      <IsAEntity>false</IsAEntity>
      <IsWarning>false</IsWarning>
    </LoadError>
  </LoadErrors>
  <EntitySynchronizationReports />
  <ConsiderExceptionThatLeadToAbortionAsWarning>false</ConsiderExceptionThatLeadToAbortionAsWarning>
  <Duration>00:00:01.1114498</Duration>
</SynchronizationReport>

this is the 1EA2-635ED180-7-76CB1280.ics:

BEGIN:VCALENDAR
PRODID:-//Inverse inc./SOGo 5.5.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Etc/UTC
LAST-MODIFIED:20191023T183905Z
X-LIC-LOCATION:Etc/UTC
BEGIN:STANDARD
TZNAME:UTC
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:1EA2-635ED180-7-76CB1280
SUMMARY:testtermin
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART;TZID=Etc/UTC:20221101T203000
DTEND;TZID=Etc/UTC:20221101T213000
CREATED:20221030T193331Z
DTSTAMP:20221030T193331Z
LAST-MODIFIED:20221030T193331Z
END:VEVENT
END:VCALENDAR

whats my misstake.

Sorry for the bad english im a german potato ;-D

hannibal218bc commented 1 year ago

After upgrading Ubuntu from 20.04 to 22.04, and hence SOGo to 5.5.1 as you mentioned, I run into the same issue. I tried to delete some of the affected events, but I'm not able to detect any similarity between events affected.

This is one of the events:

BEGIN:VCALENDAR
PRODID:-//dmfs.org//mimedir.icalendar//EN
VERSION:2.0
BEGIN:VEVENT
DTSTART;VALUE=DATE:20221206
SUMMARY:VW ID.Buzz Bestellstart AT
TRANSP:TRANSPARENT
DTEND;VALUE=DATE:20221207
LAST-MODIFIED:20221124T185546Z
DTSTAMP:20221124T185546Z
CREATED:20221124T185546Z
UID:81923861-1c3b-4652-baa5-013530d4d62a.1669316146869
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT15H
ACTION:DISPLAY
DESCRIPTION:Default Event Notification
X-WR-ALARMUID:770ac706-e4a9-43e3-82fe-8157a45411dc
END:VALARM
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
WebCodePoet commented 1 year ago

Same here, we really need a fix for SoGo Sync!

<synchronizationreport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<profilename>SoGo</profilename>
<profileid>1e461134-1853-4128-96cc-155c2c359889</profileid>
<starttime>2023-03-30T13:31:34.965546Z</starttime>
<adelta>Unchanged: 0 , Added: 0 , Deleted 0 , Changed 1</adelta>
<bdelta>Unchanged: 0 , Added: 1 , Deleted 0 , Changed 1</bdelta>
<ajobsinfo>Create 0 , Update 0 , Delete 0</ajobsinfo>
<bjobsinfo>Create 0 , Update 0 , Delete 0</bjobsinfo>
<loaderrors>
<loaderror>
<entityid>/SOGo/dav/email@domain.de/Calendar/D6DA4-64258E00-D-781E748/040000008200E00074C5B7101A82E00800000000E0DACE2F1C63D9010000000000000000100000003DF23839FB539B4A9B63629BED41F92A.ics</entityid>
<error>System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er darf nicht negativ und kleiner als die Sammlung sein.
Parametername: index
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei CalDavSynchronizer.Implementation.CalDavRepository1.DeserializeCalendar(String iCalData, IStringSerializer calendarSerializer) bei CalDavSynchronizer.Implementation.CalDavRepository1.TryDeserializeCalendar(String iCalData, IICalendar& calendar, WebResourceName uriOfCalendarForLogging, IStringSerializer calendarSerializer, ILoadEntityLogger logger)</error>
<isaentity>false</isaentity>
<iswarning>false</iswarning>
</loaderror>
<loaderror>
<entityid>/SOGo/dav/email@domain.de/Calendar/D6DA4-64258E00-D-781E748/D6DA5-64258E80-B-75671F80.ics</entityid>
<error>System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er darf nicht negativ und kleiner als die Sammlung sein.
Parametername: index
bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bei CalDavSynchronizer.Implementation.CalDavRepository1.DeserializeCalendar(String iCalData, IStringSerializer calendarSerializer) bei CalDavSynchronizer.Implementation.CalDavRepository1.TryDeserializeCalendar(String iCalData, IICalendar& calendar, WebResourceName uriOfCalendarForLogging, IStringSerializer calendarSerializer, ILoadEntityLogger logger)</error>
<isaentity>false</isaentity>
<iswarning>false</iswarning>
</loaderror>
</loaderrors>
<entitysynchronizationreports>
<considerexceptionthatleadtoabortionaswarning>false</considerexceptionthatleadtoabortionaswarning>
<duration>00:00:00.7022509</duration>
</entitysynchronizationreports></synchronizationreport>
aluxnimm commented 1 year ago

And what is the content of /SOGo/dav/email@domain.de/Calendar/D6DA4-64258E00-D-781E748/D6DA5-64258E80-B-75671F80.ics ?

This error means that our library didn't parse any vevent at all, which shouldn't happen actually.

WebCodePoet commented 1 year ago

Hello @aluxnimm, I do not understand what you mean with "whats the content", it is a calender with 2680 Entries. Sync with caldav on macos works.

hannibal218bc commented 1 year ago

Hi @aluxnimm ,

I have about 60 items in my calendar that constantly raise this exception. I'll attach one of the files linked in the exception report. There is one file linked in above ( https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/371#issuecomment-1330231955 ) , but lets try another one: CALsync.txt

Thanks!

aluxnimm commented 1 year ago

And the error triggers every sync run with the same events or different random ones?

WebCodePoet commented 1 year ago

Every sync, I tried different calenders, different Events, i even reinstalled sogo. It’s Not possible to sync

hannibal218bc commented 1 year ago

And the error triggers every sync run with the same events or different random ones?

Yes, there's always "60 load errors" and "1 entity sync error", with every sync. The order of the events logged seems to be random, but it's always the same 60 EntityIds in the file.

The entity sync error is:

System.FormatException: The format of value '"gcs00000000"' is invalid.
   at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
   at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(String name, HeaderStoreItemInfo info, String value)
   at System.Net.Http.Headers.HttpHeaders.Add(String name, String value)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<ExecuteWebDavRequest>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

However, there is no occurence of the token gcs0000 ... in the linked file...

If it helps, I do have Visual Studio workspace set up with the project and am able to inject a custom-built DLL into Outlook. I just don't have a clue how do something useful with that... yet? :-) I'm happy to help hunt down this problem, just don't know where or how to start... thanks!

WebCodePoet commented 1 year ago

Hello again, because I can not see any progress, I just can not sync.

This deals again with the Calendar, the Contacts sync seems to be working as expected.

What is working? I can create an event in Outlook, and it gets written into SoGo.

What is not working? I create an event in SoGo, and it does not get written in to Outlook.

<?xml version="1.0" encoding="utf-16"?>
<SynchronizationReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ProfileName>Kalender</ProfileName>
  <ProfileId>910e80be-cbd0-4ccc-b2f1-e8bccaff7015</ProfileId>
  <StartTime>2023-04-25T18:17:36.6930868Z</StartTime>
  <ADelta>Unchanged: 1 , Added: 0 , Deleted 0 ,  Changed 0</ADelta>
  <BDelta>Unchanged: 0 , Added: 1 , Deleted 0 ,  Changed 1</BDelta>
  <AJobsInfo>Create 0 , Update 0 , Delete 0</AJobsInfo>
  <BJobsInfo>Create 0 , Update 0 , Delete 0</BJobsInfo>
  <LoadErrors>
    <LoadError>
      <EntityId>/SOGo/dav/mail@domain.com/Calendar/5618CE8B-8670-42EE-BCDC-0FEAD0F4D490/CE2-64481980-1-20EF6DC0.ics</EntityId>
      <Error>System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at CalDavSynchronizer.Implementation.CalDavRepository`1.DeserializeCalendar(String iCalData, IStringSerializer calendarSerializer)
   at CalDavSynchronizer.Implementation.CalDavRepository`1.TryDeserializeCalendar(String iCalData, IICalendar&amp; calendar, WebResourceName uriOfCalendarForLogging, IStringSerializer calendarSerializer, ILoadEntityLogger logger)</Error>
      <IsAEntity>false</IsAEntity>
      <IsWarning>false</IsWarning>
    </LoadError>
    <LoadError>
      <EntityId>/SOGo/dav/mail@domain.com/Calendar/5618CE8B-8670-42EE-BCDC-0FEAD0F4D490/040000008200E00074C5B7101A82E0080000000050FAA41FB277D901000000000000000010000000A8D6331CC1DAAE418505E2551AE0DDA7.ics</EntityId>
      <Error>System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at CalDavSynchronizer.Implementation.CalDavRepository`1.DeserializeCalendar(String iCalData, IStringSerializer calendarSerializer)
   at CalDavSynchronizer.Implementation.CalDavRepository`1.TryDeserializeCalendar(String iCalData, IICalendar&amp; calendar, WebResourceName uriOfCalendarForLogging, IStringSerializer calendarSerializer, ILoadEntityLogger logger)</Error>
      <IsAEntity>false</IsAEntity>
      <IsWarning>false</IsWarning>
    </LoadError>
  </LoadErrors>
  <EntitySynchronizationReports />
  <ConsiderExceptionThatLeadToAbortionAsWarning>false</ConsiderExceptionThatLeadToAbortionAsWarning>
  <Duration>00:00:00.3402618</Duration>
</SynchronizationReport>