-
Notifications
You must be signed in to change notification settings - Fork 526
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
Reading Error response properly in AndroidClientHandler #180
Reading Error response properly in AndroidClientHandler #180
Conversation
- Removed java flame comments. - try to read use ErrorStream if error occured https://developer.android.com/reference/java/net/HttpURLConnection.html#getErrorStream()
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
Hi @smstuebe, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
// We should return the body of the response too but, alas, the Java client will throw | ||
// a, wait for it, FileNotFound exception if we attempt to access the input stream. So | ||
// no body, just a dummy. Java FTW! | ||
ret.Content = new StringContent ("Unauthorized", Encoding.ASCII); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no reason to remove the entire section of the comment. If you think that wording here is indeed inflammatory, please rephrase as there's actual information here.
Commented inline |
done. Better? |
build |
1 similar comment
build |
This problem seems to still occur on the latest Stable release of Xamarin.Android (7.0.1.2). When we read the |
@martinwiboe I can see the commit in the cycle 9 branch: https://github.com/xamarin/xamarin-android/blob/cycle9/src/Mono.Android/Xamarin.Android.Net/AndroidClientHandler.cs It's not in the cycle8-sr0, but it could be in cycle8 SR1 or 2, but we can only speculate since there are no branches for these releases. |
I can confirm that this fix is in Xamarin.Android 7.1.0.30. Which is (at least currently) available in the Beta channel. |
Windows machines do not include Java in their path by default, so it is a better experience to not require it for the build. Changes: - `JdkInfo.props` will export `$(JavaCPath)` and `$(JarPath)` - We can customize `$(JavaCPath)` and `$(JarPath)` as needed on Windows - `jdk.mk` generates these values as `javac` and `jar` for existing platforms What will need to happen downstream in Xamarin.Android: - `Configuration.OperatingSystem.props` and `JdkInfo.props` will set `$(JavaCPath)` and `$(JarPath)` for Windows - Changes to `PrepareWindows.targets` will be needed - Cleaned up `JNIEnvGenPath` and places that hardcoded `Configuration`
Changes: TODO Java.Interop Changes: dotnet/android-tools@9c641b3...7cfe683 * dotnet/android-tools@7cfe683: [ci] Use Microsoft.SourceLink.GitHub (dotnet#192) * dotnet/android-tools@01a0dde: [Localization] Import translated resx files (dotnet#189) * dotnet/android-tools@cc715d9: [Xamarin.Android.Tools.AndroidSdk] Permit NDK r25 (dotnet#190) * dotnet/android-tools@3c55e9a: Avoid `Environment.SpecialFolder.ApplicationData` (dotnet#188) * dotnet/android-tools@0d55472: LEGO: Merge pull request 187 * dotnet/android-tools@6946512: Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729154833425. (dotnet#186) * dotnet/android-tools@6e3433a: Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729025332507. (dotnet#185) * dotnet/android-tools@73c4388: [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-33 (dotnet#184) * dotnet/android-tools@da3653e: [Xamarin.Android.Tools.AndroidSdk] Add API-33 to KnownVersions * dotnet/android-tools@327d433: [ci] Run OneLocBuild on a schedule (dotnet#180) * dotnet/android-tools@8ab60e4: [ci] Use latest macOS and Windows images (dotnet#181) * dotnet/android-tools@4dd3292: LEGO: Merge pull request 182 * dotnet/android-tools@56b61f1: [Localization] Add OneLocBuild job (dotnet#175) * dotnet/android-tools@14076a6: [Xamarin.Android.Tools.AndroidSdk] Add API-32 to KnownVersions
…7309) Changes: mono/mono.posix@e1269a5...d8994ca * mono/mono.posix@d8994ca: Remove Windows support completely for now Fixes an issue in which Mono.Unix would try to resolve `libc` P/Invokes by looking for the `msvcrt` library on Unix machines. * mono/mono.posix@74d504f: Fix yaml template path * mono/mono.posix@127cf9e: [build] Don't rebuild managed code on packaging time on Windows Changes: dotnet/android-libzipsharp@2.0.4...2.0.7 * dotnet/android-libzipsharp@98e9173: Bump version to 2.0.7 * dotnet/android-libzipsharp@6e1e1b3: Localized file check-in by OneLocBuild Task: Build definition ID 11678: Build ID 6581869 (#119) * dotnet/android-libzipsharp@1c05430: LEGO: Merge pull request 118 * dotnet/android-libzipsharp@06d44d8: Localized file check-in by OneLocBuild Task: Build definition ID 11678: Build ID 6570668 (#117) * dotnet/android-libzipsharp@37f3894: LEGO: Merge pull request 116 * dotnet/android-libzipsharp@6c0edc5: Update libzip and zlib submodules (#115) * dotnet/android-libzipsharp@acd9a54: [Localization] Switch from xlf to resx files (#112) * dotnet/android-libzipsharp@3cece80: LEGO: Merge pull request 114 * dotnet/android-libzipsharp@fe336b4: LEGO: Merge pull request 113 * dotnet/android-libzipsharp@9aee99a: [Localization] Add OneLocBuild job (#111) * dotnet/android-libzipsharp@bdfa9f8: Bump Mono.Unix to 7.1.0-final.1.21458.1 (#110) Changes: xamarin/monodroid@210073e...100ccf9 * xamarin/monodroid@100ccf969: Bump to xamarin/androidtools@81486ab, xamarin/android-sdk-installer@8cac7ea (#1264) Changes: dotnet/android-tools@9c641b3...29f11f2 * dotnet/android-tools@29f11f2 Bump to mono/mono.posix@d8994ca, dotnet/android-libzipsharp@98e9173 (#193) * dotnet/android-tools@7cfe683 [ci] Use Microsoft.SourceLink.GitHub (#192) * dotnet/android-tools@01a0dde [Localization] Import translated resx files (#189) * dotnet/android-tools@cc715d9 [Xamarin.Android.Tools.AndroidSdk] Permit NDK r25 (#190) * dotnet/android-tools@3c55e9a Avoid `Environment.SpecialFolder.ApplicationData` (#188) * dotnet/android-tools@0d55472 LEGO: Merge pull request 187 * dotnet/android-tools@6946512 Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729154833425. (#186) * dotnet/android-tools@6e3433a Juno: check in to juno/hb_befb220e-87ce-47e9-a9e6-10ea592b2337_20220729025332507. (#185) * dotnet/android-tools@73c4388 [Xamarin.Android.Tools.AndroidSdk] Update SDK component for API-33 (#184) * dotnet/android-tools@da3653e [Xamarin.Android.Tools.AndroidSdk] Add API-33 to KnownVersions * dotnet/android-tools@327d433 [ci] Run OneLocBuild on a schedule (#180) * dotnet/android-tools@8ab60e4 [ci] Use latest macOS and Windows images (#181) * dotnet/android-tools@4dd3292 LEGO: Merge pull request 182 * dotnet/android-tools@56b61f1 [Localization] Add OneLocBuild job (#175) * dotnet/android-tools@14076a6 [Xamarin.Android.Tools.AndroidSdk] Add API-32 to KnownVersions
ErrorStream
if error occurredhttps://developer.android.com/reference/java/net/HttpURLConnection.html#getErrorStream()
Sorry for not updating / writing test. Could not build the test project.