thinktecture-labs / article-gRPC-blazor

Demo to show end to end communication between a blazor webassembly client and a server with gRPC
2 stars 2 forks source link

issue running demo #1

Open ctwoodwa opened 1 year ago

ctwoodwa commented 1 year ago

Thank you for taking the time to write this article.

After downloading and attempting to run the projects and add a new task, I'm receiving an issue with the grpc connection.

the error message is: crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: TypeError: Failed to fetch JSException: TypeError: Failed to fetch", DebugException="System.Net.Http.HttpRequestException: TypeError: Failed to fetch") Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: TypeError: Failed to fetch JSException: TypeError: Failed to fetch", DebugException="System.Net.Http.HttpRequestException: TypeError: Failed to fetch") ---> System.Net.Http.HttpRequestException: TypeError: Failed to fetch ---> TypeError: Failed to fetch --- End of inner exception stack trace --- at System.Net.Http.BrowserHttpInterop.d131[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Net.Http.BrowserHttpHandler.CallFetch(HttpRequestMessage request, CancellationToken cancellationToken, Nullable1 allowAutoRedirect) at System.Net.Http.BrowserHttpHandler.gImpl|55_0(HttpRequestMessage request, CancellationToken cancellationToken, Nullable1 allowAutoRedirect) at Grpc.Net.Client.Web.GrpcWebHandler.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Grpc.Net.Client.Internal.GrpcCall2.d74[[GrpcToDo.Shared.DTOs.ToDoData, GrpcToDo.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GrpcToDo.Shared.DTOs.ToDoRequestResponse, GrpcToDo.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() --- End of inner exception stack trace --- at ProtoBuf.Grpc.Internal.Reshape.d16`2[[GrpcToDo.Shared.DTOs.ToDoData, GrpcToDo.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[GrpcToDo.Shared.DTOs.ToDoRequestResponse, GrpcToDo.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in /_/src/protobuf-net.Grpc/Internal/Reshape.cs:line 554 at GrpcToDo.Client.Components.ToDoItemEditor.AddNewTask(MouseEventArgs e) in C:\Projects\article-gRPC-blazor-main\article-gRPC-blazor-main\GrpcToDo.Client\Components\ToDoItemEditor.razor.cs:line 25 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at MudBlazor.MudBaseButton.OnClickHandler(MouseEventArgs ev) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

patrickjahr commented 1 year ago

Thanks for info. I'll look at it in a reasonable time

patrickjahr commented 1 year ago

@ctwoodwa Do you start both projects? Server and Client? Because the client project is not a hosted project.