plaidev / karte-android-sdk

KARTE SDK for Android
https://karte.io/
Apache License 2.0
5 stars 3 forks source link

[core] App crashes rarely when the network state is switched during SDK initialization. #2

Closed tikidunpon closed 4 years ago

tikidunpon commented 4 years ago

Expected Behavior

Application can launch without crash.

Current Behavior

Application crash rarely when initializing the SDK.

Possible Solution

This problem fixed in core module 2.3.2. https://developers.karte.io/docs/release-notes-android-sdk-v2#core-232

Steps to Reproduce

We can not reproduce this problem on our environment. (it detected on crashlytics)

Context (Environment)

Module Version
core 2.2.0
inappmessaging 2.2.0
notifications 2.1.0
variables 2.1.0

Detailed Description

Crash Log

java.lang.NullPointerException: Attempt to invoke interface method ‘java.util.Iterator java.lang.Iterable.iterator()’ on a null object reference
at io.karte.android.utilities.connectivity.ConnectivityObserver.flush(SourceFile:4)
at io.karte.android.utilities.connectivity.ConnectivityObserver.access$flush(SourceFile:1)
at io.karte.android.utilities.connectivity.ConnectivityObserver$2.onAvailable(SourceFile:3)
at android.net.ConnectivityManager$NetworkCallback.onAvailable(ConnectivityManager.java:3115)
at android.net.ConnectivityManager$CallbackHandler.handleMessage(ConnectivityManager.java:3314)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:65)

Possible Implementation