ideine / modernhttpclient Goto Github PK
View Code? Open in Web Editor NEWThis project forked from anaisbetts/modernhttpclient
HttpClient implementations that use platform-native HTTP clients for :rocket:
License: MIT License
This project forked from anaisbetts/modernhttpclient
HttpClient implementations that use platform-native HTTP clients for :rocket:
License: MIT License
Hi, sometimes app crashes with the latest package version 3.2.1
here is crash log
`Package: {OUR_PACKAGE_NAME}
Version Code: 22
Version Name: 0.1.9
Android: 5.0.2
Android Build: LRX22G
Manufacturer: Xiaomi
Model: Redmi Note 3
Thread: OkHttp https://{OUR_SERVER}/...-554
Start Date: 2018-01-09T10:03:48.833Z
Date: 2018-01-09T10:32:41.337Z
Format: Xamarin
Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Javax.Net.Ssl.SSLSocketFactoryInvoker'.
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <2f3b056c7354448f85d9cbcbc3110cb9>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <2f3b056c7354448f85d9cbcbc3110cb9>:0
at Javax.Net.Ssl.SSLSocketFactoryInvoker.CreateSocket (Java.Net.Socket s, System.String host, System.Int32 port, System.Boolean autoClose) [0x00078] in :0
at ModernHttpClient.ImprovedSSLSocketFactory.CreateSocket (Java.Net.Socket s, System.String host, System.Int32 port, System.Boolean autoClose) [0x00000] in <42ea4b9c0b4149f69df09f119cb16421>:0
at Javax.Net.Ssl.SSLSocketFactory.n_CreateSocket_Ljava_net_Socket_Ljava_lang_String_IZ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_s, System.IntPtr native_host, System.Int32 port, System.Boolean autoClose) [0x00017] in :0
at (wrapper dynamic-method) System.Object:ed07f6be-75bf-4fec-9a7c-a5a212f0f6f4 (intptr,intptr,intptr,intptr,int,bool)
at md595f4b8ab717b9da13f11267a86077f20.ImprovedSSLSocketFactory.n_createSocket(Native Method)
at md595f4b8ab717b9da13f11267a86077f20.ImprovedSSLSocketFactory.createSocket(ImprovedSSLSocketFactory.java:84)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:270)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:251)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:151)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:195)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)`
and stacktrace
Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Javax.Net.Ssl.SSLSocketFactoryInvoker'.
Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self)<2f3b056c7354448f85d9cbcbc3110cb9>:0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractObjectMethod(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<2f3b056c7354448f85d9cbcbc3110cb9>:0
Javax.Net.Ssl.SSLSocketFactoryInvoker.CreateSocket(Socket s, string host, int port, bool autoClose):0
ModernHttpClient.ImprovedSSLSocketFactory.CreateSocket(Socket s, string host, int port, bool autoClose)<42ea4b9c0b4149f69df09f119cb16421>:0
Javax.Net.Ssl.SSLSocketFactory.n_CreateSocket_Ljava_net_Socket_Ljava_lang_String_IZ(IntPtr jnienv, IntPtr native__this, IntPtr native_s, IntPtr native_host, int port, bool autoClose):0
at (wrapper dynamic-method) System.Object:ed07f6be-75bf-4fec-9a7c-a5a212f0f6f4 (intptr,intptr,intptr,intptr,int,bool)
md595f4b8ab717b9da13f11267a86077f20.ImprovedSSLSocketFactory.n_createSocket(Native Method)
md595f4b8ab717b9da13f11267a86077f20.ImprovedSSLSocketFactory.createSocket()ImprovedSSLSocketFactory.java:84
okhttp3.internal.connection.RealConnection.connectTls()RealConnection.java:270
okhttp3.internal.connection.RealConnection.establishProtocol()RealConnection.java:251
okhttp3.internal.connection.RealConnection.connect()RealConnection.java:151
okhttp3.internal.connection.StreamAllocation.findConnection()StreamAllocation.java:195
okhttp3.internal.connection.StreamAllocation.findHealthyConnection()StreamAllocation.java:121
okhttp3.internal.connection.StreamAllocation.newStream()StreamAllocation.java:100
okhttp3.internal.connection.ConnectInterceptor.intercept()ConnectInterceptor.java:42
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:92
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:67
okhttp3.internal.cache.CacheInterceptor.intercept()CacheInterceptor.java:93
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:92
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:67
okhttp3.internal.http.BridgeInterceptor.intercept()BridgeInterceptor.java:93
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:92
okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept()RetryAndFollowUpInterceptor.java:120
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:92
okhttp3.internal.http.RealInterceptorChain.proceed()RealInterceptorChain.java:67
okhttp3.RealCall.getResponseWithInterceptorChain()RealCall.java:185
okhttp3.RealCall$AsyncCall.execute()RealCall.java:135
okhttp3.internal.NamedRunnable.run()NamedRunnable.java:32
java.util.concurrent.ThreadPoolExecutor.runWorker()ThreadPoolExecutor.java:1112
java.util.concurrent.ThreadPoolExecutor$Worker.run()ThreadPoolExecutor.java:587
java.lang.Thread.run()Thread.java:818
Is it possible to target .NetStandard please ?
Visual Studio allow your library to be used in .NetStandard project but leaves a warning saying package was restored and may not be fully compatible.
So it's not a real problem as the library seems to works fine this way, it's just an improvement request.
Thanks again for your work :)
Hi guys. I had serveral problems with the famous "SecureChannelFailure" with standard xamarin webclient.
No I am switching to ModernHttpClient. Sometimes i get an exception called "SSL handshake aborted".
This error occurs similar often as the "SecureChannelFailure" with the normal webclient.
Do these mistakes have something to do with each other?
Can someone help me to get rid of it?
Detailed error:
"SSL handshake aborted: ssl=0x4a0c4558: Failure in SSL library, usually a protocol error\nerror:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000) (external/openssl/ssl/s23_clnt.c:770 0x495ff069:0x00000000)"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.