Open Closed

Error On Blazor Server Services in Production #5069


User avatar
0
david.hurtado created

We have been deploying an application with Blazor Server. Sometimes app doesn't respond. When we look at log file we found this two sentences: 2023-05-16 08:36:23.702 -04:00 [WRN] '.AspNetCore.Correlation.k6C1kADq7q8UT-4lX7OYdS9D46DVzIYCwIEv-oTEMOw' cookie not found. 2023-05-16 08:36:23.703 -04:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<

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

  • ABP Framework version: v7.0.1

  • UI type: Blazor Server

  • DB provider: EF Core

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

  • Exception message and stack trace: 2023-05-16 08:36:23.702 -04:00 [WRN] '.AspNetCore.Correlation.k6C1kADq7q8UT-4lX7OYdS9D46DVzIYCwIEv-oTEMOw' cookie not found. 2023-05-16 08:36:23.703 -04:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.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.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.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

  • Steps to reproduce the issue:"

This error only happens on Blazor Server services. API Server and Authority Server works properly, we could login and execute endpoints directly in the API service, but front end on Blazor Server only shows a white screen without any message.. We have been created a restart task every early in the morning to avoid this happens.

The app is hosted on a windows 2019 server standard. What do you suggest to solve this problem?


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

    hi

    This seems to be a problem with cookies. It may be caused by the browser.

    Is there any error on browser console?

  • User Avatar
    0
    david.hurtado created

    No i don't get anything For example today server load the page but authority seems doesn't respond. In the front i get this error: But if i go to authority server page i see me session open.

  • User Avatar
    0
    david.hurtado created

    When we review log we get this:

    2023-05-17 09:15:37.105 -04:00 [ERR] Navigation failed when changing the location to https://localhost/Account/Login System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.<>c__DisplayClass13_0.<<NavigateToCore>g__PerformNavigationAsync|0>d.MoveNext() 2023-05-17 09:15:37.109 -04:00 [ERR] Unhandled exception in circuit 'CFHRyZWyJsWpZ-dA_32x3UcPdXVrMS63ePHVrCrXlx0'. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.<>c__DisplayClass13_0.<<NavigateToCore>g__PerformNavigationAsync|0>d.MoveNext()

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    TaskCanceledException may usually be a request timeout or something.

    We need more and details logs of all applications.

  • User Avatar
    0
    david.hurtado created

    Please, can you give me your email address to send you the complete information?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    liming.ma@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38