AmplitudeClient error
andim27 opened this issue · 5 comments
Current Behavior
Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (max-target-q,core-platform-api, reflection, denied)
W/OkHttp (10808): unable to load android socket classes
W/OkHttp (10808): java.lang.NoSuchMethodException: com.android.org.conscrypt.OpenSSLSocketImpl.setUseSessionTickets [boolean]
W/OkHttp (10808): at java.lang.Class.getMethod(Class.java:2103)
W/OkHttp (10808): at java.lang.Class.getDeclaredMethod(Class.java:2081)
W/OkHttp (10808): at okhttp3.internal.platform.android.AndroidSocketAdapter.(AndroidSocketAdapter.kt:34)
W/OkHttp (10808): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter.(StandardAndroidSocketAdapter.kt:31)
W/OkHttp (10808): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter$Companion.buildIfSupported(StandardAndroidSocketAdapter.kt:57)
W/OkHttp (10808): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter$Companion.buildIfSupported$default(StandardAndroidSocketAdapter.kt:50)
W/OkHttp (10808): at okhttp3.internal.platform.AndroidPlatform.(AndroidPlatform.kt:44)
W/OkHttp (10808): at okhttp3.internal.platform.AndroidPlatform$Companion.buildIfSupported(AndroidPlatform.kt:239)
W/OkHttp (10808): at okhttp3.internal.platform.Platform$Companion.findPlatform(Platform.kt:211)
W/OkHttp (10808): at okhttp3.internal.platform.Platform$Companion.access$findPlatform(Platform.kt:179)
W/OkHttp (10808): at okhttp3.internal.platform.Platform.(Platform.kt:180)
W/OkHttp (10808): at okhttp3.OkHttpClient.(OkHttpClient.kt:219)
W/OkHttp (10808): at okhttp3.OkHttpClient.(OkHttpClient.kt:211)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient.$r8$lambda$uWBdBgn9ebx5ZjaSsGzJj44YwX4(Unknown Source:2)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient$$ExternalSyntheticLambda0.get(Unknown Source:0)
W/OkHttp (10808): at com.amplitude.util.DoubleCheck.get(DoubleCheck.java:28)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient.lambda$null$0(AmplitudeClient.java:362)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient$$ExternalSyntheticLambda3.newCall(Unknown Source:2)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient.makeEventUploadPostRequest(AmplitudeClient.java:2259)
W/OkHttp (10808): at com.amplitude.api.AmplitudeClient$12.run(AmplitudeClient.java:2124)
W/OkHttp (10808): at android.os.Handler.handleCallback(Handler.java:938)
W/OkHttp (10808): at android.os.Handler.dispatchMessage(Handler.java:99)
W/OkHttp (10808): at android.os.Looper.loopOnce(Looper.java:201)
W/OkHttp (10808): at android.os.Looper.loop(Looper.java:288)
W/OkHttp (10808): at android.os.HandlerThread.run(HandlerThread.java:67)
W/vechat.liveCha(10808): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (unsupported,core-platform-api, reflection, allowed)
W/vechat.liveCha(10808): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (unsupported,core-platform-api, reflection, allowed)
W/vechat.liveCha(10808): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (unsupported,core-platform-api, reflection, allowed)
I/vechat.liveCha(10808): Background young concurrent copying GC freed 78371(3880KB) AllocSpace objects, 68(2920KB) LOS objects, 36% free, 10MB/16MB, paused 35.579ms,10us total 224.904ms
D/EGL_emulation(10808): app_time_stats: avg=24.61ms min=6.01ms max=219.21ms count=41
Possible Solution
Environment
- SDK Version: Android SDK version 32.1.0-rc1
- Flutter Version: 3.0.5
- Device: MacOs Android emulator
- Device OS and Version: macOS 12.5.1
Hi @andim27,
Can you provide how we can reproduce the issue? A piece of example code will be helpful.
Thanks!
It happens sometimes not all time[logEvent-metod produce it]
I'm facing this issue with v3.16.0
This error is likely caused by OkHttps use of reflection which tightly couples it to the Android API version.
See this answer for more information.
https://stackoverflow.com/a/70357341/5046784