Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HealthChecks-UI Shows blank screen, error in console logged #2053

Open
ShvetsovZE opened this issue Oct 9, 2023 · 1 comment
Open

HealthChecks-UI Shows blank screen, error in console logged #2053

ShvetsovZE opened this issue Oct 9, 2023 · 1 comment

Comments

@ShvetsovZE
Copy link

ShvetsovZE commented Oct 9, 2023

What happened:
Setup HealthChecksUI in NET 7 project

What you expected to happen:
View Healthcheck status through UI.

How to reproduce it (as minimally and precisely as possible):
Navigate to the /health-ui/ page
App then navigates to /health-ui#/healthchecks
See API Call retrieve status from /healthz/ successfully.
Check the error in the browser console
image

Source code sample:

 app.UseEndpoints(
     endpoints =>
     {
         endpoints.MapHealthChecks("/health", new HealthCheckOptions
         {
             ResultStatusCodes =
             {
                 [HealthStatus.Healthy] = StatusCodes.Status200OK,
                 [HealthStatus.Degraded] = StatusCodes.Status200OK,
                 [HealthStatus.Unhealthy] = StatusCodes.Status503ServiceUnavailable
             },
         });
         endpoints.MapHealthChecks("/healthz", new HealthCheckOptions
         {
             Predicate = _ => true,
             ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
         });
         endpoints.MapControllers();
     });
 app.UseResponseCaching();
 app.UseHealthChecksUI(config =>
 {
     config.UIPath = "/health-ui";
     config.ApiPath = "/healthz";
     config.AsideMenuOpened = false;
 });

Anything else we need to know?:
it's a copy of #774, the difference is looks like my API paths are different for general health check call and for the UI. Response from /healthz could be found below

{
  "status": "Healthy",
  "totalDuration": "00:00:00.1139819",
  "entries": {
    "azure_cosmosdb": {
      "data": {
        
      },
      "duration": "00:00:00.1131929",
      "status": "Healthy",
      "tags": [
        
      ]
    }
  }
}

Environment:

  • .NET version 7
  • Healthchecks version - 7.0.2
  • Operative system: windows
  • Others:
@sungam3r
Copy link
Collaborator

sungam3r commented Dec 3, 2023

Rel #1839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants