java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock I'm surely doing something wrong when gettign AdvertisingId... Complete stacktrace : java.lang.RuntimeException: java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock

Hot problem!
This exception has a lot of traffic. You can help 14 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Hugo Gresse
, 1 year ago
Calling this from your main thread can lead to deadlock I'm surely doing something wrong when gettign AdvertisingId... Complete stacktrace : java.lang.RuntimeException: java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock
java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock I'm surely doing something wrong when gettign AdvertisingId... Complete stacktrace : java.lang.RuntimeException: java.lang.IllegalStateException: Calling this from your main thread can lead to deadlock
at com.google.android.gms.common.internal.zzx.zzbe(Unknown Source)
at com.google.android.gms.common.internal.zzx.zzbe(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.finish(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.finish(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source)
at com.example.sdk.adServer.ServerClient$RetrieveAdvertisingId.doInBackground(ServerClient.java:459)
at com.example.sdk.adServer.ServerClient$RetrieveAdvertisingId.doInBackground(ServerClient.java:452)
at org.robolectric.util.ReflectionHelpers$3.run(ReflectionHelpers.java:144)
at org.robolectric.util.ReflectionHelpers.traverseClassHierarchy(ReflectionHelpers.java:241)
at org.robolectric.shadows.ShadowAsyncTaskBridge.doInBackground(ShadowAsyncTaskBridge.java:20)
at org.robolectric.shadows.ShadowAsyncTask$BackgroundWorker.call(ShadowAsyncTask.java:147)
at org.robolectric.util.SimpleFuture.run(SimpleFuture.java:52)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.