Activities of "sgarad"

Hi

Can you share a project that can reproduce the 4040 error?

I've already shared those two modules in my last email.

microservices

I added the controllers for app services in coreaccountingmanagement and disabled AutoControllers for microservice but I'm still facing the same issue. I see the path is correct but still 404. Do I need to expose Integration service as below reagrdless? I'm generating the static proxies with

 Configure<AbpAspNetCoreMvcOptions>(options =>
 {
     options.ExposeIntegrationServices = true;
 });

and once proxies are generated I comment this out. If I exposed Integration services it works fine and when commented it throws 404 not fount. Do I need to have this enable every time? If yes then waht's the point of Integration services?

12/12/2024 5:57:18 PM  [Information] Start processing HTTP request "POST" "http://localhost:44396/integration-api/app/address?api-version=1.0"
12/12/2024 5:57:18 PM  [Information] Sending HTTP request "POST" "http://localhost:44396/integration-api/app/address?api-version=1.0"
12/12/2024 5:57:19 PM  [Information] Received HTTP response headers after 563.9558ms - 404
12/12/2024 5:57:19 PM  [Information] End processing HTTP request after 571.2987ms - 404
12/12/2024 5:57:19 PM  [Error] ---------- RemoteServiceErrorInfo ----------
{
  "code": "NotFound",
  "message": "Not Found",
  "details": null,
  "data": null,
  "validationErrors": null
}

12/12/2024 5:57:19 PM  [Error] Volo.Abp.Http.Client.AbpRemoteCallException: Not Found
   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 CastandCrew.NorthStar.CoreAccountingManagement.Addresses.AddressIntegrationClientProxy.CreateAsync(AddressIntegrationDto input) in D:\PROJECTS\northstar-modules\castandcrew.northstar.coreaccountingmanagement\src\CastandCrew.NorthStar.CoreAccountingManagement.HttpApi.Client\ClientProxies\CastandCrew\NorthStar\CoreAccountingManagement\Addresses\AddressIntegrationClientProxy.Generated.cs:line 24
   at CastandCrew.NorthStar.VendorManagement.Vendors.VendorAppService.CreateAsync(VendorDto input) in D:\PROJECTS\northstar-modules\castandcrew.northstar.vendormanagement\src\CastandCrew.NorthStar.VendorManagement.Application\Vendors\VendorAppService.cs:line 46
   at lambda_method2257(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, 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.&lt;InvokeNextActionFilterAsync&gt;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.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

hi

Can you share the source code?

I have to check the code to troubleshoot the problem.

Thanks.

liming.ma@volosoft.com

Sent you an email. Do I need to expose Integration services even after proxies are generated?

hi

Cannot resolve parameter 'CastandCrew.NorthStar.CoreAccountingManagement.Interfaces.Integration.IAddressIntegrationAppService

After switching to static proxy.

Have you generated the c# proxy file for IAddressIntegrationAppService ?

You need to expose the integration service while generating the proxy.

https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/Volo/Abp/Identity/Integration

Yes the proxy class is generated for IAddressIntegrationAppService.

But I'm still getting the same error.

12/10/2024 10:06:29 PM [Error] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {
    "ActivatorChain": "CastandCrew.NorthStar.VendorManagement.Vendors.VendorAppService"
  },
  "validationErrors": null
}

12/10/2024 10:06:29 PM [Error] Autofac.Core.DependencyResolutionException: An exception was thrown while activating CastandCrew.NorthStar.VendorManagement.Vendors.VendorAppService.
 ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'CastandCrew.NorthStar.VendorManagement.Vendors.VendorAppService' can be invoked with the available services and parameters:
Cannot resolve parameter 'CastandCrew.NorthStar.CoreAccountingManagement.Addresses.IAddressIntegrationAppService addressAppService' of constructor 'Void .ctor(CastandCrew.NorthStar.VendorManagement.RepositoryManager.VendorRepositoryManager, CastandCrew.NorthStar.CoreAccountingManagement.Addresses.IAddressIntegrationAppService)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass41_0.&lt;PropertiesAutowired&gt;b__0(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- End of inner exception stack trace ---
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

12/10/2024 10:06:29 PM [Error] ---------- Exception Data ----------
ActivatorChain = CastandCrew.NorthStar.VendorManagement.Vendors.VendorAppService

Source Service Http Client module

public class CoreAccountingManagementHttpApiClientModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddStaticHttpClientProxies(
            typeof(CoreAccountingManagementApplicationContractsModule).Assembly,
            remoteServiceConfigurationName: CoreAccountingManagementRemoteServiceConsts.RemoteServiceName
        );

        Configure<AbpVirtualFileSystemOptions>(options =>
        {
            options.FileSets.AddEmbedded<CoreAccountingManagementHttpApiClientModule>();
        });

    }
}

Integration Service in CoreAccounting:

Vendor Contracts module with dependency for Contracts module.

[DependsOn(
    typeof(CoreAccountingManagementApplicationContractsModule),
    typeof(VendorManagementDomainSharedModule),
    typeof(AbpDddApplicationContractsModule),
    typeof(AbpAuthorizationModule)
    )]
public class VendorManagementApplicationContractsModule : AbpModule
{

}

Vendor Application Module with Dependency to CoreAccountingHttpApiClientModule.

[DependsOn(
    typeof(CoreAccountingManagementHttpApiClientModule),  
    typeof(VendorManagementDomainModule),
    typeof(VendorManagementApplicationContractsModule),
    typeof(AbpDddApplicationModule),
    typeof(AbpAutoMapperModule)  
    )]
public class VendorManagementApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAutoMapperObjectMapper<VendorManagementApplicationModule>();
        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<VendorManagementApplicationModule>(validate: true);
        });
        Configure<AbpMultiTenancyOptions>(options =>
        {
            options.IsEnabled = true;
        });       
    }   
}

Is there anything that I'm still missing?

Hi,

After switching to static proxy. I'm getting Atofac dependency resolution exception. In my client microservice I don't see the proxy for my Integration service.

12/9/2024 7:24:39 PM [Error] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": { "ActivatorChain": "CastandCrew.NorthStar.VendorManagement.Services.VendorAppService" }, "validationErrors": null }

12/9/2024 7:24:39 PM [Error] Autofac.Core.DependencyResolutionException: An exception was thrown while activating CastandCrew.NorthStar.VendorManagement.Services.VendorAppService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'CastandCrew.NorthStar.VendorManagement.Services.VendorAppService' can be invoked with the available services and parameters: Cannot resolve parameter 'CastandCrew.NorthStar.CoreAccountingManagement.Interfaces.Integration.IAddressIntegrationAppService addressAppService' of constructor 'Void .ctor(CastandCrew.NorthStar.VendorManagement.RepositoryManager.VendorRepositoryManager, CastandCrew.NorthStar.CoreAccountingManagement.Interfaces.Integration.IAddressIntegrationAppService)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Builder.RegistrationBuilder3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

12/9/2024 7:24:39 PM [Error] ---------- Exception Data ---------- ActivatorChain = CastandCrew.NorthStar.VendorManagement.Services.VendorAppService

12/9/2024 7:24:39 PM [Information] Executing "ObjectResult", writing value of type '"Volo.Abp.Http.RemoteServiceErrorResponse"'. 12/9/2024 7:24:39 PM [Information] Executed action "CastandCrew.NorthStar.VendorManagement.Services.VendorAppService.CreateAsync (CastandCrew.NorthStar.VendorManagement.Application)" in 54.361ms 12/9/2024 7:24:39 PM [Information] Executed endpoint '"CastandCrew.NorthStar.VendorManagement.Services.VendorAppService.CreateAsync (CastandCrew.NorthStar.VendorManagement.Application)"'

