Activities of "chenxm"

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.2.0-RC.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: [Invalid Module] Backend module "productService" does not exist in API definition.
  • Steps to reproduce the issue:" create new microservice solution and exec abp generate-proxy -t ng

Also, can you share your environment.ts file?

` import { Environment } from '@abp/ng.core';

const baseUrl = 'http://localhost:4200';

const oAuthConfig = { issuer: 'https://localhost:44322', redirectUri: baseUrl, clientId: 'PlatCloud_Angular', responseType: 'code', scope: 'offline_access openid profile email phone AccountService IdentityService AdministrationService SaasService ProductService', requireHttps: true, };

export const environment = { production: false, application: { baseUrl, name: 'PlatCloud', }, oAuthConfig, apis: { default: { url: 'https://localhost:44325', rootNamespace: 'PlatCloud', }, AbpAccountPublic: { url: oAuthConfig.issuer, rootNamespace: 'AbpAccountPublic', }, ProductService: { url: 'https://localhost:44361', rootNamespace: 'PlatCloud', }, }, } as Environment;

`

Is the product service up and running when you run abp generate-proxy -t ng?

yes, product service is running.

Please try to use ABP suite to create a new microservice solution. This problem still exists in the latest version 5.2.0. I hope the team can solve this problem urgently,It has seriously affected our actual work. I can't start working.

We have investigated this issue. We need make some improvements to apis configuration since all the services need to be redirected to web gateway. However when this is the case, abp generate-proxy -t ng doesn't work because web gateway doesn't have the api definitions (gateways do not depend on microservice HTTP.API layers) since we are not using dynamic proxy any longer.

We'll try to decide on a subtle way to generate proxy with angular when using a gateway.

export const environment = { 
    production: false, 
    application: { 
        baseUrl, 
        name: 'PlatCloud', 
    }, 
    oAuthConfig, 
    apis: { 
        default: { 
            url: 'https://localhost:44325', 
            rootNamespace: 'PlatCloud', 
        }, 
        AbpAccountPublic: { 
            url: oAuthConfig.issuer, 
            rootNamespace: 'AbpAccountPublic', 
        }, 
        ProductService: { 
            url: 'https://localhost:44361', 
            rootNamespace: 'PlatCloud', 
        }, 
    }, 
} as Environment; 

When you defined ProductService with its own address, it should generate the related proxies with abp generate-proxy -t ng. I will try it on 5.2.0 and let you know.

Thank you very much. Unfortunately, I have failed on 5.2.0.

We have reproduced this problem. As a workaround, you can set default api URL to productService in environment.ts when generating proxy like:

export const environment = { 
  ... 
  apis: { 
    default: { 
      url: 'https://localhost:44361', 
      rootNamespace: 'MyMicroApp', 
    }, 
    AbpAccountPublic: { 
      url: oAuthConfig.issuer, 
      rootNamespace: 'AbpAccountPublic', 
    }, 
    ProductService: { 
      url: 'https://localhost:44325', 
      rootNamespace: 'MyMicroApp', 
    }, 
  }, 
} as Environment; 

Note: Don't forget to revert back to web-gateway.

I have refunded your question.

Thank you for your report.

first, thank you for your solution,can solve my problem temporarily.

step1: Modify the default service URL to the URL of a specific service step2: execute abp generate-proxy -t ng -m productService

but, It is hoped that further improvements can be made to enhance the ability of ABP generate proxy, such as adding command parameters to specify the specific service address rather than modifying the configuration file, such as abp generate-proxy - t ng -m productservice --url https://localhost:44361,or better。

In addition, I hope to have more perfect test coverage when releasing the new version.

May it be better and more perfect. Thank you.

  • ABP Framework version: v5.2.0

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace:

  • URL: https://localhost:44321/api/file-management/directory-descriptor/sub-directories?parentId= [14:03:59 ERR] Value cannot be null. (Parameter 'source') System.ArgumentNullException: Value cannot be null. (Parameter 'source') at Microsoft.EntityFrameworkCore.Utilities.Check.NotNull[T](T value, String parameterName) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.AnyAsync[TSource](IQueryable1 source, Expression1 predicate, CancellationToken cancellationToken) at Volo.FileManagement.Directories.EfCoreDirectoryDescriptorRepository.ContainsAnyAsync(Nullable1 id, Boolean checkFilesAlso, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.FileManagement.Directories.DirectoryDescriptorAppService.GetListAsync(Nullable1 parentId) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.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.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync(Nullable1 parentId) at lambda_method1890(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__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  • Steps to reproduce the issue:" Manual integration according to the official tutorial

Hi, I'll try to reproduce the problem and write you back asap.

Is there any progress?

  • ABP Framework version: v5.2.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: missing data migration script.
  • Steps to reproduce the issue:"
  1. Enter the services/administration directory
  2. execute abp add-module Volo.CmsKit.Pro
  3. Add the following code to PreConfigureServices of AdministrationServiceDomainSharedModule :

`GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit => { cmsKit.EnableAll(); });

GlobalFeatureManager.Instance.Modules.CmsKitPro(cmsKitPro => { cmsKitPro.EnableAll(); });`

  1. execute dotnet ef migrations add CreateCmsKitProEntities

I've tried to add it manually, and it's still the same.

This week, I've been troubled by this damn problem. Interestingly, I tried many times strictly according to the official documents.

First, I use helm, which is located in /etc/k8s.

I generated and mounted the certificate according to the document, and the certificate shows that it is trusted.

https://github.com/abpframework/eShopOnAbp/blob/main/etc/README.md https://docs.abp.io/en/commercial/latest/guides/identityserver-deployment#kubernetes

When I set the web configuration to:

authorize URL is: http://platcloud-st-authserver/connect/authorize?client_id=PlatCloud_Web&redirect_uri=http://platcloud-st-web/signin-oidc&response_type=code id_token&scope=openid profile role email phone AccountService IdentityService AdministrationService SaasService ProductService&response_mode=form_post&nonce=637869086449240085.MDI0YWRjZTUtNTU5Ni00ODUyLWFhNmYtY2FkOGJkYzE2NGVkMDJhZGJjN2QtYjg2OC00YjhlLWJjNWEtMjY2MjM0NjdjYjVl&state=CfDJ8MSIjEgtAYFJpAAO1ApzUHnTxzjWzagrSsB75-HW3UaNeq5rdT8iqSUg4qtbGMfxXeN90n6eH4EENuVxYYC5GVDjPAzrnoJlwnYhKO0gI9j-9lU392hQ6-jQvZuM5W0HkI_txS5SeTSz6i_NopYHg6lxCrh4AamZNEw_rJszqsY9qQJQjt2IUowNC7QqA7LShl86PaD1nFLgsGNFiGxv-HKZeQFP5FPLp8tvMme0mLd0Cr1Dn4k8-nDYpdN2tXQBzctYZmyeqY2Wga_VYWIq3W5fV-TMxOnQAUoeH5CzopZ5&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.10.0.0

Please note the parameter: redirect_uri, it turns out to be HTTP, not HTTPS,This causes an authserver exception: 「Invalid redirect_uri: http://platcloud-st-web/signin-oidc」,Because the value in the seed data is: https://platcloud-st-web/signin-oidc

[09:47:41 ERR] Invalid redirect_uri: http://platcloud-st-web/signin-oidc {"ClientId": "PlatCloud_Web", "ClientName": "PlatCloud_Web", "RedirectUri": null, "AllowedRedirectUris": ["https://platcloud-st-web/signin-oidc"], "SubjectId": "anonymous", "ResponseType": null, "ResponseMode": null, "GrantType": null, "RequestedScopes": "", "State": null, "UiLocales": null, "Nonce": null, "AuthenticationContextReferenceClasses": null, "DisplayMode": null, "PromptMode": "", "MaxAge": null, "LoginHint": null, "SessionId": null, "Raw": {"client_id": "PlatCloud_Web", "redirect_uri": "http://platcloud-st-web/signin-oidc", "response_type": "code id_token", "scope": "openid profile role email phone AccountService IdentityService AdministrationService SaasService ProductService", "response_mode": "form_post", "nonce": "637869088618193605.ZjJjMTZhYTktYzI1ZC00ODRlLWFhMjItMDFhY2Q3YTYzOGY1YTRjZDBkYmItZmYxZS00MzQ5LTgyOWMtNzQ0NDYyYWVjYjE4", "state": "CfDJ8MSIjEgtAYFJpAAO1ApzUHny9H85Np-OiMlHbwspizRZc-knENCoRsZBZGBBHXGsIIugQPyVmV9jA3Xs8CJYYY7-ZAEjuFYCMB29RKFm5wFWwomChMb0jo03VP82EjT082voJrSF6RGaNMHX8jF-tTEtYFjosmGMHWOMWmBiEXK7KQ35BlJBS3dCe04V8zuI-P7g3TSKQfXWp3TZaGknAUyBShJBzLmJyTbbk2OfGmyaoioTGZCtNcCUwypavOIupuU3LQB_gErugp5hwXNPXfImre5TE55jAeJCEQDaTcyF", "x-client-SKU": "ID_NETSTANDARD2_0", "x-client-ver": "6.10.0.0"}, "$type": "AuthorizeRequestValidationLog"} [09:47:41 ERR] Request validation failed

When I modify the web configuration to:

Another exception occurred in the web application: System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'. ---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'. ---> System.Net.Http.HttpRequestException: Connection refused (platcloud-st-authserver:443) ---> System.Net.Sockets.SocketException (111): Connection refused at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager 1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager 1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.AuthenticationHandler 1.ChallengeAsync(AuthenticationProperties properties) at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties) at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultFilters>g__Awaited|28_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context) at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context) at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

Showing 1 to 10 of 25 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11