Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

An unhandled error has occurred. Reload #109

Closed
yanxiaodi opened this issue Aug 2, 2022 · 2 comments
Closed

An unhandled error has occurred. Reload #109

yanxiaodi opened this issue Aug 2, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@yanxiaodi
Copy link

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.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.

@amolenk amolenk self-assigned this Aug 9, 2022
@amolenk amolenk added the bug Something isn't working label Aug 9, 2022
@amolenk
Copy link
Collaborator

amolenk commented Aug 9, 2022

Thanks for reporting this @yanxiaodi !
Been able to repro this, will investigate what's going on.

@amolenk
Copy link
Collaborator

amolenk commented Aug 9, 2022

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.

@amolenk amolenk closed this as completed Aug 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants