Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • P.J. Melies 18 posts 108 karma points
    Jan 10, 2020 @ 23:46
    P.J. Melies
    0

    Import results in error - Unexpected character encountered while parsing value

    We're using uSync ((uSync.BackOffice 4.0.14.0) (uSync.Core 6.0.14.0) [uSync.Content: 4.1.8.0]) on an Umbraco 7.15.3 site. Our intention is to allow our editor to make back office changes in our dev environment and then use uSync to migrate those edits into our test environment (and ultimately to prod if this works out).

    We've turned off import on start.

    When we migrate the updated uSync files from the dev environment to the test environment and run the Report to see the changes it correctly picks up the changes to be applied. However, when we Import (either just the changes or a full import) the following error is being thrown:

    "Error: An error has occurred. - Unexpected character encountered while parsing value: <. Path '', line 0, position 0."

    Something is having trouble parsing the JSON in the uSync files. I can post a full call stack if necessary.

    Does anyone know what might be the issue? This is a relatively new site - we're not dealing with 2 separate databases with huge content/data type differences between them.

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Jan 11, 2020 @ 07:54
    Kevin Jump
    0

    Hi,

    can you isolate which .config file is causing the issue?

    if not first try turning logging up by adding the following to the log4net.config file

    <logger name="Jumoo.uSync">
      <level value="DEBUG" />
    </logger>
    

    if you can, feel free to post that file. As you say it's probably a bit of JSON parsing somewhere - but if we can isolate it - we should be able to fix it quicker.

  • P.J. Melies 18 posts 108 karma points
    Jan 13, 2020 @ 22:01
    P.J. Melies
    0

    Hi Kevin,

    I've set the Jumoo namespace to DEBUG logging as indicated and re-ran the import. Here's the call stack from the log.

     2020-01-13 14:12:39,107 [P6808/D2/T14] INFO  Jumoo.uSync.BackOffice.Logging - Handler Import Complete: 0 Items 0 changes 0 failures
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - # Handler uSync: MacroHandler Complete (1ms)
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - Handler: uSync: MediaHandler import = True
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - # Import Calling Handler: uSync: MediaHandler
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.Logging - Running Content Import: Media
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncAction - Getting Actions: for type Umbraco.Core.Models.IMedia from 7 actions, found 0
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Media -1
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders -1
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.MediaHandler - Importing Media: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders\media.config -1
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Core.Serializers.MediaSerializer - Using IsNewer Checker
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders\placeholder 1074
     2020-01-13 14:12:39,107 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.MediaHandler - Importing Media: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders\placeholder\media.config 1074
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Core.Serializers.MediaSerializer - Using IsNewer Checker
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders\placeholder-dark 1074
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.MediaHandler - Importing Media: D:\Clients\HeliosWE\Test\uSync\data\Media\placeholders\placeholder-dark\media.config 1074
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Core.Serializers.MediaSerializer - Using IsNewer Checker
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - # Handler uSync: MediaHandler Complete (14ms)
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - Handler: uSync: ContentHandler import = True
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - # Import Calling Handler: uSync: ContentHandler
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.Logging - Running Content Import: Content
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.BackOffice.uSyncAction - Getting Actions: for type Umbraco.Core.Models.IContent from 7 actions, found 0
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Content -1
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Content\home -1
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Importing Content : D:\Clients\HeliosWE\Test\uSync\data\Content\home\content.config -1
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Core.Serializers.ContentSerializer - Using IsNewer Checker
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Import Folder: D:\Clients\HeliosWE\Test\uSync\data\Content\home\publications 1077
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Content.ContentHandler - Importing Content : D:\Clients\HeliosWE\Test\uSync\data\Content\home\publications\content.config 1077
     2020-01-13 14:12:39,122 [P6808/D2/T14] DEBUG Jumoo.uSync.Core.Serializers.ContentSerializer - Using IsNewer Checker
     2020-01-13 14:12:39,153 [P6808/D2/T14] ERROR Jumoo.uSync.BackOffice.Controllers.uSyncApiController - Unhandled controller exception occurred
    Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
       at Newtonsoft.Json.JsonTextReader.ParseValue()
       at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
       at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
       at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
       at Umbraco.Web.PropertyEditors.NestedContentPropertyEditor.NestedContentPropertyValueEditor.ConvertDbToString(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
       at Umbraco.Core.PropertyEditors.PropertyValueEditor.ConvertDbToXml(Property property, PropertyType propertyType, IDataTypeService dataTypeService)
       at Umbraco.Core.Services.EntityXmlSerializer.Serialize(IDataTypeService dataTypeService, Property property)
       at Umbraco.Core.Services.EntityXmlSerializer.Serialize(IDataTypeService dataTypeService, IContentBase contentBase, String nodeName)
       at Umbraco.Core.Services.EntityXmlSerializer.Serialize(IContentService contentService, IDataTypeService dataTypeService, IUserService userService, IContent content, Boolean deep)
       at Umbraco.Core.Services.ContentService.<Save>b__112_0(IContent c)
       at Umbraco.Core.Persistence.Repositories.ContentPreviewRepository`1.PersistNewItem(ContentPreviewEntity`1 entity)
       at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.Commit(Action`1 transactionCompleting)
       at Umbraco.Core.Services.ContentService.Save(IContent content, Boolean changeState, Int32 userId, Boolean raiseEvents)
       at Umbraco.Core.Services.ContentService.Umbraco.Core.Services.IContentServiceOperations.Save(IContent content, Int32 userId, Boolean raiseEvents)
       at Umbraco.Core.Services.ContentService.Save(IContent content, Int32 userId, Boolean raiseEvents)
       at Jumoo.uSync.Core.Serializers.ContentSerializer.DeserializeCore(XElement node, Int32 parentId, Boolean forceUpdate)
       at Jumoo.uSync.Core.Serializers.ContentBaseSerializer`1.Deserialize(XElement node, Int32 parentId, Boolean forceUpdate)
       at Jumoo.uSync.Content.ContentHandler.Import(String filePath, Int32 parentId, Boolean force)
       at Jumoo.uSync.Content.BaseContentHandler`1.ImportFolder(String folder, Int32 parentId, Boolean force, Dictionary`2 updates)
       at Jumoo.uSync.Content.BaseContentHandler`1.ImportFolder(String folder, Int32 parentId, Boolean force, Dictionary`2 updates)
       at Jumoo.uSync.Content.BaseContentHandler`1.ImportFolder(String folder, Int32 parentId, Boolean force, Dictionary`2 updates)
       at Jumoo.uSync.Content.BaseContentHandler`1.ImportAll(String folder, Boolean force)
       at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(IEnumerable`1 syncHandlers, String folder, Boolean checkConfig, Boolean force, String groupName)
       at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(String groupName, String folder, Boolean force)
       at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.ImportAll(String folder, Boolean force)
       at Jumoo.uSync.BackOffice.Controllers.uSyncApiController.Import(Boolean force)
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
    

    If I'm reading the stack correctly then the last Importing Content statement logged before the error was

    Importing Content : D:\Clients\HeliosWE\Test\uSync\data\Content\home\publications\content.config 1077
    

    The content of that file is copied below:

    <?xml version="1.0" encoding="utf-8"?>
    <contentPage guid="d62f0f1d-e4a9-4093-94ae-4efce18872ee" id="1113" nodeName="Publications" isDoc="" updated="2020-01-10T13:44:55.7270000Z" parentGUID="156f1933-e327-4dce-b665-110d62720d03" nodeTypeAlias="contentPage" templateAlias="ContentPage" sortOrder="2" published="true" isBlueprint="false">
      <content><![CDATA[[
      {
        "key": "79b4bf9f-1b4b-48dc-a2c0-4a12969c6b85",
        "name": "Full Width Text: Publication",
        "ncContentTypeAlias": "fullWidthText",
        "itemName": "Publication",
        "paddingTop": "",
        "paddingBottom": "",
        "text": "<p><a data-udi=\"umb://document/69024043c0d14324ab4505e1ea19ae55\" href=\"/{localLink:umb://document/69024043c0d14324ab4505e1ea19ae55}\" title=\"Foster Youth\">Publication</a></p>"
      }
    ]]]></content>
      <heroImage><![CDATA[umb://media/6e1f6abc69684719a26a7aad3b418968]]></heroImage>
      <heroText><![CDATA[Hero]]></heroText>
      <seoPageDescription><![CDATA[Publications]]></seoPageDescription>
      <seoPageTitle><![CDATA[Publications]]></seoPageTitle>
    </contentPage>
    

    I would have zipped up all of the relevant files and attached it to this post but it doesn't look like file attachments are a feature of this forum?

Please Sign in or register to post replies

Write your reply to:

Draft