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

[eShopLite] Exception when navigating to cart #36

Closed
timheuer opened this issue Nov 17, 2023 · 3 comments · Fixed by #51
Closed

[eShopLite] Exception when navigating to cart #36

timheuer opened this issue Nov 17, 2023 · 3 comments · Fixed by #51
Assignees

Comments

@timheuer
Copy link
Member

I'm not sure how functional the sample is supposed to be but...

  1. Run the eShopLite apphost
  2. Navigate to frontend
  3. add some things to cart
  4. Click cart
    OBSERVE: Cart goes from a count to 0
  5. Click cart again
    OBSERVE: exception
Grpc.Core.RpcException: Status(StatusCode="NotFound", Detail="Basket with buyer id user does not exist")
   at eShopLite.Frontend.Services.BasketServiceClient.CheckoutBasketAsync(String buyerId) in D:\GitHub\aspire-samples\samples\eShopLite\eShopLite.Frontend\Services\BasketServiceClient.cs:line 60
   at eShopLite.Frontend.Components.Cart.HandleCheckout() in D:\GitHub\aspire-samples\samples\eShopLite\eShopLite.Frontend\Components\Cart.razor:line 42
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.Forms.EditForm.HandleSubmitAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
@davidfowl davidfowl removed their assignment Nov 17, 2023
@baskan
Copy link

baskan commented Nov 18, 2023

because there is no "cart page", clicking cart icon check-out the cart and removes the contents of the cart that's why cart doesn't exists.

@DamianEdwards
Copy link
Member

I think this started happening when we did a refactoring of the gRPC logic for the basket service (here? dotnet/aspire#361) in the main repo version of this but I perhaps haven't ported it over fully. Let me take another look.

@DamianEdwards DamianEdwards changed the title [eShopLite] Exception when navigating to car [eShopLite] Exception when navigating to cart Nov 29, 2023
DamianEdwards added a commit that referenced this issue Nov 29, 2023
@DamianEdwards
Copy link
Member

DamianEdwards commented Nov 29, 2023

OK yep this is a side-effect of dotnet/aspire#361. I have a fix in PR now.

@DamianEdwards DamianEdwards self-assigned this Nov 29, 2023
DamianEdwards added a commit that referenced this issue Nov 29, 2023
meneasysoft pushed a commit to meneasysoft/aspire-samples that referenced this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants