Copied to clipboard

Flag this post as spam?

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


  • Anders Brohäll 295 posts 561 karma points c-trib
    May 02, 2013 @ 12:02
    Anders Brohäll
    0

    Upgrading from 6.0.0 to 6.0.5: Sequence contains more than one matching element

    Hi,

    I tried to upgrade a site from 6.0.0 to 6.0.5.
    The installer seemed to do it's job, and the site seemed to be working as expected.

    However, when logging in to the /umbraco backend, after posting the username/password i get a error telling me 

     

    Sequence contains more than one matching element

     

    [InvalidOperationException: Sequence contains more than one matching element]
       System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source, Func`2 predicate) +4140586
       Umbraco.Core.PluginManager.UpdateCachedPluginsFile(IEnumerable`1 typesFound, TypeResolutionKind resolutionType) +381
       Umbraco.Core.PluginManager.LoadViaScanningAndUpdateCacheFile(TypeList typeList, TypeResolutionKind resolutionKind, Func`1 finder) +238
       Umbraco.Core.PluginManager.ResolveTypes(Func`1 finder, TypeResolutionKind resolutionType, Boolean cacheResult) +1357
       umbraco.BusinessLogic.Actions.Action.RegisterIActionHandlers() +131
       umbraco.BusinessLogic.Actions.Action.ReRegisterActionsAndHandlers() +316
    
    [TypeInitializationException: The type initializer for 'umbraco.BusinessLogic.Actions.Action' threw an exception.]
       umbraco.BusinessLogic.Actions.Action.GetJavaScriptFileReferences() +0
       umbraco.cms.presentation._umbraco.RenderActionJS() +83
       umbraco.cms.presentation._umbraco.Page_Load(Object sender, EventArgs e) +1706
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +19
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

     

    After searching the forums and google'ing a bit, there seems to be various reasons for the error. 

    For one, the upgrade script was corrupted in 6.0.1 - but should be fixed in 6.0.2. Also, i cannot see any dropped, nor duplicated properties. Another suggestion is file access rights. I've tried to set Full access to Everyone, so i'm pretty sure that's not the issue either. Also there are some indications that a seperate app-pool is preferred. 

    The site runs on IIS 7.5, a seperate app-pool that runs framework 4.0

    The stacktrace tells us that UpdateCachedPluginsFile is the method initiating the SingleOrDefault call. 

    I've got four plugins installed:

    • Desktop Media Uploader (2.0.5)
    • Terabyte Permanent Redirect (1.1)
    • Digibiz Advanced Media Picker (2.0)
    • Umbraco Contour (3.0.7)
    Is anyone of those incompatible with 6.0.5?
    What could be the problem?
    Hor do i solve it?

  • Anders Brohäll 295 posts 561 karma points c-trib
    May 02, 2013 @ 14:56
    Anders Brohäll
    100

    Ok...

    Well i rolled back the installation, reverted all the files and rolled back the database.
    However the problem remained (wich was mighty wierd since a test server worked - with the same database).

    It turned out that for some reason the ~\App_Data\TEMP\PluginCache files got stuck. Removing them solved the problem.

    I ran the upgrade again, and it worked fine this time around. 

    Come to think about it i refreshed the last step of the installation wizard the first try. I recalled in Visual studio that web.config got rewritten before AND after the refresh. I had lunch with @enkelmedia who for some reason told me (not related to solving this problem) that the installation of plugins doesn't overwrite lines i config files, but rather adds them. I assume that my problem is related to that. Wether or not that is correct, my site works now, and im happy again.

Please Sign in or register to post replies

Write your reply to:

Draft