-
ABP Framework version: v5.2.2
-
UI type: Angular
-
DB provider: EF Core
-
**Tiered (MVC)
-
Exception message and stack trace:
-
Steps to reproduce the issue: 'yarn install' then 'yarn start' the angular project
Hi,
We currently trying to get the microservices template up and running however we are facing an issue whereby the angular project cannot startup.
I have the Identity service, administration service, saas service, product service, web gateway and public web gateway all running fine.
Any assistance is much appreciated.
6 Answer(s)
-
0
Hello
Can you send the logs of
WebGateway
and logs ofAdministrationService
? -
0
Hello
Can you send the logs of
WebGateway
and logs ofAdministrationService
?Please get AdministrationService and WebGateway logs from below links.
https://drive.google.com/file/d/1pNwbyfyV3OVvMI66vwrmWvSAO1RVCQka/view?usp=share_link
https://drive.google.com/file/d/11B8QRnVF5984yYGINI7kfP5hsn437EG1/view?usp=sharing
Thank you.
-
0
Hi,
We've investigated your logs and found this:2022-11-04 10:23:17.696 +02:00 [INF] Content root path: C:\Source\Token Generation API\code\TokenGen\services\administration\src\TokenGen.AdministrationService.HttpApi.Host\ 2022-11-04 10:23:17.900 +02:00 [INF] Request starting HTTP/2 GET https://localhost:44367/ - - 2022-11-04 10:23:20.506 +02:00 [INF] Request starting HTTP/1.1 GET https://localhost:44367/api/abp/application-configuration?api-version=1.0 - 0 2022-11-04 10:23:22.153 +02:00 [ERR] An unhandled exception has occurred while executing the request. Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints. Matches: TokenGen.AdministrationService.Controllers.HomeController.Index (TokenGen.AdministrationService.HttpApi.Host) TokenGen.StsApiService.Controllers.HomeController.Index (TokenGen.StsApiService.HttpApi.Host) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState) at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.MatchAsync(HttpContext httpContext) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext() --- End of stack trace from previous location ---
It seems
TokenGen.AdministrationService.Controllers.HomeController
andTokenGen.StsApiService.Controllers.HomeController
conflicts for the same route (/
).Make sure your AdministrationService doesn't have a reference to StsApiService directly. Most probably your StsApiService.HttpApi layer is included in your AdministrationService.HttpApi layer. Can you check if there is a reference?
-
0
Hi,
I do not reference StsApiService directly in the AdministrationService.
I have started a fresh with a brand new microservices template and I run into the same issue (unable to start Angular project). This is only when I am running all service from Visual Studio. I can confirm that when I run the project using tye then I do not see this issue.
I have been running into another issue on the Angular project where I cannot see the 'Identity Server' menu option under the Administration menu. I have installed the Identity Server UI module in my project, deleted and ran the migrator a few times however this still seems to be an issue/
Any assistance is greatly appreciated.
-
0
[administration-service_159fdfa3-f]: [14:16:20 INF] Request starting HTTP/2 GET https://host.docker.internal:44367/metrics - - [administration-service_159fdfa3-f]: [14:16:20 INF] Executing endpoint 'Prometheus metrics' [administration-service_159fdfa3-f]: [14:16:20 INF] Executed endpoint 'Prometheus metrics' [administration-service_159fdfa3-f]: [14:16:20 INF] Request finished HTTP/2 GET https://host.docker.internal:44367/metrics - - - 200 - text/plain;+version=0.0.4;+charset=utf-8 15.3063ms [administration-service_159fdfa3-f]: [14:16:32 INF] Request starting HTTP/1.1 GET https://localhost:44367/api/permission-management/permissions?providerName=U&providerKey=daafe986-a15e-687f-7c61-3a07733c1d20 - 0 [administration-service_159fdfa3-f]: [14:16:32 INF] CORS policy execution failed. [administration-service_159fdfa3-f]: [14:16:32 INF] Request origin http://localhost:4200 does not have permission to access the resource. [administration-service_159fdfa3-f]: [14:16:32 INF] Executing endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [administration-service_159fdfa3-f]: [14:16:32 INF] Route matched with {area = "permissionManagement", action = "Get", controller = "Permissions", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.PermissionManagement.GetPermissionListResultDto] GetAsync(System.String, System.String) on controller Volo.Abp.PermissionManagement.PermissionsController (Volo.Abp.PermissionManagement.HttpApi). [administration-service_159fdfa3-f]: [14:16:32 INF] Executing action method Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi) - Validation state: Valid [administration-service_159fdfa3-f]: [14:16:32 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:daafe986-a15e-687f-7c61-3a07733c1d20,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 DBG] Found in the cache: pn:U,pk:daafe986-a15e-687f-7c61-3a07733c1d20,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 DBG] Found in the cache: pn:R,pk:admin,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:TokenGen_Angular,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 DBG] Found in the cache: pn:C,pk:TokenGen_Angular,n:AbpIdentity.Users.ManagePermissions [administration-service_159fdfa3-f]: [14:16:32 ERR] ---------- RemoteServiceErrorInfo ---------- [administration-service_159fdfa3-f]: { [administration-service_159fdfa3-f]: "code": null, [administration-service_159fdfa3-f]: "message": "An internal error occurred during your request!", [administration-service_159fdfa3-f]: "details": null, [administration-service_159fdfa3-f]: "data": { [administration-service_159fdfa3-f]: "ActivatorChain": "?:Volo.Abp.Identity.EntityFrameworkCore.IIdentityDbContext -> Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext, Volo.Abp.Identity.Pro.EntityFrameworkCore, Version=6.0.1.0, Culture=neutral, PublicKeyToken=null]]" [administration-service_159fdfa3-f]: }, [administration-service_159fdfa3-f]: "validationErrors": null [administration-service_159fdfa3-f]: } [administration-service_159fdfa3-f]: [administration-service_159fdfa3-f]: [14:16:32 ERR] An exception was thrown while activating ?:Volo.Abp.Identity.EntityFrameworkCore.IIdentityDbContext -> Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext, Volo.Abp.Identity.Pro.EntityFrameworkCore, Version=6.0.1.0, Culture=neutral, PublicKeyToken=null]]. [administration-service_159fdfa3-f]: Autofac.Core.DependencyResolutionException: An exception was thrown while activating ?:Volo.Abp.Identity.EntityFrameworkCore.IIdentityDbContext -> Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext, Volo.Abp.Identity.Pro.EntityFrameworkCore, Version=6.0.1.0, Culture=neutral, PublicKeyToken=null]]. [administration-service_159fdfa3-f]: ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=6.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure(...) to configure it. [administration-service_159fdfa3-f]: at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Configure[TDbContext](AbpDbContextOptions options, AbpDbContextConfigurationContext`1 context) [administration-service_159fdfa3-f]: at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Create[TDbContext](IServiceProvider serviceProvider) [administration-service_159fdfa3-f]: at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) [administration-service_159fdfa3-f]: at Autofac.Core.Activators.Delegate.DelegateActivator.b__2_0(ResolveRequestContext ctxt, Action`1 next) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next) [administration-service_159fdfa3-f]: --- End of inner exception stack trace --- [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) [administration-service_159fdfa3-f]: at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request) [administration-service_159fdfa3-f]: at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) [administration-service_159fdfa3-f]: at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) [administration-service_159fdfa3-f]: at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) [administration-service_159fdfa3-f]: at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork) [administration-service_159fdfa3-f]: at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString) [administration-service_159fdfa3-f]: at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.GetDbContextAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Identity.EntityFrameworkCore.EfCoreIdentityUserRepository.GetRoleNamesAsync(Guid id, CancellationToken cancellationToken) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at Volo.Abp.Identity.UserRoleFinder.GetRolesAsync(Guid userId) [administration-service_159fdfa3-f]: at Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider.CheckAsync(String[] names, String providerName, String providerKey) [administration-service_159fdfa3-f]: at Volo.Abp.PermissionManagement.PermissionManager.GetInternalAsync(PermissionDefinition[] permissions, String providerName, String providerKey) [administration-service_159fdfa3-f]: at Volo.Abp.PermissionManagement.PermissionManager.GetAsync(String[] permissionNames, String providerName, String providerKey) [administration-service_159fdfa3-f]: at Volo.Abp.PermissionManagement.PermissionAppService.GetAsync(String providerName, String providerKey) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) [administration-service_159fdfa3-f]: at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() [administration-service_159fdfa3-f]: at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) [administration-service_159fdfa3-f]: at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) [administration-service_159fdfa3-f]: at lambda_method2107(Closure , Object ) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) [administration-service_159fdfa3-f]: at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) [administration-service_159fdfa3-f]: [14:16:32 ERR] ---------- Exception Data ---------- [administration-service_159fdfa3-f]: ActivatorChain = ?:Volo.Abp.Identity.EntityFrameworkCore.IIdentityDbContext -> Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.Abp.Identity.EntityFrameworkCore.IdentityProDbContext, Volo.Abp.Identity.Pro.EntityFrameworkCore, Version=6.0.1.0, Culture=neutral, PublicKeyToken=null]] [administration-service_159fdfa3-f]: [administration-service_159fdfa3-f]: [14:16:32 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. [administration-service_159fdfa3-f]: [14:16:32 INF] Executed action Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi) in 108.5385ms [administration-service_159fdfa3-f]: [14:16:32 INF] Executed endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [administration-service_159fdfa3-f]: [14:16:32 DBG] Added 0 entity changes to the current audit log [administration-service_159fdfa3-f]: [14:16:32 DBG] Added 0 entity changes to the current audit log [administration-service_159fdfa3-f]: [14:16:32 INF] Request finished HTTP/1.1 GET https://localhost:44367/api/permission-management/permissions?providerName=U&providerKey=daafe986-a15e-687f-7c61-3a07733c1d20 - 0 - 500 - application/json;+charset=utf-8 133.3308ms [administration-service_159fdfa3-f]: [14:16:35 INF] Request starting HTTP/2 GET https://host.docker.internal:44367/metrics - - [administration-service_159fdfa3-f]: [14:16:35 INF] Executing endpoint 'Prometheus metrics' [administration-service_159fdfa3-f]: [14:16:35 INF] Executed endpoint 'Prometheus metrics' [administration-service_159fdfa3-f]: [14:16:35 INF] Request finished HTTP/2 GET https://host.docker.internal:44367/metrics - - - 200 - text/plain;+version=0.0.4;+charset=utf-8 19.9347ms [administration-service_159fdfa3-f]: [14:16:50 INF] Request starting HTTP/2 GET https://host.docker.internal:44367/metrics - - [administration-service_159fdfa3-f]: [14:16:50 INF] Executing endpoint 'Prometheus metrics'
-
0
I have been running into another issue on the Angular project where I cannot see the 'Identity Server' menu option under the Administration menu. I have installed the Identity Server UI module in my project, deleted and ran the migrator a few times however this still seems to be an issue/
IdentityServer domain modules are located under IdentityService anyway, why you need to add it to your project. What do you mean by project? Did you create a new microservice using the ABP cli or a custom application and trying to add it to the solution manually?