googleads-consent-sdk-android
googleads-consent-sdk-android copied to clipboard
java.lang.RuntimeException: An error occured while executing doInBackground()
I had upload apk. google pre-launch-report catched bug. I don't know why is occured... please, help me.
07-23 22:27:33.108: E/AndroidRuntime(10419): FATAL EXCEPTION: AsyncTask #1
07-23 22:27:33.108: E/AndroidRuntime(10419): Process: us.kr.baseballnine, PID: 10419
07-23 22:27:33.108: E/AndroidRuntime(10419): java.lang.RuntimeException: An error occurred while executing doInBackground()
07-23 22:27:33.108: E/AndroidRuntime(10419): at android.os.AsyncTask$3.done(AsyncTask.java:330)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
07-23 22:27:33.108: E/AndroidRuntime(10419): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:255)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
07-23 22:27:33.108: E/AndroidRuntime(10419): at java.lang.Thread.run(Thread.java:776)
07-23 22:27:33.108: E/AndroidRuntime(10419): Caused by: java.lang.NoSuchMethodError: No direct method
I got the same error today:
Caused by: java.lang.NoSuchMethodError: No direct method
No. only Java 7 is used. The same build script, linked libraries, and environment for my app. No such issue for the new build apk that I uploaded to Play beta last week. I also don't see the crash issues on my devices. Currently, I only see the crash from Play's re-launch report since yesterday.
I am also seeing the crash in Pre-launch report. I haven't rolled out the new version into production yet.
Me too. This is so frustrating.
@jinukjin : I thought this issue is due to the recent migration to Java 8 in my project. But, it seems the @samlu is facing the issue even in Java 7.
Yes. It is frustrating.
@samlu @venkat20390 Hi! there. I found resolve the problem. This answer is worked for me. I hope it help.
https://stackoverflow.com/questions/47099757/pre-launch-report-failures-due-to-missing-methods-in-com-google-android-apps-mt?rq=1
Glad to know that the problem is not related to our code.
I also changed the source code of ConsentInformation.java #248 from
} catch (Exception e) {
to
} catch (Throwable e) {
in case it happens on user devices. FYI.
@jinukjin Thanks for pointing me to that SO thread. For me the "Enable Pre-launch Report" was turned on already. Am i missing something?
Btw, I have released my app in a stagged rollout and haven't come across any crash in the real user devices.
@samlu : Yes, I am planning to do that on the next update.
I changed ConsentInformation.java #248 as suggested by @samlu .
In addition, I added the logic in the method - onFailedToUpdateConsentInfo() when calling requestConsentInfoUpdate () since, it should not miss out calling the consent dialog if it fails to get the consent data. But , I wonder how many devices get this error.
Following are the logs which show the throwable
W/CrashlyticsCore: Expected method missing: java.lang.NoSuchMethodException: parameter type is null at java.lang.Class.getMethod(Class.java:2060) at java.lang.Class.getDeclaredMethod(Class.java:2047) at com.crashlytics.android.core.DefaultAppMeasurementEventListenerRegistrar.invoke(SourceFile:89) at com.crashlytics.android.core.DefaultAppMeasurementEventListenerRegistrar.register(SourceFile:54) at com.crashlytics.android.core.CrashlyticsController.registerAnalyticsEventListener(SourceFile:1574) at com.crashlytics.android.core.CrashlyticsCore.doInBackground(SourceFile:320) at com.crashlytics.android.core.CrashlyticsCore.doInBackground(SourceFile:44) at io.a.a.a.h.a(SourceFile:63) at io.a.a.a.h.a(SourceFile:28) at io.a.a.a.a.c.a$2.call(SourceFile:311) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)