eShopOnDapr
eShopOnDapr copied to clipboard
An unhandled error has occurred. Reload
Following the document to deploy the app on a local k8s with Docker Desktop, see the error below after logging in with the test account:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) /gateway/b/api/v1/basket/:1
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: net_http_message_not_success_statuscode, 500, Internal Server Error System.Net.Http.HttpRequestException: net_http_message_not_success_statuscode, 500, Internal Server Error at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at System.Net.Http.Json.HttpClientJsonExtensions.<GetFromJsonAsyncCore>d__13`1[[Microsoft.eShopOnDapr.BlazorClient.Basket.BasketData, BlazorClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at Microsoft.eShopOnDapr.BlazorClient.Basket.BasketClient.GetItemsAsync() at Microsoft.eShopOnDapr.BlazorClient.Basket.UserBasket.LoadAsync() at Microsoft.eShopOnDapr.BlazorClient.Shared.BasketLoader.OnParametersSetAsync() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
It is similar with #85 but not the same. HealthCheck all green. It seems like the gateway is not working.
Thanks for reporting this @yanxiaodi ! Been able to repro this, will investigate what's going on.
This turned out to be a problem with the secrets in K8s. Because the secret store wasn't set up properly, the state store component (which the Basket Service depends on) was unavailable. Fixed by #112.
I've tested this using the default :latest
containers on Docker Hub. If you're using your own locally build containers, please rebuild them from the latest version of the source code. Reason is that the Dapr component names were prefixed with eshop
in the older code which has recently been changed to eshopondapr
.