Googleplayservicescomponents: DynamicLinks: FirebaseDynamicLinks.Instance is null for 71.1615.0

Created on 13 Nov 2019  路  12Comments  路  Source: xamarin/GooglePlayServicesComponents

Xamarin.Android Version (eg: 6.0):

10.0.6.2

Operating System & Version (eg: Mac OSX 10.11):

mscOS 10.14.6

Google Play Services Version (eg: 8.4.0):

71.1615.0

Describe your Issue:

Using Xamarin.Firebase.Dynamic.Links in version 60.1142.1, everything works just fine. After upgrading to 71.1615.0, FirebaseDynamicLinks.Instance returns null.

This issue seems to be similar to the issue mentioned by another user on Stackoverflow: https://stackoverflow.com/questions/57179021/firebasedynamiclinks-instance-is-null-after-update-from-60-1142-1-to-71-1615-0

Steps to Reproduce (with link to sample solution if possible):

Use 60.1142.1 --> working --> upgrade to 71.1615.0 --> FirebaseDynamicLinks.Instance is null

Include any relevant Exception Stack traces, build logs, adb logs:

in-progress

Most helpful comment

@thisisthekap

Did you add Xamarin.Adroid.ManifestMerger package?
No.

Can you make that YES please?

Seems like known manifest merging issue.

All 12 comments

@thisisthekap

  1. Do you have other Google.Play.Services and/or Firebase packages?
  2. Did you add Xamarin.Adroid.ManifestMerger package?

@moljac To answer your questions:

Do you have other Google.Play.Services and/or Firebase packages?

  • Xamarin.Firebase.Ads.Lite version 71.1601.0
  • Xamarin.Firebase.Analytics version 71.1630.0
  • Xamarin.Firebase.Dynamic.Links version 71.1615.0
  • Microsoft.AppCenter.Push version 2.6.1

    • Depends on Xamarin.Firebase.Messaging version >= 71.1740.0

  • Xamarin.GooglePlayServices.Ads.Lite version 71.1720.1

Did you add Xamarin.Adroid.ManifestMerger package?
No.

@thisisthekap

Did you add Xamarin.Adroid.ManifestMerger package?
No.

Can you make that YES please?

Seems like known manifest merging issue.

Xamarin.Android.ManifestMerger package helped me. But it is on preview state...

@AmonDoni
Thanks for the feedback.

@thisisthekap
Did you have chance to try it with Xamarin.Android.ManifestMerger?

Having this exact issue. Any update on this?

I have same issue. In my case use latest version of https://github.com/CrossGeeks/FirebasePushNotificationPlugin 3.1.6 and latest version DynamicLinks. Before install DynamicLinks app works perfectly and receive notifications. After install Xamarin.Firebase.Dynamic.Links 71.1615 plugin, when start app crashes with this error:

Attempt to invoke virtual method 'void com.google.firebase.iid.FirebaseInstanceId.zzb(boolean)' on a null object reference

Only use these plugins with Firebase dependencies. I think GooglePlayServices versions are compatible.

Any ideas to fix the error?

Any update on this? I am also facing the same issue.

Maybe you facing com.google.firebase.components.ComponentDiscoveryService being defined multiple times in the AndroidManifest.xml as describe in https://github.com/xamarin/GooglePlayServicesComponents/issues/216. I had the same problem when using Xamarin.Firebase.Functions and Xamarin.Firebase.Auth together. I used MatFillion`s answer https://github.com/xamarin/GooglePlayServicesComponents/issues/216#issuecomment-517740275 to fix it.

Hello I Had the same problem
I had DynamicLinks implementation working and when i implemented firebase.Messagin stop working, then i installed Xamarin.Adroid.ManifestMerger package like @moljac said and now its woking, very thanks

I have same issue. Could you give reference for Xamarin.Adroid.ManifestMerger package?

@thisisthekap @AmonDoni @aiuex79 @pablogupi @gisongeorge @arthigo @stanleywailers @yasarutkuu

No nuget package needed. We have moved this feature into the core of the Android build system.

https://docs.microsoft.com/en-us/xamarin/android/release-notes/10/10.2#improved-android-manifest-merging

All you need is to add:

<PropertyGroup>
  <AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
</PropertyGroup>

to your project[s] that reference GPS-FB packages.

Please prvoide feedback on this, or even better @thisisthekap please close the issue yourself.

Thanks

Was this page helpful?
0 / 5 - 0 ratings