Copied to clipboard

Flag this post as spam?

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


  • Tom Steer 161 posts 596 karma points
    Apr 12, 2016 @ 15:41
    Tom Steer
    0

    uSync Startup YSOD

    Hey,

    I'm getting an error with uSync at startup after uploading the usync folder to our dev server. The error is:

    Sequence contains more than one matching element
    

    Looking at the log files it comes just after Running Import for DocumentType:

    2016-04-12 16:31:56,782 [P10652/D4/T1] INFO  Jumoo.uSync.BackOffice.Logging - Running Import: DocumentType
     2016-04-12 16:31:57,369 [P10652/D4/T1] ERROR Umbraco.Core.CoreBootManager - An error occurred running OnApplicationStarted for handler Jumoo.uSync.BackOffice.uSyncApplicationEventHandler
    System.InvalidOperationException: Sequence contains more than one matching element
    

    I've tried updating to the latest uSync package and then running a fresh export but still get the same error.

    Slightly separate issue, after the upgrade to the latest uSync packages i've noticed it seemed to delete the content.config for my root node (Home) after doing the full export and doesn't seem to generate it again even if i save and publish the home node.

    Cheers, Tom

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 12, 2016 @ 16:05
    Kevin Jump
    100

    Hi

    could you add debug logging to the server and see if their is any intermediate logs

    if you add

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

    To the logging section of config/log4net.config you shoud get more logging to help us pinpoint the error.

  • Tom Steer 161 posts 596 karma points
    Apr 13, 2016 @ 07:17
    Tom Steer
    0

    Morning Kevin,

    Just added the additional logging and i know get the following:

    2016-04-13 08:05:15,674 [P1572/D2/T1] DEBUG Jumoo.uSync.BackOffice.uSyncApplicationEventHandler - # Import Calling Handler: uSync: ContentTypeHanlder
     2016-04-13 08:05:15,674 [P1572/D2/T1] INFO  Jumoo.uSync.BackOffice.Logging - Running Import: DocumentType
     2016-04-13 08:05:15,674 [P1572/D2/T1] DEBUG Jumoo.uSync.BackOffice.uSyncAction - Getting Actions: for type Umbraco.Core.Models.IContentType from 0 actions, found 0
     2016-04-13 08:05:16,399 [P1572/D2/T1] DEBUG Jumoo.uSync.Core.Serializers.ContentTypeSerializer - TryCreate: Events under Pages
     2016-04-13 08:05:16,427 [P1572/D2/T1] ERROR Umbraco.Core.CoreBootManager - An error occurred running OnApplicationStarted for handler Jumoo.uSync.BackOffice.uSyncApplicationEventHandler
    System.InvalidOperationException: Sequence contains more than one matching element
       at Jumoo.uSync.BackOffice.uSyncApplicationEventHandler.Setup()
       at Jumoo.uSync.BackOffice.uSyncApplicationEventHandler.ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
       at Umbraco.Core.ApplicationEventHandler.OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
       at Umbraco.Core.CoreBootManager.<Complete>b__a(IApplicationEventHandler x)
     2016-04-13 08:05:16,433 [P1572/D2/T1] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.InvalidOperationException: Sequence contains more than one matching element
       at Jumoo.uSync.BackOffice.uSyncApplicationEventHandler.Setup()
       at Jumoo.uSync.BackOffice.uSyncApplicationEventHandler.ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
       at Umbraco.Core.ApplicationEventHandler.OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
       at Umbraco.Core.CoreBootManager.<Complete>b__a(IApplicationEventHandler x)
       at Umbraco.Core.EnumerableExtensions.ForEach[TItem](IEnumerable`1 items, Action`1 action)
       at Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete)
       at Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete)
       at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
       at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)
    

    Cheers,

    Tom

  • Tom Steer 161 posts 596 karma points
    Apr 13, 2016 @ 07:21
    Tom Steer
    0

    Morning Kevin... Me again lol

    I just removed the data folder temporally just so i could get into Umbraco and i noticed there was an empty Events doctype which there should only be an Events Folder, so not sure if this was human error or an issue with one of previous version of uSync. Anyhow after deleting that and putting the data folder back in it all worked okay :D

    Thanks for getting back to me so quickly though.

    Cheers,

    Tom

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 13, 2016 @ 07:23
    Kevin Jump
    0

    no worries,

    but just so i can track it down (and at least not have it YSOD) I am guessing

    you have a folder called pages, with another folder called events in it ? and before the error you also had a doctype called events in the same pages folder ?

    If that's true I am reasonably confident I can recreate and then fix that.

    Kevin

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Apr 13, 2016 @ 07:43
    Kevin Jump
    1

    Hi

    For reference, I think i have fixed this (so it doesn't happen when their is a doctype/datatype/mediatype with the same name as a folder).

    https://github.com/KevinJump/uSync/commit/72d78163dea51dbd4dddc9a20c1307ce49563dc0

    I will bundle it up in the next release.

    Kevin

  • Tom Steer 161 posts 596 karma points
    Apr 13, 2016 @ 07:58
    Tom Steer
    0

    Hi Kevin,

    Yeah thats correct:

    Pages (Folder)
        Events (Folder)
        Events (DocType - Although not sure where this came from as i don't recall creating it and it was just blank)
    

    Thanks,

    Tom

Please Sign in or register to post replies

Write your reply to:

Draft