Comments (6)
@simonrozsival sorry for the confusion, that was actually a valid host address, I just replaced it with the "<app-host>"
before posting here. In any case, like you said, even that shouldn't have crashed the app.
from xamarin-android.
I guess it's best for us to switch back to the native handler then, since it at least gives us less of these crashes. Thanks for you assist @simonrozsival!
If I can find a repro, I'll reopen the issue.
from xamarin-android.
We tried publishing the app with both native and managed HTTP handlers, and in any case we still see these crashes.
@akravch This is quite interesting. Both of these stack traces are from apps that use the managed HTTP handler, aren't they? Do you have a stack trace from an app with the native handler?
from xamarin-android.
Both of these stack traces are from apps that use the managed HTTP handler, aren't they?
Yes, they both are.
Unfortunately, our stack traces from the native handler build are symbolificated even worse than the ones I posted before, even the library names are indistinguishable. Although by the structure it's very close to the second one I posted in my previous message, so I guess they should be same.
Stack trace
split_config.arm64_v8a.apk 0x697319a4 + 22948
split_config.arm64_v8a.apk 0x69731940 + 22848
split_config.arm64_v8a.apk 0x69750f8c + 151436
libSystem.Security.Cryptography.Native.Android.so AndroidCryptoNative_SSLStreamShutdown
split_config.arm64_v8a.apk 0x6972db00 + 6912
split_config.arm64_v8a.apk 0x6972dbd8 + 7128
split_config.arm64_v8a.apk 0x69750314 + 148244
split_config.arm64_v8a.apk 0x6973e05c + 73820
split_config.arm64_v8a.apk 0x697397bc + 55228
split_config.arm64_v8a.apk 0x69738e04 + 52740
split_config.arm64_v8a.apk 0xdc2a4014 + 8212
split_config.arm64_v8a.apk 0xdc2a3f28 + 7976
split_config.arm64_v8a.apk 0xdc2ac840 + 43072
split_config.arm64_v8a.apk 0xdc2a55b4 + 13748
split_config.arm64_v8a.apk 0xdc2a3e28 + 7720
split_config.arm64_v8a.apk 0xdc2ae9d8 + 51672
split_config.arm64_v8a.apk 0xdc467224 + 160292
split_config.arm64_v8a.apk 0xdc46127c + 135804
split_config.arm64_v8a.apk 0xdc4669d0 + 158160
split_config.arm64_v8a.apk 0x35afb5c + 2190172
split_config.arm64_v8a.apk 0x35eb9fc + 2435580
split_config.arm64_v8a.apk 0x35e1054 + 2392148
split_config.arm64_v8a.apk 0x35e0e48 + 2391624
split_config.arm64_v8a.apk 0x35de798 + 2381720
split_config.arm64_v8a.apk 0x35de728 + 2381608
split_config.arm64_v8a.apk 0x35de380 + 2380672
split_config.arm64_v8a.apk 0x35de2c8 + 2380488
split_config.arm64_v8a.apk 0x35df2c4 + 2384580
split_config.arm64_v8a.apk 0x35df020 + 2383904
split_config.arm64_v8a.apk 0x35def20 + 2383648
split_config.arm64_v8a.apk 0x35c1838 + 2263096
split_config.arm64_v8a.apk 0x35d1504 + 2327812
split_config.arm64_v8a.apk 0x35a4fa8 + 2146216
libmonosgen-2.0.so mono_get_runtime_build_info
libmonosgen-2.0.so mono_thread_internal_is_current
libc.so 0x30e16f7c + 794492
Also, in our application logs for some of there crashes with the native handler I see that exceptions were thrown internally just before the crash, but they are handled by our code and should not crash the app. Not sure if it's related to the native crash or just a coincidence:
Exceptions
---> System.Net.Http.HttpRequestException: Connection failure
---> Java.IO.IOException: Unable to resolve host "<app-host>": No address associated with hostname
at Java.Interop.JniEnvironment.InstanceMethods.CallVoidMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args)
at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractVoidMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters)
at Javax.Net.Ssl.HttpsURLConnectionInvoker.Connect()
at Xamarin.Android.Net.AndroidMessageHandler.<>c__DisplayClass133_0.<ConnectAsync>b__0()
--- End of managed Java.IO.IOException stack trace ---
java.net.UnknownHostException: Unable to resolve host "<app-host>": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:124)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
at java.net.InetAddress.getAllByName(InetAddress.java:1152)
at com.android.okhttp.Dns$1.lookup(Dns.java:41)
at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
--- End of managed Java.IO.IOException stack trace ---
java.net.UnknownHostException: Unable to resolve host "<app-host>": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:124)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
at java.net.InetAddress.getAllByName(InetAddress.java:1152)
at com.android.okhttp.Dns$1.lookup(Dns.java:41)
at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30)
Exception_EndOfInnerExceptionStack
at Xamarin.Android.Net.AndroidMessageHandler.<>c__DisplayClass133_0.<ConnectAsync>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__281_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Xamarin.Android.Net.AndroidMessageHandler.DoProcessRequest(HttpRequestMessage request, URL javaUrl, HttpURLConnection httpConnection, CancellationToken cancellationToken, RequestRedirectionState redirectState)
at Xamarin.Android.Net.AndroidMessageHandler.DoSendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at <app-code>
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at <app-code>
at <app-code>
Exception_EndOfInnerExceptionStack
System.Net.WebException: Socket closed
---> Java.Net.SocketException: Socket closed
at Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args)
at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualInt32Method(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters)
at Java.Net.HttpURLConnection.get_ResponseCode()
at Xamarin.Android.Net.AndroidMessageHandler.<>c__DisplayClass136_0.<DoProcessRequest>b__2()
at System.Threading.Tasks.Task`1[[System.Net.HttpStatusCode, System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__281_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Xamarin.Android.Net.AndroidMessageHandler.DoProcessRequest(HttpRequestMessage request, URL javaUrl, HttpURLConnection httpConnection, CancellationToken cancellationToken, RequestRedirectionState redirectState)
at Xamarin.Android.Net.AndroidMessageHandler.DoSendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
--- End of managed Java.Net.SocketException stack trace ---
java.net.SocketException: Socket closed
at java.net.SocketInputStream.read(SocketInputStream.java:188)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:983)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:947)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:862)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:835)
at com.android.okhttp.okio.Okio$2.read(Okio.java:138)
at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:213)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:307)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:301)
at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:197)
at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:188)
at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:129)
at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:750)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:622)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
--- End of managed Java.Net.SocketException stack trace ---
java.net.SocketException: Socket closed
at java.net.SocketInputStream.read(SocketInputStream.java:188)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:983)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:947)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:862)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:835)
at com.android.okhttp.okio.Okio$2.read(Okio.java:138)
at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:213)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:307)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:301)
at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:197)
at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:188)
at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:129)
at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:750)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:622)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
Exception_EndOfInnerExceptionStack
at Xamarin.Android.Net.AndroidMessageHandler.DoSendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at <app-code>
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at <app-code>
at <app-code>
So are you saying we shouldn't see calls to libSystem.Security.Cryptography.Native.Android.so
when using the native handler at all? I wonder if it can be just some dependency we reference that instantiates SocketsHttpHandler
explicitly then...
from xamarin-android.
So are you saying we shouldn't see calls to libSystem.Security.Cryptography.Native.Android.so when using the native handler at all?
Yes, those code paths are only used in the managed handler and not in the native handler. The exceptions that have the java stacktraces and Xamarin.Android.Net.AndroidMessageHandler
mentioned in them come from the native handler.
Unable to resolve host
"<app-host>"
: ...
This looks suspicious. Is that a string that you could somehow pass to the handler (by accident I assume)? Even if that were the case, I'm not sure why the app would crash.
from xamarin-android.
@akravch thanks for the clarification. Unfortunately, there's not much to go by at the moment and unless we're able to reproduce the issue, I don't think we can fix it. Since the app crashes with both the native and managed handler, which are both implemented in a very different way, it makes me wonder if this is caused by some unexpected behavior of your server or global networking configuration of the device (proxy, VPN, DNS settings) that causes the app to crash.
from xamarin-android.
Related Issues (20)
- Error APT2260 when reference to Binding project HOT 6
- GenerateJavaStubs takes a long time when building incrementally for a maui project HOT 2
- how to use c++ dll in .net android (or MAUI android)? HOT 2
- Xamarin.Android.Aapt2.targets(123,3): error APT2144 com.stripe:stripe-android:20.40.4 HOT 12
- HttpClient and AcceptEncoding gzip on Android stoped working after latest SR4 release. HOT 17
- Unable to turn off Fast Deployment for .Net8 Maui Android project HOT 6
- [Question] A way to connect Mono Debugger for the Release builds
- Trimming still seems to break android push notifications on MAUI .net 9 preview 3 HOT 2
- `TrimMode=full` seems to break android push notifications on MAUI .net 9 preview 3 HOT 10
- Assetpack file not included on "Debug" compilation HOT 3
- AndroidMessageHandler: HTTP status code 308 is throwing an exception
- `InstallAndroidDependencies` target always warns about `tools`
- Fast Deploy issue on some Lollipop (5.1.1) devices HOT 1
- Lots of typemap errors triggered by XAML Live Preview HOT 1
- build issue typemaps.x86_64.ll: error: Could not open input file: no such file or directory HOT 14
- Downgrade android/ios .NET 8 workload to specific version HOT 1
- .NET MAUI Blazor Hybrid Localization issue HOT 1
- How to exclude some libraries to be trimmed in .NET 8 for Android, not MAUI? HOT 12
- App Crashes when using bundle.config with abi splits set to negate. HOT 5
- `[libc] Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE)` after clearing cache and user data HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin-android.