Google login error: caused by: java.util.ConcurrentModificationException

My app crashed while logging in to Google.

This was not the case before.

Could it be due to a change in the version of Google Play services?

What else could cause this crash?

I was able to stop it earlier, delaying when I implement OneSignal initialization in the Application class. But, I'm not sure how they are connected and only encounter this connection due to trial and error. Changing my OneSignal implementation does not seem to be the right solution, because it wraps around a problem that has not been encountered before and may occur again if I do not find a more specific reason for this.

In addition, an accident does not always occur during the entry process.

Key tips from the logarithm:

 An error occurred while executing doInBackground()
Caused by: java.util.ConcurrentModificationException
at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)

Here is the complete logarithm:

UncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
                                                                                                    at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
                                                                                                    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                                                                    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                                                                    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                                                    at java.lang.Thread.run(Thread.java:818)
                                                                                                 Caused by: java.util.ConcurrentModificationException
                                                                                                    at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
                                                                                                    at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
                                                                                                    at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)
                                                                                                    at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
                                                                                                    at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
                                                                                                    at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
                                                                                                    at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
                                                                                                    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                                                                    at java.lang.Thread.run(Thread.java:818) `11-11 00:35:53.023 11247-11903/com.example.package E/AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #1
                                                                                             Process: com.example.package, PID: 11247
                                                                                             java.lang.RuntimeException: An error occurred while executing doInBackground()
                                                                                                 at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
                                                                                                 at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
                                                                                                 at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
                                                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:242)
                                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                                                 at java.lang.Thread.run(Thread.java:818)
                                                                                              Caused by: java.util.ConcurrentModificationException
                                                                                                 at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
                                                                                                 at com.google.android.gms.auth.api.signin.internal.zzb.zzafx(Unknown Source)
                                                                                                 at com.google.android.gms.auth.api.signin.internal.zzb.loadInBackground(Unknown Source)
                                                                                                 at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
                                                                                                 at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
                                                                                                 at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
                                                                                                 at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
                                                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
                                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
                                                 `                                                at java.lang.Thread.run(Thread.java:818)

Thanks in advance.

+4

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


All Articles