Thank-you, this resolves the final problem 😍
ok thank-you adding the Pages/Chat/Components/MessagesToolbarItem/Default.cshtml allows to see the envelope and link to the chat page; after adding users manually to the database (there appears to be no manager class or application service to manage contacts) then I can send messages to users!
Only problem is now since adding Volo.Chat module SettingsProvider cannot be resolved by DI I think something about the newly included modules is causing issue because works fine without it. Try to get SampleAppService to use ISettingProvider via DI to get any setting from configuration. it will result in error:
Source: SampleAppService_Tests.cs line 17
Duration: 1 sec
Message:
Autofac.Core.DependencyResolutionException : An exception was thrown while activating Volo.Abp.Settings.DefaultValueSettingValueProvider -> Volo.Abp.SettingManagement.SettingStore -> Volo.Abp.SettingManagement.SettingManagementStore.
---- Autofac.Core.DependencyResolutionException : None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.Abp.SettingManagement.SettingManagementStore' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.SettingManagement.ISettingRepository settingRepository' of constructor 'Void .ctor(Volo.Abp.SettingManagement.ISettingRepository, Volo.Abp.Guids.IGuidGenerator, Volo.Abp.Caching.IDistributedCache`1[Volo.Abp.SettingManagement.SettingCacheItem], Volo.Abp.Settings.ISettingDefinitionManager)'.
Stack Trace:
You may need to build and run this test to see links to source files in the stack trace.
ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
ResolvePipeline.Invoke(ResolveRequestContext ctxt)
RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
ResolvePipeline.Invoke(ResolveRequestContext ctxt)
ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
ResolveOperation.ExecuteOperation(ResolveRequest request)
ResolveOperation.Execute(ResolveRequest request)
LifetimeScope.ResolveComponent(ResolveRequest request)
ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
AutofacServiceProvider.GetRequiredService(Type serviceType)
ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
<.ctor>b__1(Type type)
SelectIListIterator`2.ToList()
Enumerable.ToList[TSource](IEnumerable`1 source)
<.ctor>b__0()
Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
Lazy`1.CreateValue()
Lazy`1.get_Value()
SettingValueProviderManager.get_Providers()
SettingProvider.GetOrNullAsync(String name)
SampleAppService.GetAsync()
AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
AuditingInterceptor.ProcessWithNewAuditingScopeAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, ICurrentUser currentUser, IAuditingManager auditingManager, IAuditingHelper auditingHelper, IUnitOfWorkManager unitOfWorkManager)
AuditingInterceptor.ProcessWithNewAuditingScopeAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, ICurrentUser currentUser, IAuditingManager auditingManager, IAuditingHelper auditingHelper, IUnitOfWorkManager unitOfWorkManager)
AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
SampleAppService_Tests.GetAsync() line 19
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
<>c__DisplayClass8_0`3.<EnableInterfaceInterceptors>b__1(ResolveRequestContext ctxt, Action`1 next)
DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
the project is runnable. the Web.Unified host project runs a full website in visual studio 2022 do you get some kind of error?
Derp. I commented out the wrong module; I put back into place the ChatHttpApiModule
and commented out the ChatHttpApiClientModule
module and I'm not receiving the error any longer but I am no longer getting the envelope in the top-menu bar.
Also of concern is after adding the volo.chat module my tests stopped working b/c autofac cannot resolve IsettingRepository for ISettingProvider
DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Volo.Abp.SettingManagement.SettingManagementStore' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.SettingManagement.ISettingRepository settingRepository' of constructor 'Void .ctor(Volo.Abp.SettingManagement.ISettingRepository, Volo.Abp.Guids.IGuidGenerator, Volo.Abp.Caching.IDistributedCache`1[Volo.Abp.SettingManagement.SettingCacheItem], Volo.Abp.Settings.ISettingDefinitionManager)'.
same problem:
[23:07:13 DBG] Found in the cache: pn:R,pk:admin,n:Chat.Messaging [23:07:13 INF] Executing endpoint '/signalr-hubs/chat/negotiate' [23:07:13 INF] Executed endpoint '/signalr-hubs/chat/negotiate' [23:07:13 INF] Request finished HTTP/2 POST https://localhost:44322/signalr-hubs/chat/negotiate?negotiateVersion=1 text/plain;charset=UTF-8 0 - 200 316 application/json 45.1625ms [23:07:13 INF] Request starting HTTP/1.1 GET https://localhost:44322/signalr-hubs/chat?id=XW8bfgnfjiYqTp5yNemUTQ - - [23:07:14 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:f279cf04-7a7d-2338-d915-3a0a2db08bdd,n:Chat.Messaging [23:07:14 DBG] Found in the cache: pn:U,pk:f279cf04-7a7d-2338-d915-3a0a2db08bdd,n:Chat.Messaging [23:07:14 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Chat.Messaging [23:07:14 DBG] Found in the cache: pn:R,pk:admin,n:Chat.Messaging [23:07:14 INF] Executing endpoint '/signalr-hubs/chat' [23:07:14 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }
[23:07:14 ERR] Remote service 'Chat' was not found and there is no default configuration.
Volo.Abp.AbpException: Remote service 'Chat' was not found and there is no default configuration.
at Volo.Abp.Http.Client.RemoteServiceConfigurationDictionary.GetConfigurationOrDefault(String name)
at Volo.Abp.Http.Client.RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(String name)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase
1.RequestAsync[T](ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
at Volo.Chat.Users.ClientProxies.ContactClientProxy.GetTotalUnreadMessageCountAsync()
at lambda_method2536(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
That produces a bundling error, even if i remove the ChatSignalRModule dependsOn
AbpException: Could not find the bundle file '/libs/signalr/browser/signalr.js' for the bundle 'Lepton.Global'!
The addition of ChatModule to my module project also breaks my test project; before it's fine, after, the ISettingProvider is being resolved as NULL in my service class .. so weird.
Project is simple, might be better if you spun up a new proj within your env and add chat module to Host/MyProject.Web.Unified. That's all i did, added a new service and test to test that service. but i can still send sample if that is what you require...
Thank-you for your assistance
Thanks, I guess the command abp add-module Volo.Chat does not add to /host/* modules, only in the /src/* modules. I still do not have access to the NAV alert indicator or the side menu item, but now at least I can see the permission for chat after having added all the depends in my Web.Unified module