xamarin / GooglePlayServicesComponents

Other
316 stars 147 forks source link

[FA] Failed to retrieve Firebase Instance Id on .Net MAUI #672

Open Pnixys opened 2 years ago

Pnixys commented 2 years ago

Hello, I found an issue on MAUI. It's not blovking but I'm curious to find the problem behind this issue.

I used visual studio 17.3.0 Preview 6.0 I work with an emulator Android 11.0 API 30.

Google Play Services Version

118.0.2.1

Issue

So I got this message in my output ([FA] Failed to retrieve Firebase Instance Id) and I don't know why. It's not blocking, but i would understand why I got this message. I link a github repositorie with the code I used. To reproduce the error just launch the solution on an Android platform.

Packages used:


    <ItemGroup Condition="'$(TargetFramework)' == 'net6.0-android'">
      <PackageReference Include="Xamarin.Firebase.Analytics">
        <Version>120.0.1.1</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.Firebase.Common">
        <Version>120.1.0</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.Firebase.Core">
        <Version>119.0.1.6</Version>
      </PackageReference>
      <PackageReference Include="Xamarin.GooglePlayServices.Basement">
        <Version>118.0.2.1</Version>
      </PackageReference>
    </ItemGroup>

The repo with my code. https://github.com/Pnixys/testfirebase.git

Build settings (tools) default settings.

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

Just run the solution.

Output

[FA] Activity resumed, time: 181976177 [FA] Failed to retrieve Firebase Instance Id [FA] Connection attempt already in progress

petermauger commented 1 year ago

Any solution for this @Pnixys ?

mhdwaelanjo commented 1 year ago

I fixed the problem.. we can use my libraries :

 <PackageReference Include="Anjo.Android.GoogleServices.Ads" Version="22.0.0" />
 <PackageReference Include="Anjo.Android.GoogleServices.AdsBase" Version="22.0.0" />
 <PackageReference Include="Anjo.Android.GoogleServices.AdsLite" Version="22.0.0" />

Supports fixing the problem of Loading ads using :

raver99 commented 4 months ago

For me the issue was that the android bundle name was not the same as the one configured in firebase. These 2 must match. Quite obvious when you think about it. But easy mistake and hard to understand from the error message. Hope this helps.