[.NET 11] AndroidMessageHandler still throws IOException during upload
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- android, csharp
- Ambito
- mobile-dev, networking
Direzione di ricerca
Start by running the attached repro with the commands in README.md and reviewing AndroidMessageHandler.WriteRequestContentToOutput. Compare the AndroidMessageHandler and SocketsHttpHandler results for the connection reset, and read the related fixes in #11682, #11683, and #11554. Done means this upload failure follows the expected HttpRequestException behavior without treating it as cancellation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Android framework version
net11.0-android (Preview)
Description
I hit System.IO.IOException: Software caused connection abort while uploading to OneDrive after moving my app to .NET 11. The inner exception is Java.Net.SocketException, and the stack points to AndroidMessageHandler.WriteRequestContentToOutput.
The attached repro triggers the same exception types by resetting a connection during a PUT upload. AndroidMessageHandler throws IOException; SocketsHttpHandler throws the expected HttpRequestException. The token is never cancelled.
This looks like a remaining case after #11682. The related fixes in #11683 and #11554 cover cancellation, which doesn't apply here.
The Preview 6 release notes say:
AndroidMessageHandleris brought in line with theHttpClientcontract andSocketsHttpHandlerbehavior
Could this case also be fixed before .NET 11 ships? I simplified my error handling after the migration to catch HttpRequestException for network failures. This error now bypasses the retry and shows an unexpected-error dialog.
Steps to Reproduce
- Extract AndroidMessageHandlerUploadAbort-source.zip
- Build and run the app on a device or emulator using the commands in
README.md. - Read the results on screen or with
adb logcat -s UploadAbortRepro:I.
The app runs its own loopback server, which reads the headers and 1 KiB of a 16 MiB upload, then resets the connection with SO_LINGER=0. No external server or account is needed.
Results
Reproduced on three consecutive launches on each device:
| Handler | Exception from SendAsync | Inner exception |
|---|---|---|
| AndroidMessageHandler | System.IO.IOException | Java.Net.SocketException |
| SocketsHttpHandler | System.Net.Http.HttpRequestException | System.IO.IOException |
The Android handler's stack includes WriteRequestContentToOutput. Both tokens remain uncancelled. I would expect HttpRequestException from both handlers for this network failure.
Environment
net11.0-android, SDK11.0.100-rc.1.26425.128- Android workload
37.0.0-rc.1.2257 - Physical Pixel 7: Android 17 / API 37, arm64
- Pixel 9a emulator: Android 16 / API 36 (
android-36.1image), x86_64
- Lingua principale
- C#
- Stelle
- 2.1k
- Fork
- 580
- Merge medio
- 2g 1h
- PR unite (30g)
- 220
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/android
-
Area: App+Library Build
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Area: Debugger enhancement needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Area: Mono.Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
dotnet/android#9192 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Area: App+Library Build needs-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/android
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NethermindEth/nethermind#14012 ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies Status: Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
json-schema-org/website#2518 ·
I maintainer di solito rispondono entro 1 giorno
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
builtbybel/Flyoobe#498 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
builtbybel/CrapFixer#112 ·