Firebase Analytics

@bamazy it looks like the notifications v2 just had firebase separated from it so the plugin should now build. Idk if the notification v2 firebase will build, will have to run tests

Plugin fails to build. Logged a bug report through the marketplace and thought I would put one up here. Build fails with duplicate class errors. removing firebaseAnalytics plugin makes build work again.

10:01:21.659 Execution failed for task ‘:App:checkReleaseDuplicateClasses’.
10:01:21.659 > 1 exception was raised by workers:
10:01:21.659 java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.measurement.zzbt found in modules play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzbu found in modules play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzfw found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzfy found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzfz found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzga found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.internal.measurement.zzgb found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.measurement.internal.zzgz found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659 Duplicate class com.google.android.gms.measurement.internal.zzik found in modules play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
10:01:21.659
10:01:21.659 Go to the documentation to learn how to Fix dependency resolution errors.
10:01:21.659
10:01:21.659

I’ve just discovered the problem - the marketplace ID was not in the build.settings - strange this never caused an issue previously, but it has now. Putting it in fixed my problems and I am able to build fine now.

Probably because the one without the Id is using the old repo with the old plugins and the one with the Id is pulling from the updated plugins from Scott’s H marketplace.

1 Like

Does someone else have the issue when building for a device? (Using Build 3639):

Undefined symbols for architecture armv7:
"_APMConsentSettings3P", referenced from: +[FIRAnalytics setConsent:] in FirebaseAnalytics(FIRAnalytics.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Scott_Harrison, I am getting crash again when enabling FirebaseAnalytics on iOS. It gives “-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x2800018f0” as a reason. I googled this error and it seems it’s related to Firebase. When I disable FirebaseAnalytics the app works normally.

P.S. By “disabling” I mean in the code not requiring the plugin and initializing it. The lines to include the plugin still exist in the build.settings file.

Below is the error I get from GameAnalytics logs:

Blockquote PComp version 2021.3.291125 build (null)\nUncaught Exception\nException Name: NSInvalidArgumentException\nException Reason: -[FBLPromise firebaseInstallationID]: unrecognized selector sent to instance 0x282460930\nStack trace:\n 0 - 0 CoreFoundation 0x00000001836999d8 F3021642-E3C0-33F8-9911-DD303A6056D0 + 1157592\n 1 - 1 libobjc.A.dylib 0x0000000197a1fb54 objc_exception_throw + 56\n 2 - 2 CoreFoundation 0x00000001835a9bbc F3021642-E3C0-33F8-9911-DD303A6056D0 + 175036\n 3 - 3 CoreFoundation 0x000000018369c01c F3021642-E3C0-33F8-9911-DD303A6056D0 + 1167388\n 4 - 4 CoreFoundation 0x000000018369df8c _CF_forwarding_prep_0 + 92\n 5 - 5 YolNisanlariCL 0x0000000100f6ebcc FIRRealCurrentDateProvider + 3288\n 6 - 6 YolNisanlariCL 0x0000000101020bf4 FBLWaitForPromisesWithTimeout + 17744\n 7 - 7 libdispatch.dylib 0x00000001832d1298 AF27E74C-BE4A-3364-BB27-AED9916CE02D + 393880\n 8 - 8 libdispatch.dylib 0x00000001832d2280 AF27E74C-BE4A-3364-BB27-AED9916CE02D + 397952\n 9 - 9 libdispatch.dylib 0x00000001832810ac AF27E74C-BE4A-3364-BB27-AED9916CE02D + 65708\n 10 - 10 CoreFoundation 0x00000001836195e0 F3021642-E3C0-33F8-9911-DD303A6056D0 + 632288\n 11 - 11 CoreFoundation 0x0000000183613a88 F3021642-E3C0-33F8-9911-DD303A6056D0 + 608904\n 12 - 12 CoreFoundation 0x0000000183612ba0 CFRunLoopRunSpecific + 572\n 13 - 13 GraphicsServices 0x000000019a37b598 GSEventRunModal + 160\n 14 - 14 UIKitCore 0x0000000185f042f4 CC6E5AC7-8248-35F6-8B42-2E25C93DCF0A + 11723508\n 15 - 15 UIKitCore 0x0000000185f09874 UIApplicationMain + 164\n 16 - 16 YolNisanlariCL 0x000000010163bac8 APDEvent_EventType_IsValidValue + 13092\n 17 - 17 libdyld.dylib 0x00000001832f1568 0B475C78-3C12-3121-B7F8-2B95B83DAF44 + 5480\n

I have same problem with admob plugin and Firebase Analytics plugin.
Do you find solution?

@Scott_Harrison, just thought I’d like you know that when I discovered and reported the conflict between Firebase and notifications v2 more than a year ago, I had no choice but to remove your Firebase plugins, plural. I’ll be following this thread because I think it’s a worthwhile plugin for the future, once its device conflicts and issues with other plugins are resolved.

I will look into this sometime this week

@Scott_Harrison, I tried to build Firebase Database and FirebaseAnalytics together but I got conflict error.

I get the same error, what should I do?

Will look into this

Hi Scott. Did you have time to look at this problem? Today I tried again to build for iOS with FirebaseAnalytics, it didn’t work again. It crashes when opening the app.

Any progress on this issue? I want to use Firebase Analytics in my apps, but it still crashes when opening the app on the device. Building seems fine