Unable to Upgrade to Umbraco 8.18.7 Due to "Broken composer dependency" Error
See original GitHub issueWhich Umbraco version are you using? (Please write the exact version, example: 10.1.0)
8.18.7
Bug summary
When upgrading from Umbraco 8.18.5 to EITHER Umbraco 8.18.6 or Umbraco 8.18.7 (the ones with the recent security patches), I get a “Broken composer dependency” error.
Specifics
After I upgrade the Umbraco NuGet packages, I attempt to run the site but I get a YSOD with the following error shown on screen when I attempt to visit /umbraco/
(probably all other URLs too, but I didn’t try):
Server Error in '/' Application.
Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
-> System.Exception: Broken composer dependency: MyProject.UmbracoCms.Core.uSync.Publishers.SignalRFix.Composer -> uSync.Publisher.uSyncPublishComposer.
at Umbraco.Core.Composing.Composers.GatherRequirementsFromAfterAttribute(Type type, ICollection`1 types, IDictionary`2 requirements, Boolean throwOnMissing) in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 334
at Umbraco.Core.Composing.Composers.GetRequirements(Boolean throwOnMissing) in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 189
at Umbraco.Core.Composing.Composers.PrepareComposerTypes() in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 108
at Umbraco.Core.Composing.Composers.Compose() in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 86
at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 198
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Umbraco.Core.Exceptions.BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
-> System.Exception: Broken composer dependency: MyProject.UmbracoCms.Core.uSync.Publishers.SignalRFix.Composer -> uSync.Publisher.uSyncPublishComposer.
at Umbraco.Core.Composing.Composers.GatherRequirementsFromAfterAttribute(Type type, ICollection`1 types, IDictionary`2 requirements, Boolean throwOnMissing) in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 334
at Umbraco.Core.Composing.Composers.GetRequirements(Boolean throwOnMissing) in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 189
at Umbraco.Core.Composing.Composers.PrepareComposerTypes() in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 108
at Umbraco.Core.Composing.Composers.Compose() in D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:line 86
at Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) in D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:line 198
Of note is that I recently upgraded to Umbraco 8.18.15 and I didn’t encounter this issue then, so it seems like it was something introduced pretty recently (maybe even the security patches themselves).
FYI, the class from the top of the error details above looks like this:
using Umbraco.Core;
using Umbraco.Core.Composing;
using uSync.Publisher;
using uSync.Publisher.Publishers;
namespace MyProject.UmbracoCms.Core.uSync.Publishers.SignalRFix
{
[ComposeAfter(typeof(uSyncPublishComposer))]
public class Composer : IComposer
{
public void Compose(Composition composition)
{
composition.RegisterUnique<USyncServerHubConnectionFactory>();
composition
.WithCollectionBuilder<SyncStepPublisherCollectionBuilder>()
.Exclude<SyncRealtimePublisher>();
}
}
}
The upgrade actually works if I change that ComposeAfter
attribute to [ComposeAfter(typeof(uSyncPublishComposer), true)]
(I don’t actually fully understand the implications of this change). I can then revert that change after I run through the Umbraco upgrade process and the site works fine. However, I don’t want to have to do this each time I upgrade Umbraco, so a long term fix would be ideal.
Steps to reproduce
In theory, you should be able to create this issue by following these steps:
- Install Umbraco 8.18.5.
- Run through the install process to make sure it’s fully installed.
- Install uSync 8.10.6 (see screenshot below for more potential uSync packages to install).
- Create the
Composer
class like below. - Attempt to upgrade Umbraco 8.18.7 (or 8.18.6).
- You should see the YSOD with the “Broken composer dependency” error.
Here are all the uSync NuGet packages I have installed for reference:

Here is the Composer
class:
using Umbraco.Core;
using Umbraco.Core.Composing;
using uSync.Publisher;
using uSync.Publisher.Publishers;
namespace MyProject.UmbracoCms.Core.uSync.Publishers.SignalRFix
{
[ComposeAfter(typeof(uSyncPublishComposer))]
public class Composer : IComposer
{
public void Compose(Composition composition)
{
// Probably doesn't matter what's in this method.
}
}
}
Expected result / actual result
I would expect that composers would not cause issues during an Umbraco upgrade, but the actual result is that this composer does cause an issue during an Umbraco upgrade (though, strangely, not outside of the upgrade process).
Issue Analytics
- State:
- Created 5 months ago
- Comments:7 (6 by maintainers)
I think @kjac is right
IUserComposer
has a runtime level restriction on it, so the composers are only added when the level is run.Awesome 👍 glad we figured out a solution. It seems curious that the uSync composers aren’t marked with an explicit runtime, since it really does seem like they’re utilizing one. Perhaps Kevin did some other registration magic somewhere. Or maybe
IUserComposer
is considered only for runtime level in V8, I truly don’t remember 😄I’ll go ahead and close this issue now. Thanks again for reporting 👏