Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autofac should be upgraded to 4.9.4 #1751

Closed
real-zony opened this issue Sep 15, 2019 · 0 comments · Fixed by #1756
Closed

autofac should be upgraded to 4.9.4 #1751

real-zony opened this issue Sep 15, 2019 · 0 comments · Fixed by #1756
Assignees
Milestone

Comments

@real-zony
Copy link
Contributor

In the current release, autofac is version 4.9.3, which has some issues with SignalR.
For details, please refer to autofac/Autofac#1017.

public class GatewayManagementController : AbpController
{
    private readonly IHubContext<FrontNotifyHub,IFrontNotifier> _hubContext;

    public GatewayManagementController(IHubContext<FrontNotifyHub,IFrontNotifier> hubContext)
    {
        _hubContext = hubContext;
    }
}

exception:

[17:31:36 ERR] Connection id "0HLPPNPTOKD0T", Request id "0HLPPNPTOKD0T:00000002": An unhandled exception was thrown by the application.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating HospitalMonitor.HttpApi.Controllers.GatewayManagementController. ---> Autofac.Core.Dependen
cyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'HospitalMonitor.HttpApi.Controllers.GatewayMan
agementController' can be invoked with the available services and parameters:
Cannot resolve parameter 'Microsoft.AspNetCore.SignalR.IHubContext`2[HospitalMonitor.HttpApi.SignalR.FrontNotifyHub,HospitalMonitor.HttpApi.SignalR.IFrontNotifier] hubContext'
of constructor 'Void .ctor(Microsoft.AspNetCore.SignalR.IHubContext`2[HospitalMonitor.HttpApi.SignalR.FrontNotifyHub,HospitalMonitor.HttpApi.SignalR.IFrontNotifier])'.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.GetValidConstructorBindings(IComponentContext context, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac
\Core\Activators\Reflection\ReflectionActivator.cs:line 162
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Activ
ators\Reflection\ReflectionActivator.cs:line 120
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:line
 121
   --- End of inner exception stack trace ---
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:line
 135
   at Autofac.Core.Resolving.InstanceLookup.Execute() in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:line 83
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) in
 C:\projects\autofac\src\Autofac\Core\Resolving\ResolveOperation.cs:line 131
   at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Resolving\
ResolveOperation.cs:line 69
   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Resolving\ResolveOp
eration.cs:line 84
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Lifetime\Lifet
imeScope.cs:line 282
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) in C:\projects\autofac\src\Autofac\
ResolutionExtensions.cs:line 1041
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\ResolutionExtensions.
cs:line 877
   at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\ResolutionExtensions.cs:lin
e 347
   at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) in C:\projects\autofac\src\Autofac\ResolutionExtensions.cs:line 331
   at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) in D:\Github\abp\framework\src\Volo.Abp.Autofac\Autofac\Extensions\Depe
ndencyInjection\AutofacServiceProvider.cs:line 69
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
@maliming maliming self-assigned this Sep 15, 2019
@maliming maliming added this to the 0.20 milestone Sep 15, 2019
maliming added a commit that referenced this issue Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants