Crash in Android Browser 4.3

I am having a problem with my web view payement in Android from version 4.3.

I assume this is due to the forwarding of the SSL certificate, but I cannot change it.

I tried the url on samsung or sony <4.2 with success, but on two different 4.3 connections I got this dump.

08-08 17:22:38.619: E/AndroidRuntime(7568): FATAL EXCEPTION: WebViewCoreThread 08-08 17:22:38.619: E/AndroidRuntime(7568): java.lang.StringIndexOutOfBoundsException: length=0; index=-1 08-08 17:22:38.619: E/AndroidRuntime(7568): at java.lang.AbstractStringBuilder.indexAndLength(AbstractStringBuilder.java:212) 08-08 17:22:38.619: E/AndroidRuntime(7568): at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:206) 08-08 17:22:38.619: E/AndroidRuntime(7568): at java.lang.StringBuffer.charAt(StringBuffer.java:346) 08-08 17:22:38.619: E/AndroidRuntime(7568): at com.android.org.bouncycastle.asn1.x509.X509NameTokenizer.nextToken(X509NameTokenizer.java:78) 08-08 17:22:38.619: E/AndroidRuntime(7568): at com.android.org.bouncycastle.asn1.x509.X509Name.<init>(X509Name.java:719) 08-08 17:22:38.619: E/AndroidRuntime(7568): at com.android.org.bouncycastle.asn1.x509.X509Name.<init>(X509Name.java:655) 08-08 17:22:38.619: E/AndroidRuntime(7568): at com.android.org.bouncycastle.asn1.x509.X509Name.<init>(X509Name.java:593) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.net.http.SslCertificate$DName.<init>(SslCertificate.java:379) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.net.http.SslCertificate.<init>(SslCertificate.java:189) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.net.http.SslCertificate.<init>(SslCertificate.java:178) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.webkit.BrowserFrame.setCertificate(BrowserFrame.java:1206) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.webkit.JWebCoreJavaBridge.nativeServiceFuncPtrQueue(Native Method) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:113) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.os.Handler.dispatchMessage(Handler.java:99) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.os.Looper.loop(Looper.java:137) 08-08 17:22:38.619: E/AndroidRuntime(7568): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:814) 08-08 17:22:38.619: E/AndroidRuntime(7568): at java.lang.Thread.run(Thread.java:841) 

my webview is just

 webview=(WebView)findViewById(R.id.my_web_view); WebSettings webSettings = webview.getSettings(); webSettings.setJavaScriptEnabled(true); 

thanks a lot

+2
source share
2 answers

This is an issue with android v4.3, this only happens when browsing the web while trying to open the https page. To learn more about this issue, read the link provided.

In short, android fixed this problem at the end and should be available with the next version 4.3.

+6
source

Although rahul.garg is correct, you can solve this problem by adding the following permissions to the application file.
Android: name = "android.permission.INTERNET" Android: name = "android.permission.ACCESS_NETWORK_STATE"

0
source

Source: https://habr.com/ru/post/1502367/


All Articles