Open Closed

Chat module integration in AdministrationService in Microservice architecture #2646


User avatar
0
imranStem created

Hello,

I have microservice architecture and I added NuGet packages of chat module in AdministrationService through ABP Suite. The chat module is successfully added to AdministrationService. I run the migration in the Administration service and the chat module's tables are created in the database of the administration service. I also install the npm packages of the chat module in the angular project and configure the routing and module as per documentation.

When I run the project, I am not able to see the enable chat on the setting page. Also, I checked the user's permission and the chat module are not listed. There is no exception in the project but the chat module is not visible on the Angular UI. The endpoints are there in SwaggerUI.

  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

23 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Are you enable the chat feature?

    https://docs.abp.io/en/commercial/latest/modules/chat#manage-chat-feature

  • User Avatar
    0
    imranStem created

    Hi,

    That Enable Chat option is not visible in UI so I cannot enable it. I configured the chat module in AppModule but the chat option is not visible on the setting page.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    The ChatFeatureDefinitionProvider is in Volo.Chat.Domain.Shared package.

  • User Avatar
    0
    imranStem created

    I just googled about the above issue and found that need to enable a chat feature on the manage tenant management host features. I enabled chat features. Now I got the chat icons, Still facing some issues and I am looking into it.

  • User Avatar
    0
    imranStem created

    I enabled the chat module and now I am getting the below exception when I search the contacts.

    2022-02-25 15:07:46.645 +05:30 [ERR] Forbidden
    Volo.Abp.Http.Client.AbpRemoteCallException: Forbidden
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.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.Abp.Identity.ClientProxies.IdentityUserLookupClientProxy.SearchAsync(UserLookupSearchInputDto input)
       at Volo.Abp.Identity.HttpClientExternalUserLookupServiceProvider.SearchAsync(String sorting, String filter, Int32 maxResultCount, Int32 skipCount, CancellationToken cancellationToken)
       at Volo.Abp.Users.UserLookupService`2.SearchAsync(String sorting, String filter, Int32 maxResultCount, Int32 skipCount, CancellationToken cancellationToken)
       at Volo.Chat.Users.ContactAppService.GetContactsAsync(GetContactsInput input)
    
  • User Avatar
    0
    imranStem created

    Also, I have two users but they are not listed in contacts. How to add users in the chat users table.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Can you share the logs of the API website?

  • User Avatar
    0
    imranStem created
    2022-02-28 14:10:56.255 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44301/api/abp/application-configuration - 0 - 200 - application/json;+charset=utf-8 2655.9910ms
    2022-02-28 14:10:56.307 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44301/api/chat/contact/total-unread-message-count - 0
    2022-02-28 14:10:56.315 +05:30 [INF] Executing endpoint 'Volo.Chat.Users.ContactController.GetTotalUnreadMessageCountAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:10:56.318 +05:30 [INF] Route matched with {area = "chat", action = "GetTotalUnreadMessageCount", controller = "Contact", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Int32] GetTotalUnreadMessageCountAsync() on controller Volo.Chat.Users.ContactController (Volo.Chat.HttpApi).
    2022-02-28 14:10:56.362 +05:30 [INF] Executing action method Volo.Chat.Users.ContactController.GetTotalUnreadMessageCountAsync (Volo.Chat.HttpApi) - Validation state: "Valid"
    2022-02-28 14:10:56.378 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:10:56.379 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:10:56.384 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:10:56.384 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:10:56.385 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:10:56.386 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:10:56.424 +05:30 [INF] Executed action method Volo.Chat.Users.ContactController.GetTotalUnreadMessageCountAsync (Volo.Chat.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 61.9164ms.
    2022-02-28 14:10:56.425 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:10:56.425 +05:30 [INF] Executing ObjectResult, writing value of type 'System.Int32'.
    2022-02-28 14:10:56.426 +05:30 [INF] Executed action Volo.Chat.Users.ContactController.GetTotalUnreadMessageCountAsync (Volo.Chat.HttpApi) in 108.2071ms
    2022-02-28 14:10:56.426 +05:30 [INF] Executed endpoint 'Volo.Chat.Users.ContactController.GetTotalUnreadMessageCountAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:10:56.426 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:10:56.428 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44301/api/chat/contact/total-unread-message-count - 0 - 200 - application/json;+charset=utf-8 120.5734ms
    2022-02-28 14:10:56.851 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44301/api/chat/contact/contacts?includeOtherContacts=false - 0
    2022-02-28 14:10:56.860 +05:30 [INF] Executing endpoint 'Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:10:56.878 +05:30 [INF] Route matched with {area = "chat", action = "GetContacts", controller = "Contact", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[Volo.Chat.Users.ChatContactDto]] GetContactsAsync(Volo.Chat.Users.GetContactsInput) on controller Volo.Chat.Users.ContactController (Volo.Chat.HttpApi).
    2022-02-28 14:10:56.931 +05:30 [INF] Executing action method Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi) - Validation state: "Valid"
    2022-02-28 14:10:56.957 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:10:56.957 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:10:56.958 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:10:56.958 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:10:56.958 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:10:56.959 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:10:57.038 +05:30 [INF] Executed action method Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 106.3847ms.
    2022-02-28 14:10:57.039 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:10:57.040 +05:30 [INF] Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Volo.Chat.Users.ChatContactDto, Volo.Chat.Application.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
    2022-02-28 14:10:57.046 +05:30 [INF] Executed action Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi) in 168.0763ms
    2022-02-28 14:10:57.047 +05:30 [INF] Executed endpoint 'Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:10:57.047 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:10:57.048 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44301/api/chat/contact/contacts?includeOtherContacts=false - 0 - 200 - application/json;+charset=utf-8 196.1087ms
    2022-02-28 14:11:24.331 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44301/api/chat/contact/contacts?includeOtherContacts=true&filter=i - 0
    2022-02-28 14:11:24.335 +05:30 [INF] Executing endpoint 'Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:11:24.335 +05:30 [INF] Route matched with {area = "chat", action = "GetContacts", controller = "Contact", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[Volo.Chat.Users.ChatContactDto]] GetContactsAsync(Volo.Chat.Users.GetContactsInput) on controller Volo.Chat.Users.ContactController (Volo.Chat.HttpApi).
    2022-02-28 14:11:24.337 +05:30 [INF] Executing action method Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi) - Validation state: "Valid"
    2022-02-28 14:11:24.339 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:11:24.339 +05:30 [DBG] Found in the cache: pn:U,pk:67c4c1cc-c26f-edb3-c248-3a014664d1c8,n:Chat.Messaging
    2022-02-28 14:11:24.339 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:11:24.339 +05:30 [DBG] Found in the cache: pn:R,pk:admin,n:Chat.Messaging
    2022-02-28 14:11:24.339 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:11:24.339 +05:30 [DBG] Found in the cache: pn:C,pk:Web_Erp,n:Chat.Messaging
    2022-02-28 14:11:24.452 +05:30 [INF] Start processing HTTP request GET "https://localhost:44322/.well-known/openid-configuration"
    2022-02-28 14:11:24.453 +05:30 [INF] Sending HTTP request GET "https://localhost:44322/.well-known/openid-configuration"
    2022-02-28 14:11:24.477 +05:30 [INF] Received HTTP response headers after 21.3407ms - 200
    2022-02-28 14:11:24.478 +05:30 [INF] End processing HTTP request after 26.5864ms - 200
    2022-02-28 14:11:24.487 +05:30 [INF] Start processing HTTP request GET "https://localhost:44322/.well-known/openid-configuration/jwks"
    2022-02-28 14:11:24.487 +05:30 [INF] Sending HTTP request GET "https://localhost:44322/.well-known/openid-configuration/jwks"
    2022-02-28 14:11:24.493 +05:30 [INF] Received HTTP response headers after 6.5245ms - 200
    2022-02-28 14:11:24.493 +05:30 [INF] End processing HTTP request after 6.7258ms - 200
    2022-02-28 14:11:24.504 +05:30 [INF] Start processing HTTP request POST "https://localhost:44322/connect/token"
    2022-02-28 14:11:24.504 +05:30 [INF] Sending HTTP request POST "https://localhost:44322/connect/token"
    2022-02-28 14:11:25.052 +05:30 [INF] Received HTTP response headers after 548.416ms - 200
    2022-02-28 14:11:25.052 +05:30 [INF] End processing HTTP request after 548.5933ms - 200
    2022-02-28 14:11:25.079 +05:30 [INF] Start processing HTTP request GET "https://localhost:44302/api/identity/users/lookup/search?Sorting=UserName&Filter=i&SkipCount=0&MaxResultCount=20&api-version=1.0"
    2022-02-28 14:11:25.079 +05:30 [INF] Sending HTTP request GET "https://localhost:44302/api/identity/users/lookup/search?Sorting=UserName&Filter=i&SkipCount=0&MaxResultCount=20&api-version=1.0"
    2022-02-28 14:11:27.198 +05:30 [INF] Received HTTP response headers after 2118.5919ms - 403
    2022-02-28 14:11:27.198 +05:30 [INF] End processing HTTP request after 2118.8183ms - 403
    2022-02-28 14:11:27.211 +05:30 [ERR] ---------- RemoteServiceErrorInfo ----------
    {
      "code": "Forbidden",
      "message": "Forbidden",
      "details": null,
      "data": null,
      "validationErrors": null
    }
    
    2022-02-28 14:11:27.211 +05:30 [ERR] Forbidden
    Volo.Abp.Http.Client.AbpRemoteCallException: Forbidden
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
       at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.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.Abp.Identity.ClientProxies.IdentityUserLookupClientProxy.SearchAsync(UserLookupSearchInputDto input)
       at Volo.Abp.Identity.HttpClientExternalUserLookupServiceProvider.SearchAsync(String sorting, String filter, Int32 maxResultCount, Int32 skipCount, CancellationToken cancellationToken)
       at Volo.Abp.Users.UserLookupService`2.SearchAsync(String sorting, String filter, Int32 maxResultCount, Int32 skipCount, CancellationToken cancellationToken)
       at Volo.Chat.Users.ContactAppService.GetContactsAsync(GetContactsInput input)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
       at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at lambda_method1934(Closure , Object )
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    2022-02-28 14:11:27.211 +05:30 [ERR] Code:Forbidden
    2022-02-28 14:11:27.211 +05:30 [ERR] Details:
    2022-02-28 14:11:27.218 +05:30 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
    2022-02-28 14:11:27.220 +05:30 [INF] Executed action Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi) in 2884.8795ms
    2022-02-28 14:11:27.220 +05:30 [INF] Executed endpoint 'Volo.Chat.Users.ContactController.GetContactsAsync (Volo.Chat.HttpApi)'
    2022-02-28 14:11:27.436 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:11:27.444 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-02-28 14:11:27.445 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44301/api/chat/contact/contacts?includeOtherContacts=true&filter=i - 0 - 403 - application/json;+charset=utf-8 3113.6921ms
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the logs of https://localhost:44302/?

  • User Avatar
    0
    imranStem created
    2022-03-01 12:02:03.143 +05:30 [INF] Now listening on: https://localhost:44302
    2022-03-01 12:02:03.143 +05:30 [INF] Application started. Press Ctrl+C to shut down.
    2022-03-01 12:02:03.143 +05:30 [INF] Hosting environment: Development
    2022-03-01 12:02:03.143 +05:30 [INF] Content root path: D:\abp\erp\microservices\services\identity\src\Web.IdentityService.HttpApi.Host
    2022-03-01 12:03:32.410 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44302/api/identity/users/lookup/search?Sorting=UserName&Filter=a&SkipCount=0&MaxResultCount=20&api-version=1.0 - -
    2022-03-01 12:03:32.881 +05:30 [WRN] The foreign key property 'PropertyType.PropertyGroupId1' was created in shadow state because a conflicting property with the simple name 'PropertyGroupId' exists in the entity type, but is either not mapped, is already used for another relationship, or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information on mapping relationships in EF Core.
    2022-03-01 12:03:32.889 +05:30 [WRN] No store type was specified for the decimal property 'DecimalValue' on entity type 'PropertyData'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
    2022-03-01 12:03:33.710 +05:30 [INF] Executing endpoint 'Volo.Abp.Identity.IdentityUserLookupController.SearchAsync (Volo.Abp.Identity.Pro.HttpApi)'
    2022-03-01 12:03:33.736 +05:30 [INF] Route matched with {area = "identity", controller = "UserLookup", action = "Search"}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.ListResultDto`1[Volo.Abp.Users.UserData]] SearchAsync(Volo.Abp.Identity.UserLookupSearchInputDto) on controller Volo.Abp.Identity.IdentityUserLookupController (Volo.Abp.Identity.Pro.HttpApi).
    2022-03-01 12:03:33.828 +05:30 [INF] Executing action method Volo.Abp.Identity.IdentityUserLookupController.SearchAsync (Volo.Abp.Identity.Pro.HttpApi) - Validation state: "Valid"
    2022-03-01 12:03:33.868 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Web_AdministrationService,n:AbpIdentity.UserLookup
    2022-03-01 12:03:33.868 +05:30 [DBG] Not found in the cache: pn:C,pk:Web_AdministrationService,n:AbpIdentity.UserLookup
    2022-03-01 12:03:33.871 +05:30 [DBG] Getting all granted permissions from the repository for this provider name,key: C,Web_AdministrationService
    2022-03-01 12:03:33.905 +05:30 [DBG] Setting the cache items. Count: 46
    2022-03-01 12:03:33.912 +05:30 [DBG] Finished setting the cache items. Count: 46
    2022-03-01 12:03:33.914 +05:30 [INF] Authorization failed. These requirements were not met:
    PermissionRequirement: AbpIdentity.UserLookup
    2022-03-01 12:03:33.978 +05:30 [WRN] ---------- RemoteServiceErrorInfo ----------
    {
      "code": "Volo.Authorization:010001",
      "message": "Authorization failed! Given policy has not granted.",
      "details": null,
      "data": {},
      "validationErrors": null
    }
    2022-03-01 12:03:33.979 +05:30 [WRN] Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.
    Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.
       at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)
       at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)
       at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
       at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at lambda_method1766(Closure , Object )
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    2022-03-01 12:03:33.979 +05:30 [WRN] Code:Volo.Authorization:010001
    2022-03-01 12:03:33.986 +05:30 [INF] AuthenticationScheme: Bearer was forbidden.
    2022-03-01 12:03:33.989 +05:30 [INF] Executed action Volo.Abp.Identity.IdentityUserLookupController.SearchAsync (Volo.Abp.Identity.Pro.HttpApi) in 250.5263ms
    2022-03-01 12:03:33.990 +05:30 [INF] Executed endpoint 'Volo.Abp.Identity.IdentityUserLookupController.SearchAsync (Volo.Abp.Identity.Pro.HttpApi)'
    2022-03-01 12:03:34.371 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-03-01 12:03:34.389 +05:30 [DBG] Added 0 entity changes to the current audit log
    2022-03-01 12:03:34.405 +05:30 [INF] Request finished HTTP/1.1 GET https://localhost:44302/api/identity/users/lookup/search?Sorting=UserName&Filter=a&SkipCount=0&MaxResultCount=20&api-version=1.0 - - - 403 0 - 1995.2391ms
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Authorization failed. These requirements were not met: PermissionRequirement: AbpIdentity.UserLookup

    Can you check the user's permissions?

  • User Avatar
    0
    imranStem created

    AbpIdentity.UserLookup is not listed in permissions. Do I need to run migration?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Check this group

    Do I need to run migration?

    You can check your project structure and DB records.

  • User Avatar
    0
    imranStem created

    I checked this group and the database as well. The UserLookups table is not there in IdentityService or administration service database.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The AbpIdentity.UserLookup is permission not table.

    Please check the identity server client's permission.

  • User Avatar
    0
    imranStem created

    Finally, It's working now. I was looking into the user's permission. Thank You,

    Now there is another issue, I was getting 404 on the below URL, and it's a gateway URL.

    https://localhost:44320/signalr-hubs/chat/negotiate?negotiateVersion=1

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Please check your app logs,

    Did you add the ChatSignalRModule?

  • User Avatar
    0
    imranStem created

    No, I added a chat module from ABP Suite in the administration microservice. I didn't add ChatSignalRModule. Can you please guide me on how to add a package of ChatSignalRModule or any documentation that can help us?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You just need to add this module to the web module.

    [DependsOn(
        typeof(ChatSignalRModule)
    )]
    
  • User Avatar
    0
    imranStem created

    But we need to add the reference of this module into the project. I added the above line but it couldn't foud.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Add the package to your csproj.

        <PackageReference Include="Volo.Chat.SignalR" Version="x.x.x" />
    
  • User Avatar
    0
    imranStem created

    After adding the reference and module, still getting the 404 error in the web gateway. I added the chat signal R module reference in both the administration microservice and web gateway.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    what are the logs of the administration microservice and web gateway?

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11