-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
MAUI+Android: Error when disposing HttpResponseMessage #69464
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionAn HttpResponseMessage can be disposed while an HTTP request is in-progress. This cancels the HTTP request in the client and a notification is sent to the server that its been canceled. User reported error of this failing in MAUI+Android. Reproduction StepsExpected behaviorThe client cancels the HTTP request and a notification is sent to the server that it's been canceled. Actual behaviorException thrown on Android:
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionAn HttpResponseMessage can be disposed while an HTTP request is in-progress. This cancels the HTTP request in the client and a notification is sent to the server that its been canceled. User reported error of this failing in MAUI+Android. Reproduction StepsExpected behaviorThe client cancels the HTTP request and a notification is sent to the server that it's been canceled. Actual behaviorException thrown on Android:
|
This looks like the underlying handler is the AndroidNativeHandler. /cc @simonrozsival |
Hello, is there anything new? Many Thanks |
@simonrozsival can you please validate this is the AndroidMessageHandler? Can you see if sockets would exhibit the same behavior? |
@steveisok Based on the stack trace in it was the response of AndroidMessageHandler.
I wasn't able to reproduce the issue. Either the problem has been fixed in .NET 7 or .NET 8 or my code can't reproduce the issue and I'd need a repro project. @JamesNK were you able to reproduce this issue (I know it's over a year old..)? |
I'm moving the issue to .NET 9 since we won't be able to resolve it in time for .NET 8. |
@simonrozsival hello, I have tested with .NET 9 preview 3 and I still can reproduce this error, can you tell me when do you expect this to be fixed ? We have a different scenario, we are using server side events, with Observables, and when we dispose the observable we get the exact same crash in our MAUI app (tried on both version 8.0.10 and 9.0.0-preview.3.10457) only on Android thank you |
@Sergiu-Cosmin can you share a repro project with me? I wasn't able to reproduce the crash the last time I looked into it and so I wasn't able to fix the problem. If you could help me reproduce the issue, I'm sure we could fix it. |
@simonrozsival unfortunately I cannot share it since it is proprietary code, but I will try to make a simple PoC (hope I get the time) to illustrate the issue, thank you |
@simonrozsival, @Sergiu-Cosmin, I'm also facing this issue. If you get solution. Please can you share it here. Thank you |
This issue is possibly related to dotnet/android#9039 |
Description
An HttpResponseMessage can be disposed while an HTTP request is in-progress. This cancels the HTTP request in the client and a notification is sent to the server that its been canceled.
User reported error of this failing in MAUI+Android.
Reproduction Steps
See grpc/grpc-dotnet#1726
Expected behavior
The client cancels the HTTP request and a notification is sent to the server that it's been canceled.
Actual behavior
Exception thrown on Android:
The text was updated successfully, but these errors were encountered: