urbanairship / android-library

Urban Airship Android SDK
Other
111 stars 122 forks source link

Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId #188

Closed Ashraf4795 closed 3 years ago

Ashraf4795 commented 3 years ago

Preliminary Info

Gradle build tool version : 3.5.4 Google-services:4.3.3 Firebase-crashlytics-gradle:2.4.1 Huawei.agconnect:agcp:1.3.1.300 minSdkVersion = 21 targetSdkVersion = 29 builToolsVersion = '28.0.3'

What Airship dependencies are you using?

"com.urbanairship.android:urbanairship-fcm:14.5.1" "com.urbanairship.android:urbanairship-message-center:14.5.1" "com.urbanairship.android:urbanairship-hms:14.5.1" "com.urbanairship.android:urbanairship-automation:14.5.1"

What are the versions of any relevant development tools you are using?

Android studio version: 4.1.1 Kotlin version: 1.4.20 Gradle plugin: 3.5.4 Gradle version: 5.4.1

Report

What unexpected behavior are you seeing?

The app crashes while the initial app run on the emulator (Pixel 2 API 9)

What is the expected behavior?

The app runs without crashes in the initial run, or after launching the app and receiving notifications.

What are the steps to reproduce the unexpected behavior?

We can't reproduce the crash but we get the log from the android studio logcat

Do you have logging for the issue?

E/AndroidRuntime: FATAL EXCEPTION: UrbanAirship#1 Process: com.myvodafoneapp.dev, PID: 325 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId; at com.urbanairship.push.fcm.FcmPushProvider.getRegistrationToken(FcmPushProvider.java:64) at com.urbanairship.push.PushManager.performPushRegistration(PushManager.java:1024) at com.urbanairship.push.PushManager.extendChannelRegistrationPayload(PushManager.java:331) at com.urbanairship.push.PushManager.access$000(PushManager.java:53) at com.urbanairship.push.PushManager$1.extend(PushManager.java:288) at com.urbanairship.channel.AirshipChannel.getNextChannelRegistrationPayload(AirshipChannel.java:522) at com.urbanairship.channel.AirshipChannel.onPerformJob(AirshipChannel.java:222) at com.urbanairship.job.Job$1.run(Job.java:90) at com.urbanairship.util.SerialExecutor$1.run(SerialExecutor.java:41) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at com.urbanairship.util.AirshipThreadFactory$1.run(AirshipThreadFactory.java:50) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.myvodafoneapp.dev-AlfGqXC8k8Z80y_7eOs1LA==/base.apk"],nativeLibraryDirectories=[/data/app/com.myvodafoneapp.dev-AlfGqXC8k8Z80y_7eOs1LA==/lib/x86, /data/app/com.myvodafoneapp.dev-AlfGqXC8k8Z80y_7eOs1LA==/base.apk!/lib/x86, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.urbanairship.push.fcm.FcmPushProvider.getRegistrationToken(FcmPushProvider.java:64)  at com.urbanairship.push.PushManager.performPushRegistration(PushManager.java:1024)  at com.urbanairship.push.PushManager.extendChannelRegistrationPayload(PushManager.java:331)  at com.urbanairship.push.PushManager.access$000(PushManager.java:53)  at com.urbanairship.push.PushManager$1.extend(PushManager.java:288)  at com.urbanairship.channel.AirshipChannel.getNextChannelRegistrationPayload(AirshipChannel.java:522)  at com.urbanairship.channel.AirshipChannel.onPerformJob(AirshipChannel.java:222)  at com.urbanairship.job.Job$1.run(Job.java:90)  at com.urbanairship.util.SerialExecutor$1.run(SerialExecutor.java:41)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  at com.urbanairship.util.AirshipThreadFactory$1.run(AirshipThreadFactory.java:50)  at java.lang.Thread.run(Thread.java:764) 

jyaganeh commented 3 years ago

Hi @Ashraf4795, the latest release (14.6.0) removed our dependency on firebase-iid. Could you please try updating and let us know if that resolves the issue?