Open Closed

ABP 4.4.0 -> Could not found remote action for method #1735


User avatar
0
ericvenneker created
  • ABP Framework version: v4.4.0
  • UI type:Blazor Server
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  2021-08-11 10:03:34.108 +02:00 [ERR] Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Kantan.FS.QuestionnairePreCheck.QuestionPreCheckDto]]  GetListAsync(Kantan.FS.QuestionnairePreCheck.GetQuestionsPreCheckInput) on the URL: https://localhost:44316/
  Volo.Abp.AbpException: Could not found remote action for method: System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Kantan.FS.QuestionnairePreCheck.QuestionPreCheckDto]] GetListAsync(Kantan.FS.QuestionnairePreCheck.GetQuestionsPreCheckInput) on the URL: https://localhost:44316/
    at Volo.Abp.Http.Client.DynamicProxying.ApiDescriptionFinder.FindActionAsync(HttpClient client, String baseUrl, Type serviceType, MethodInfo method)
    at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.MakeRequestAsync(IAbpMethodInvocation invocation)
    at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.MakeRequestAndGetResultAsync[T](IAbpMethodInvocation invocation)
    at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType)
    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 lambda_method2442(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()
  --- End of stack trace from previous location ---
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  • Steps to reproduce the issue: Have a matching controller for an appservice and set the RemoteService(IsEnabled = false) attribute on the appservice

After upgradeing to ABP 4.4 a crud page returns the exception above

For this crud page there is a controller and an appservice. The appservice is hidden with the [RemoteService(IsEnabled = false)] attribute, which causes that the appservice is not visible for the outside world, the connection is made through the controller. However, in ABP 4.4 controllers are not found anymore on the host side (see the attached swagger screenshots of the host voor v4.3 and v4.4). This causes the exception.

We have several instances where we require a seperate controller and did not want both controller and appservice to be visible at the same time on the host. Following is some stripped code from v4.3 for the appservice and the controller. Is this method (using the remoteservice attribute) still supported? Why are controllers not visible anymore on the host side?

AppService:

[RemoteService(IsEnabled = false)]
public class QuestionPreCheckAppService : ApplicationService, IQuestionPreCheckAppService
{
	public virtual async Task<PagedResultDto<QuestionPreCheckDto>> GetListAsync(GetQuestionsPreCheckInput input)
	{
    ...
	}
}

Controller:

[RemoteService]
[Area("fs")]
[ControllerName("QuestionPreCheck")]
[Route("api/fs/questionPreCheck")]
public class QuestionPreCheckController : AbpController, IQuestionPreCheckAppService
{
	private readonly IQuestionPreCheckAppService _questionAppService;

	public QuestionPreCheckController(IQuestionPreCheckAppService questionAppService)
	{
		_questionAppService = questionAppService;
	}

	[HttpGet]
	[Route("GetList")]
	public virtual Task<PagedResultDto<QuestionPreCheckDto>> GetListAsync(GetQuestionsPreCheckInput input)
	{
		return _questionAppService.GetListAsync(input);
	}
}


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

    hi

    There are no similar breaking changes from 4.3 to 4.4.

    Can you use the template project to reproduce the problem and share it? liming.ma@volosoft.com

  • User Avatar
    0
    ericvenneker created

    Thank you for your reply.

    After creating two seperate templates (4.3 and 4.4, just to be sure) which proved your point I went back to our application to try and locate the cause. I could not find any (relevant) differences between my application and the clean 4.4 app. Another clean and rebuild of our application 'fixed' this issue to my great annoyance. :-(

    A clean and rebuild is normal operating procedure after any update (for ABP and every other third party addon)

    So while this may have fixed the issue, it is not an explanation of the cause. And because it is now 'fixed', I cannot reproduce the error anymore...

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