This project is read-only.

[1.9.1] A tenant could not be started & null exception


On Orchard 1.9.1 with latest commits of both Combinator (f9afb20278e8) & Helpful Libraries (1d415cb8fb4b), when Combinator is enabled I get constantly "A tenant could not be started" error.

Very simple steps

1) Fresh install of Orchard 1.9.1
2) Enable Combinator
3) Same error logged on every app start (every time app is restarted and frontend page refreshed)
2015-07-10 17:37:52,953 [6] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
Autofac.Core.DependencyResolutionException: An exception was thrown while executing a resolve operation. See the InnerException for details. ---> Object reference not set to an instance of an object. (See inner exception for details.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.Environment.WorkContextAccessor.HttpContextScopeImplementation..ctor(IEnumerable`1 events, ILifetimeScope lifetimeScope, HttpContextBase httpContext, Object workContextKey) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\WorkContextAccessor.cs:line 88
   at Orchard.Environment.WorkContextAccessor.CreateWorkContextScope(HttpContextBase httpContext) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Environment\WorkContextAccessor.cs:line 49
   at Orchard.Mvc.MvcModule.HttpContextBaseFactory(IComponentContext context) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Mvc\MvcModule.cs:line 54
   at Orchard.Mvc.MvcModule.RequestContextFactory(IComponentContext context) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Mvc\MvcModule.cs:line 80
   at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.<Register>b__f(IComponentContext c, IEnumerable`1 p)
If combinator is disabled, error is no longer produced. I'm not observing any disruption in service, only the log entry.


Piedone wrote Jul 10, 2015 at 5:21 PM

This suspiciously looks like a new 1.9.1 bug, see:

PacmanDave wrote Jul 30, 2015 at 8:53 PM

I am running into the same thing. However, it isn't just in the logs, but also causes a YSOD until I disable Combinator. I was not seeing this issue with the latest version of combinator until I updated to the latest version of Orchard. Therefore, it is definitely something that broke in the core.

Xeevis wrote Aug 28, 2015 at 3:09 PM

@Piedone you were right, issue appears to be fixed in both 1.9.x and dev branches of Orchard now.