[GH-ISSUE #375] ERROR: System.Xml.XmlException: '', hexadecimal value 0x1A, is an invalid character #358

Closed
opened 2026-02-25 20:31:28 +03:00 by kerem · 2 comments
Owner

Originally created by @andrea-dintino on GitHub (Jan 4, 2023).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/375

Hi @aluxnimm,

I've been getting this for a while now:

<?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>andrea@dyne.org</ProfileName>
  <ProfileId>0f9f6fc6-5cc1-400f-98e9-d8ab8a34c232</ProfileId>
  <StartTime>2023-01-04T09:28:43.3949323Z</StartTime>
  <ADelta>Unchanged: 0 , Added: 0 , Deleted 0 ,  Changed 0</ADelta>
  <BDelta>Unchanged: 0 , Added: 91 , Deleted 0 ,  Changed 0</BDelta>
  <AJobsInfo>Create 0 , Update 0 , Delete 0</AJobsInfo>
  <BJobsInfo>Create 0 , Update 0 , Delete 0</BJobsInfo>
  <LoadErrors />
  <EntitySynchronizationReports />
  <ExceptionThatLeadToAbortion>System.Xml.XmlException: '&#x1A;', hexadecimal value 0x1A, is an invalid character. Line 4547, position 38.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at CalDavSynchronizer.DataAccess.WebDavClientBase.DeserializeXmlStream(Stream webDavXmlStream)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.Implementation.CalDavRepository`1.&lt;Get&gt;d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GenSync.Synchronization.EntityContainer`4.&lt;GetEntities&gt;d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`11.&lt;Synchronize&gt;d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at GenSync.Synchronization.Synchronizer`11.&lt;Synchronize&gt;d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GenSync.Synchronization.ContextCreatingSynchronizerDecorator`7.&lt;Synchronize&gt;d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.Scheduling.SynchronizationProfileRunner.&lt;RunAndRescheduleNoThrow&gt;d__22.MoveNext()</ExceptionThatLeadToAbortion>
  <ConsiderExceptionThatLeadToAbortionAsWarning>false</ConsiderExceptionThatLeadToAbortionAsWarning>
  <Duration>00:00:01.2239073</Duration>
</SynchronizationReport>

My guess is that somewhere in some NextCloud Calendar entry there is an illegal character "&#x1A", but I have no clue how to search for it?

thanks,
Andrea

Originally created by @andrea-dintino on GitHub (Jan 4, 2023). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/375 Hi @aluxnimm, I've been getting this for a while now: ``` <?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>andrea@dyne.org</ProfileName> <ProfileId>0f9f6fc6-5cc1-400f-98e9-d8ab8a34c232</ProfileId> <StartTime>2023-01-04T09:28:43.3949323Z</StartTime> <ADelta>Unchanged: 0 , Added: 0 , Deleted 0 , Changed 0</ADelta> <BDelta>Unchanged: 0 , Added: 91 , Deleted 0 , Changed 0</BDelta> <AJobsInfo>Create 0 , Update 0 , Delete 0</AJobsInfo> <BJobsInfo>Create 0 , Update 0 , Delete 0</BJobsInfo> <LoadErrors /> <EntitySynchronizationReports /> <ExceptionThatLeadToAbortion>System.Xml.XmlException: '&#x1A;', hexadecimal value 0x1A, is an invalid character. Line 4547, position 38. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ParseText(Int32&amp; startPos, Int32&amp; endPos, Int32&amp; outOrChars) at System.Xml.XmlTextReaderImpl.FinishPartialValue() at System.Xml.XmlTextReaderImpl.get_Value() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at CalDavSynchronizer.DataAccess.WebDavClientBase.DeserializeXmlStream(Stream webDavXmlStream) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.&lt;ExecuteWebDavRequestAndReadResponse&gt;d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.CalDavDataAccess.&lt;GetEntities&gt;d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Implementation.CalDavRepository`1.&lt;Get&gt;d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.Synchronization.EntityContainer`4.&lt;GetEntities&gt;d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`11.&lt;Synchronize&gt;d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at GenSync.Synchronization.Synchronizer`11.&lt;Synchronize&gt;d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.Synchronization.ContextCreatingSynchronizerDecorator`7.&lt;Synchronize&gt;d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Scheduling.SynchronizationProfileRunner.&lt;RunAndRescheduleNoThrow&gt;d__22.MoveNext()</ExceptionThatLeadToAbortion> <ConsiderExceptionThatLeadToAbortionAsWarning>false</ConsiderExceptionThatLeadToAbortionAsWarning> <Duration>00:00:01.2239073</Duration> </SynchronizationReport> ``` My guess is that somewhere in some NextCloud Calendar entry there is an illegal character "&#x1A", but I have no clue how to search for it? thanks, Andrea
kerem closed this issue 2026-02-25 20:31:28 +03:00
Author
Owner

@brrrrrrrt commented on GitHub (Jan 12, 2023):

+1 same, but '0x14'

unable to synchronize :(

<!-- gh-comment-id:1380246863 --> @brrrrrrrt commented on GitHub (Jan 12, 2023): +1 same, but '0x14' unable to synchronize :(
Author
Owner

@aluxnimm commented on GitHub (Feb 18, 2023):

You need to export the whole calendar as an ics file from the server, open with notepad++ and find that invalid characters.
We will hopefully fix the issue and filter our invalid xml characters in our next release.

<!-- gh-comment-id:1435643718 --> @aluxnimm commented on GitHub (Feb 18, 2023): You need to export the whole calendar as an ics file from the server, open with notepad++ and find that invalid characters. We will hopefully fix the issue and filter our invalid xml characters in our next release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#358
No description provided.