Thanks Krishna

  • ABP Framework version: v8.3.1
  • UI Type: Angular
  • Database System: EF Core ( MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
12/6/2024 6:53:24 PM   [Error] ---------- RemoteServiceErrorInfo ----------
{
  "code": null,
  "message": "An internal error occurred during your request!",
  "details": null,
  "data": {},
  "validationErrors": null
}

12/6/2024 6:53:24 PM   [Error] Volo.Abp.AbpException: Could not find remote action for method: System.Threading.Tasks.Task`1[CastandCrew.NorthStar.CoreAccountingManagement.Dtos.AddressDto] CreateAsync(CastandCrew.NorthStar.CoreAccountingManagement.Dtos.AddressDto) on the URL: http://localhost:44396/
   at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetActionApiDescriptionModel(IAbpMethodInvocation invocation)
   at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.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 CastandCrew.NorthStar.VendorManagement.Services.VendorAppService.CreateAsync(VendorDto input) in D:\PROJECTS\northstar-modules\castandcrew.northstar.vendormanagement\src\CastandCrew.NorthStar.VendorManagement.Application\Services\VendorAppService.cs:line 50
   at lambda_method2091(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, 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.&lt;InvokeNextActionFilterAsync&gt;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.&lt;InvokeInnerFilterAsync&gt;g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeNextExceptionFilterAsync&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   
  • Steps to reproduce the issue:

Hi,

I'm using the Integration service in my microservices. When I do not expose Integration service the consuming microservice throws above exception while calling Integration endpoint. If I expose my integration services at origin it just works fine. I do have added RemoteService section as well but no luck. I followed interservice communication and Integration services As I'm sure that I'm not missing any configuration suggested at above links. Any idea what could be wrong? I don't want to expose my integration services.

Logs when I expose integration service


   12/7/2024 12:26:38 AM  [Information] Request finished "HTTP/1.1" "GET" "http"://"localhost:44396""""/api/abp/api-definition""" - 200 null "application/json; charset=utf-8" 1045.8518ms
12/7/2024 12:26:38 AM  [Information] Request starting "HTTP/1.1" "POST" "http"://"localhost:44396""""/integration-api/coreaccounting/address/create""?api-version=1.0" - "application/json; charset=utf-8" 407
12/7/2024 12:26:38 AM  [Information] Executing endpoint '"CastandCrew.NorthStar.CoreAccountingManagement.Services.Integration.AddressIntegrationAppService.CreateAsync (CastandCrew.NorthStar.CoreAccountingManagement.Application)"'
12/7/2024 12:26:38 AM  [Information] Route matched with "{action = \"Create\", controller = \"AddressIntegration\", area = \"\", page = \"\"}". Executing controller action with signature "System.Threading.Tasks.Task`1[CastandCrew.NorthStar.CoreAccountingManagement.Dtos.AddressDto] CreateAsync(CastandCrew.NorthStar.CoreAccountingManagement.Dtos.AddressDto)" on controller "CastandCrew.NorthStar.CoreAccountingManagement.Services.Integration.AddressIntegrationAppService" ("CastandCrew.NorthStar.CoreAccountingManagement.Application").
12/7/2024 12:26:40 AM  [Debug] Added 1 entity changes to the current audit log
12/7/2024 12:26:40 AM  [Debug] Added 0 entity changes to the current audit log
12/7/2024 12:26:40 AM  [Information] Executing "ObjectResult", writing value of type '"CastandCrew.NorthStar.CoreAccountingManagement.Dtos.AddressDto"'.
12/7/2024 12:26:40 AM  [Information] Executed action "CastandCrew.NorthStar.CoreAccountingManagement.Services.Integration.AddressIntegrationAppService.CreateAsync (CastandCrew.NorthStar.CoreAccountingManagement.Application)" in 1824.8233ms
12/7/2024 12:26:40 AM  [Information] Executed endpoint '"CastandCrew.NorthStar.CoreAccountingManagement.Services.Integration.AddressIntegrationAppService.CreateAsync (CastandCrew.NorthStar.CoreAccountingManagement.Application)"'

Thanks Krishna

Hi!

Can we please get an update on this...?

Thanks!

Hi!

Any update on this?

Thanks!

Hi. Thanks for that clarification. So all you did was create a project, and you created some tenants, and you were able to save them successfully. Good to know.

So now, let me explain our problem:

For our application needs, we had to change a few things in the "Connection Strings" component, so we created a Replacement Component to do so. We followed the directions in the documentation. When we opened the Create New Tenant modal during the process of creating a new tenant, we were able to successfully see our changes (from our new replacement component) in the Connection Strings tab.

However, when we attempted to save the new tenant, we saw an error.

You can see all the details if you scroll up to the original posting and look at the screen shots we provided.

We suspect that the root of the problem is that the Tenants component does not recognize our replacement Connection String component; rather, it seems to be erroneously referring to the original Connection String component instead (which will be undefined, since it's not being used).

So to reproduce the problem: simply create a component which replaces the Connection String component. Then, create a new tenant. Verify that your replacement Connection String component is being displayed in the Create New Tenant modal, in lieu of the original one. Finally, save the new tenant. At this point you should see the error.

I hope this clarifies things. Kindly let us know if more explanation is needed. Thanks!

Hi! Thanks for your reply.

I am not sure I understand your response though.

Could you please share all your code changes, in the way that we shared ours? I would very much like to see the all changes you made, since you claimed you could not reproduce the problem.

All I am seeing in your screenshot is that you have upgraded your Angular and abp/volo packages.

The reason why I am asking for this, is to make sure that you understand the problem we faced.

Or are you implying that simply upgrading to the latest versions of those packages actually fixes the problem?

Many thanks!

Showing 1 to 10 of 37 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07