-
Notifications
You must be signed in to change notification settings - Fork 769
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
Stream Cancel doesn't work with Grpc.Net.Client.Web #1726
Comments
IMPORTANT: An exception only occurs if the server has already sent data and you then cancel |
Android testing with gRPC isn't well tested yet, we are working on improving this for .NET 7. You can use standard unary calls instead of streaming for now to workaround this. |
We're using dotnet/runtime#69095 to track better support on mobile platforms. Thanks for the bug report. |
Btw, this issue isn't in grpc-dotnet. I've also created an issue in dotnet/runtime to fix it in .NET Android's HttpClient - dotnet/runtime#69464 |
Hello, I have the problem that if I want to cancel the ResponseStream with a CancellationTokenSource.Token, an exception occurs.
What version of gRPC and what language are you using?
2.45.0
What operating system (Linux, Windows,...) and version?
Android & Windows
What runtime / compiler are you using (e.g. .NET Core SDK version
dotnet --info
)OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.300-preview.22204.3\
Host (useful for support):
Version: 6.0.4
Commit: be98e88c76
.NET SDKs installed:
6.0.202 [C:\Program Files\dotnet\sdk]
6.0.300-preview.22204.3 [C:\Program Files\dotnet\sdk]
What did you do?
I have an ASP core server that has full code
Then I have a NET MAUI application that has complete code
If I now want to cancel the stream on the client (NET MAUI) side, I do the following
StreamCancellationTokenSource?.Cancel();
So and here comes the difference I use the Grpc.Net.Client.Web because unfortunately Android only supports that then there is an error.
If I use the Grpc.Net.Client with Windows Application it works as desired
What did you expect to see?
It would be nice if both worked the same way
What did you see instead?
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment?
The text was updated successfully, but these errors were encountered: