Closed jfversluis closed 3 months ago
Issue moved from dotnet/maui#19092
From @jfversluis on Wednesday, November 29, 2023 10:07:13 AM
I think there have been issues about this before and if anything this probably belongs on this repo: https://github.com/xamarin/xamarin-android
@jonpryor ?
Issue moved from dotnet/maui#19092
From @msftbot[bot] on Wednesday, November 29, 2023 12:25:19 PM
Hi @LongJohnBlackbeard. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Issue moved from dotnet/maui#19092
From @mattleibow on Wednesday, November 29, 2023 12:25:57 PM
Does this work on Windows?
If not, then we can move to runtime, otherwise this is an Android issue.
Issue moved from dotnet/maui#19092
From @LongJohnBlackbeard on Wednesday, November 29, 2023 1:31:56 PM
Does this work on Windows?
If not, then we can move to runtime, otherwise this is an Android issue.
Worked in windows but not in android emulator or android physical device.
@LongJohnBlackbeard I'm not able to reproduce the issue. I was able to make HTTP requests to servers with TLS v1.3. TLS v1.3 should be supported on Android on API levels 29+. Can you please try running the following code?
var httpClient = new HttpClient(new AndroidMessageHandler());
var response = await httpClient.GetAsync("https://www.howsmyssl.com/a/check");
var message = await response.Content.ReadAsStringAsync();
var supportsTls13 = message.Contains("\"tls_version\":\"TLS 1.3\"");
Console.WriteLine(supportsTls13);
A simple .NET Android app cannot call to a local hosted .NET API app. Any workarounds?
@LongJohnBlackbeard have you been able to resolve this issue? I have tried reproducing it again and I'm still not able to observe the same failure. I would need more information to be able to do something about this issue.
@tuyen-vuduc my first thought is that you need to correctly setup port forwarding using adb
(see https://developer.android.com/tools/adb#forwardports). Please open a new issue and provide more details if this doesn't help.
@simonrozsival I worked around by utilizing ngrok. I didn't try ADB option yet.
Hi @jfversluis. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.
Issue moved from dotnet/maui#19092
From @LongJohnBlackbeard on Tuesday, November 28, 2023 10:37:10 PM
Description
Created a MAUI Blazor Hybrid application for a R&D project that makes HTTPS REST calls to a on prem ERP API layer that uses TLSv1.2 or 1.3. When running the project the windows machine works fine but gives SSL errors when run on an android emulator or a physical device. Most issues and stackoverflow posts i've seen related to this regard locally hosted APIs and more often than not the solution is to bypass SSL checks. I am not calling a local API but a ERP servers test environment, I make calls to this server in many other applications with no issues.
I have removed auth or url links from code below.
Manifest
Service
Steps to Reproduce
Create .NET MAUI Blazor Hybrid Application Create Interface and Service to make HTTPS calls to a API layer enforcing TLSv1.2 or 1.3 Run the application on ann android device or emulator
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13 API 33
Did you find any workaround?
Have not been able to get it to work on Android
Relevant log output