Hi Backendless,
We are experiencing crashes in our Android app, which has been running for quite a while (over 4 years) without problems, and push notifications have been working fine as well.
Now, when Backendless.Messaging.registerDevice() is called, the app crashes with failed resolution of “FirebaseInstanceId” in com.Backendless.push.FCMRegistration (line #51). We are using Backendless 6.3.4.
Here is the debugger output:
FATAL EXCEPTION: main
Process: com.salesandmarketingnetwork.newlines, PID: 21734
java.lang.NoClassDefFoundError: Failed resolution of:
Lcom/google/firebase/iid/FirebaseInstanceId;
at
com.backendless.push.FCMRegistration$1.onComplete(FCMRegistration.java:51)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId" on path: DexPathList[[zip file "/data/app/~~qgiZQ4avr47hUcNyhyHUxA==/com.salesandmarketingnetwork.newlines-8OSqIeXn_bw-LJkS8-4Aug==/base.apk"],nativeLibraryDirectories=[/data/app/~~qgiZQ4avr47hUcNyhyHUxA==/com.salesandmarketingnetwork.newlines-8OSqIeXn_bw-LJkS8-4Aug==/lib/x86_64,
/system/lib64, /system_ext/lib64]]
at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at
com.backendless.push.FCMRegistration$1.onComplete(FCMRegistration.java:51)
at com.google.android.gms.tasks.zzj.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
We are aware that FirebaseInstanceId is deprecated, but we don’t know if that is related to this issue.
The crash prevents receiving any Backendless handleFault() message, so no help there. We have been trying different versions of the Firebase dependencies, but so far without success.
Any help or direction on how to troubleshoot further would be much appreciated.
Thanks very much in advance,
Rick Cataldo
PS: I have also replied to these support topics: Push Notifications Mission fail, error on Firebase Instance Id, and Backendless.messaging.registerDevice crash app, in case these are related.