01-15 12:13:22.836 9986 9986 E AndroidRuntime: FATAL EXCEPTION: main
01-15 12:13:22.836 9986 9986 E AndroidRuntime: Process: com.tencent.qt.sns, PID: 9986
01-15 12:13:22.836 9986 9986 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method b()I in class Landroid/net/http/SslError; or its super classes (declaration of 'android.net.http.SslError' appears in /system/framework/framework.jar)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at oicq.wlogin_sdk.quicklogin.d.onReceivedSslError(QuickLoginWebViewActivity.java:175)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at com.android.webview.chromium.Ap.onReceivedSslError(WebViewContentsClientAdapter.java:447)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at org.chromium.android_webview.AwContentsClientBridge$$Lambda$1.run(Unknown Source:2)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:790)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6518)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
01-15 12:13:22.836 9986 9986 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-15 12:13:22.837 9986 9986 W MtaSDK : [main(2): SourceFile:380] - crash happened, but MTA AutoExceptionCaught is desable.
01-15 12:13:22.837 9986 9986 W System.err: java.lang.NoSuchMethodError: No virtual method b()I in class Landroid/net/http/SslError; or its super classes (declaration of 'android.net.http.SslError' appears in /system/framework/framework.jar)
01-15 12:13:22.838 9986 9986 W System.err: at oicq.wlogin_sdk.quicklogin.d.onReceivedSslError(QuickLoginWebViewActivity.java:175)
01-15 12:13:22.838 9986 9986 W System.err: at com.android.webview.chromium.Ap.onReceivedSslError(WebViewContentsClientAdapter.java:447)
01-15 12:13:22.838 9986 9986 W System.err: at org.chromium.android_webview.AwContentsClientBridge$$Lambda$1.run(Unknown Source:2)
01-15 12:13:22.838 9986 9986 W System.err: at android.os.Handler.handleCallback(Handler.java:790)
01-15 12:13:22.838 9986 9986 W System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
01-15 12:13:22.838 9986 9986 W System.err: at android.os.Looper.loop(Looper.java:164)
01-15 12:13:22.838 9986 9986 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6518)
01-15 12:13:22.838 9986 9986 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-15 12:13:22.838 9986 9986 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
1. we can find NoSuchMethodError exception in the log
01-01 01:31:05.279 15621 15621 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method b()I in class Landroid/net/http/SslError; or its super classes (declaration of 'android.net.http.SslError' appears in /system/framework/framework.jar)
2. apk has it's own android.net.http.SslError in the class.dex, not that one in the /system/framework/framework.jar
sslError.class
package android.net.http;
import java.security.cert.X509Certificate;
public class SslError
{
@Deprecated
public SslError(int paramInt, SslCertificate paramSslCertificate)
{
throw new RuntimeException("Stub!");
}
...
3. the exception is thrown when call paramSslError.b() by it's onReceivedSslError() of class3.dex,
d.class
public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError)
{
util.LOGI("ssl error " + paramSslError.b());
if (true == QuickLoginWebViewActivity.a)
{
paramSslErrorHandler.proceed();
return;
}
AlertDialog.Builder localBuilder = new AlertDialog.Builder(this.b);
localBuilder.setMessage("頁面證書錯誤(" + paramSslError.b() + "),是否繼續?");
localBuilder.setPositiveButton("繼續", new e(this, paramSslErrorHandler));
localBuilder.setNegativeButton("取消", new f(this, paramSslErrorHandler));
AlertDialog localAlertDialog = localBuilder.create();
4. after parsered the class.dex, we can find the class sslError lied in it, but it's method b() is not in it.
method b() defined in sslError.java ,
public int b()
{
throw new RuntimeException("Stub!");
}
5. after parsered the class3.dex, we can find method b() lied in it's method section, it's index is 570, but it's class does not lie in class3.dex, rather than lie in class.dex, so the ResolveMethod() in the class_linker.cc can't find the method b(), then an exception of NoSuchMethodError is thrown. it's an issue of multidex caused by apk owner.
6.why the issue only found on SDM450?
then we go back to the callback function onReceivedSslError(),
public void onReceivedSslError(WebView paramWebView, SslErrorHandler paramSslErrorHandler, SslError paramSslError)
{
util.LOGI("ssl error " + paramSslError.b());
if (true == QuickLoginWebViewActivity.a)
{
paramSslErrorHandler.proceed();
return;
}
AlertDialog.Builder localBuilder = new AlertDialog.Builder(this.b);
localBuilder.setMessage("頁面證書錯誤(" + paramSslError.b() + "),是否繼續?");
localBuilder.setPositiveButton("繼續", new e(this, paramSslErrorHandler));
localBuilder.setNegativeButton("取消", new f(this, paramSslErrorHandler));
AlertDialog localAlertDialog = localBuilder.create();
try
{
localAlertDialog.show();
return;
}
catch (Exception localException)
{
}
}
we can know issue happened when "頁面證書錯誤", what caused the 頁面證書錯誤? so many causes, in this case, I found it's caused by system time.
if we set a wrong system time, pixel8.0/sdm670 will crash also, if the time is right, all devices work well.
so it's moved to p2-p3 3rd-party classify.