Closed Fando closed 5 years ago
Hi @Fando,
Thanks for the report. This looks like it's caused by the receiver being called while the client is still being initialized. I'll be taking more of a look at this issue, and will update you when I have more information.
Thanks, @gwhelanLD
Hi @Fando,
We've just released version 2.8.4 of the Android SDK with a fix for this issue. It contains some minor restructuring to move all iteration over the LDClient
instance map to within the class. This allows us to synchronize these operations to prevent any access while initialization is occurring.
Thank you for reporting this issue, we appreciate your patience as we got this release ready. Feel free to reach out here on the Github issue tracker or through support channels if you run into any more issues.
Thanks, @gwhelanLD
Hi @Fando,
I'm going to close out this issue as 2.8.4 should fix the issue. Feel free to reopen if you continue running into this issue with 2.8.4.
Thanks, @gwhelanLD
@gwhelanLD , I have similar issue on SDK
implementation 'com.launchdarkly:launchdarkly-android-client-sdk:2.8.5'
Below are the logs for this,
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4200010 (has extras) } in g51$r@d6c462d
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0 + 1493(LoadedApk.java:1493)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run + 2(:2)
at android.os.Handler.handleCallback + 873(Handler.java:873)
at android.os.Handler.dispatchMessage + 99(Handler.java:99)
at android.os.Looper.loop + 214(Looper.java:214)
at android.app.ActivityThread.main + 7073(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 494(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main + 965(ZygoteInit.java:965)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at rh.e + 3(SourceFile:3)
at g51$r.onReceive + 3(SourceFile:3)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0 + 1483(LoadedApk.java:1483)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run + 2(:2)
at android.os.Handler.handleCallback + 873(Handler.java:873)
at android.os.Handler.dispatchMessage + 99(Handler.java:99)
at android.os.Looper.loop + 214(Looper.java:214)
at android.app.ActivityThread.main + 7073(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 494(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main + 965(ZygoteInit.java:965)
Hi @tanmaythakar4,
As this is not a ConcurrentModificationException
, I believe your issue is unrelated to this issue. Would you try and replicate on the most recent SDK version (2.12.0)? If you continue to run into this exception please open a github new issue so we can address it.
Thanks, @gwhelanLD
There is a
ConcurrentModificationException
insideConnectivityReceiver.onReceive
. Below are the logs for this crash.Also, a similar thing might be happening inside
PollingUpdater.onReceive
, no crash logs for this, but there is a ANR report on the Play Console that refers to thePollingUpdater
which seems to contain similar code to theConnectivityReceiver
.SDK version
com.launchdarkly:launchdarkly-android-client-sdk:2.8.3
Language version, developer tools Java 7
OS/platform Android 8 and 9