Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 770 forks source link

error in ui client javascript - filter is not a function in liveness page #129

Closed erikrenaud closed 5 years ago

erikrenaud commented 5 years ago

My health endpoint correctly returns a 200 or 503 with contents similar to:

{"status":"Degraded","totalDuration":"00:00:00.0058159","entries":{"temporaryTestHealthCheck":{"data":{},"description":"healhty desription","duration":"00:00:00.0000064","status":"Healthy"},"2":{"data":{},"description":"degraded","duration":"00:00:00.0000017","status":"Degraded"}}}

The UI shows the error : Could not retrieve health checks data TypeError: A.filter is not a function at e.LivenessPage. (healthchecks-bundle.js:1) at Generator.next () at s (healthchecks-bundle.js:1)

My config is simple : app.UseHealthChecks("/health", new Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions() { Predicate = _ => true, ResponseWriter = HealthChecks.UI.Client.UIResponseWriter.WriteHealthCheckUIResponse }); app.UseHealthChecksUI(setup => { setup.ApiPath = "/health"; setup.UIPath = "/health-ui"; setup.ResourcesPath = "/health-ui-resources"; setup.WebhookPath = "/health-webhooks"; });

Any ideas - I am no javascript expert !

CarlosLanderas commented 5 years ago

Could you show your UI appsettings.json with configured healthcheck endpoints?

unaizorrilla commented 5 years ago

This is the typical error when your configuration is not well on the UI

erikrenaud commented 5 years ago

Thanks so much ! my appSettings.json stuff was not declared correctly...