Hello, we are experiencing crashes for some users when Firebase onNewToken
is triggered. Our implementation is similar to what can be found in samples in AmitySampleFirebaseMessagingService
and looks like this:
override fun onNewToken(token: String) {
AmityFcm.create()
.setup(token)
.subscribe(
{ Timber.i("fcm_new_token onNewToken success") },
{ Timber.e("fcm_new_token onNewToken: $it error") },
)
}
and for some users we are experiencing NullPointers
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.amity.socialcloud.sdk.push.EkoPushContract com.amity.socialcloud.sdk.push.EkoPushContractWrapper.getPushContract()' on a null object reference
at com.amity.socialcloud.sdk.push.AmityFcm.setup(AmityFcm.java:24)
Most crashes are marked as Early crashes on Crashlytic meaning they occur within 5s from app startup. Any idea what can be reason of having null EkoPushContractWrapper?