Base solution for your next web application
Open Closed

Error after Login button press on API Home Page #8133


User avatar
0
A4amen created

Please I need help with this error that occures right after I click login on the home page after successfully lauch the Web.Host app :

An unhandled exception occurred while processing the request. AbpValidationException: Method arguments are not valid! See ValidationErrors for details. Abp.Runtime.Validation.Interception.MethodInvocationValidator.ThrowValidationError() AbpValidationException: Method arguments are not valid! See ValidationErrors for details. Abp.Runtime.Validation.Interception.MethodInvocationValidator.ThrowValidationError() Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate() Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) GraphQL.Server.Transports.AspNetCore.GraphQLHttpMiddleware<TSchema>.InvokeAsync(HttpContext context) Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext() Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team
    • What is your product version?
    • What is ABP Framework version?

    There should be detailed ValidationErrors in the log or audit log. Can you reproduce this problem with Zero's Demo project?

  • User Avatar
    0
    A4amen created

    When I check the audit logs there is no error recorded. The angular app is working alright. This issue occurs when I try to login to the backend. My app version is 8.0.0 and my ABP 5.0.0 Thanks

  • User Avatar
    0
    maliming created
    Support Team

    Please share the details of Login's request, which can be viewed using chrome.

    eg:

  • User Avatar
    0
    A4amen created

    I am login at this URL http://localhost:22742/Ui/Login

    With these details default admin 123qwe true

    When I step through the code I notice when it reaches the line below (in bold) the user object is null therefore it returns me to login over and over and over.

    Kingly help me please

    [DisableAuditing] public async Task<IActionResult> Index() { var model = new HomePageModel { LoginInformation = await _sessionCache.GetCurrentLoginInformationsAsync(), IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled };

    if (model.LoginInformation?.User == null)
    {
        return RedirectToAction("Login");
    }
    
    return View(model);
    

    }

  • User Avatar
    0
    maliming created
    Support Team

    This is strange, can I view it remotely? Please send teamviewer connection information to: [email protected]

  • User Avatar
    0
    maliming created
    Support Team

    Remotely resolved the issue.

  • User Avatar
    0
    A4amen created

    The actual fix was to change the launchsettings From: "applicationUrl": "http://localhost:22742/" To "applicationUrl": "http://127.0.0.1:22742/". Chrome seams to be careful about cookies set by localhost. Thanks.

  • User Avatar
    0
    smry created

    launchsettings for just the Host file or all files? I am still running into what I believe is this issue

  • User Avatar
    0
    A4amen created

    I changed it in the host project only.

  • User Avatar
    0
    smry created

    redownloaded my project, changed just that file in that way, built/rebuilt/npm/yarn - working solution At this point I believe that was my issue and starting from scratch seemed to correct the issue