Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OKHttp checks cause unhandled exceptions in case that OKHttp interface changes. #21

Open
dwendt opened this issue Jul 15, 2016 · 1 comment

Comments

@dwendt
Copy link

dwendt commented Jul 15, 2016

In some recent version, okhttp does not have the check method even though okhttp exists.

This class exists: okhttp3.CertificatePinner

However, NoSuchMethodError is thrown when check is accessed.

That should probably be caught for each OKHTTP method search as well. I'm personally getting the exception here:
https://github.com/Fuzion24/JustTrustMe/blob/master/app/src/main/java/just/trust/me/Main.java#L375

@cebtenzzre
Copy link

cebtenzzre commented Jul 22, 2023

Same here, built from latest master:

[ 2023-07-22T01:24:24.558  1010147: 13975: 13975 E/LSPosed-Bridge  ] java.lang.NoSuchMethodError: okhttp3.CertificatePinner#check(java.lang.String,java.util.List)#exact
	at de.robv.android.xposed.XposedHelpers.lambda$findMethodExact$3(Unknown Source:6)
	at de.robv.android.xposed.XposedHelpers.h(Unknown Source:0)
	at de.robv.android.xposed.d.get(Unknown Source:13)
	at java.util.Optional.orElseThrow(Optional.java:404)
	at de.robv.android.xposed.XposedHelpers.findMethodExact(Unknown Source:25)
	at de.robv.android.xposed.XposedHelpers.findAndHookMethod(Unknown Source:27)
	at de.robv.android.xposed.XposedHelpers.findAndHookMethod(Unknown Source:4)
	at just.trust.me.Main.processOkHttp(Main.java:473)
	at just.trust.me.Main$10.afterHookedMethod(Main.java:251)
	at de.robv.android.xposed.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147)
	at LSPHooker_.attach(Unknown Source:11)
	at android.app.Instrumentation.newApplication(Instrumentation.java:1244)
	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1458)
	at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1395)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6766)
	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2132)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7918)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

edit: This one too, after catching the first one:

[ 2023-07-22T01:44:59.941  1010147: 12342: 12342 E/LSPosed-Bridge  ] java.lang.NoSuchMethodError: okhttp3.internal.tls.OkHostnameVerifier#verify(java.lang.String,java.security.cert.         X509Certificate)#exact
    at de.robv.android.xposed.XposedHelpers.lambda$findMethodExact$3(Unknown Source:6)
    at de.robv.android.xposed.XposedHelpers.h(Unknown Source:0)
    at de.robv.android.xposed.d.get(Unknown Source:13)
    at java.util.Optional.orElseThrow(Optional.java:404)
    at de.robv.android.xposed.XposedHelpers.findMethodExact(Unknown Source:25)
    at de.robv.android.xposed.XposedHelpers.findAndHookMethod(Unknown Source:27)
    at de.robv.android.xposed.XposedHelpers.findAndHookMethod(Unknown Source:4)
    at just.trust.me.Main.processOkHttp(Main.java:506)
    at just.trust.me.Main$10.afterHookedMethod(Main.java:251)
    at de.robv.android.xposed.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147)
    at LSPHooker_.attach(Unknown Source:11)
    at android.app.Instrumentation.newApplication(Instrumentation.java:1244)
    at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1458)
    at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1395)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6766)
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2132)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7918)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants