firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
819 stars 424 forks source link

Getting UnavailableInvalid when getting FirebaseApp Dependencies #1281

Closed kultie closed 2 years ago

kultie commented 2 years ago

[READ] For Firebase Unity SDK issues, please report to Firebase Unity open-source

Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

Calling FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread got DependencyStatus.UnavailableInvalid on some device

Steps to reproduce:

Got some log about the error in logging service (Record on 1 devices resulting that device cannot sign in using firebase auth) Still could not reproduce on development environment and staging environment

Relevant Code:

FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(t =>
                {
                    var status = t.Result;
                    if (status == DependencyStatus.Available)
                    {
                        FirebaseApp app = FirebaseApp.DefaultInstance;
                        FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
                        isInitialized = true;
                        auth = FirebaseAuth.DefaultInstance;
                        FirebaseMessaging.SubscribeAsync(PortalSettings.GetPackageName()).ContinueWithOnMainThread(OnSubscribe);
                    }
                    else
                    {
                        Debug.LogError("Could not resolve all Firebase dependencies: " + status + "\n" + t.Exception);
                    }
                });
paulinon commented 2 years ago

Hi @kultie,

Version 9.0.0 of the SDK has been released recently. Could you try it out and see if it makes a difference? If it doesn't, please provide the details of the device/s facing the issue.

Additionally, could you also verify if using the quickstart yields the same behavior?

kultie commented 2 years ago

Hi @paulinon Thanks for the reply, I'll try to update the version 9.0.0 As for device detail It's come from our custom logging service We got logging for Device Model: Mi 8 UD (So Xiaomi note 8 Pro) Running MIUI version 12.5.2 Android version 11

261232139 commented 2 years ago

I have the same problem, and I had updated the version 9.0.0 Device Modal:Huawei NOVA 9 Running Harmony OS 2.0.1

google-oss-bot commented 2 years ago

Hey @kultie. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

kultie commented 2 years ago

Still same issue with version 9.0.0. The facebook and google auth function cause crash on the target device

paulinon commented 2 years ago

Hi @kultie,

Does this mean that FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread no longer causes the crash? It would be helpful if you provide a [minimal, reproducible example](FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread) of your implementation along with the complete steps to replicate the issue in order to analyze this behavior.

kultie commented 2 years ago

I can't really sure. Our client report that they still experiencing the crash after I deployed the build with version 9.0.0 (They confirmed that the crash also happen on the previous build) Still have log DependencyStatus.UnavailableInvalid. Since the firebase cannot initialized I can't have any log from the crashlytics report to identify what make the application crash

Still cannot reproduce the issue on our devices and machines. Currently only 1 device that have this issue and It's from our client - It's their personal device...

paulinon commented 2 years ago

Hi @kultie,

Could you provide the crash logs received by your client so that we can determine what's causing the issue?

kultie commented 2 years ago

image So far this is only thing I got from my client

DellaBitta commented 2 years ago

Hi @kultie and @261232139,

Google Play Services is required from many of the Firebase SDKs running on Android and I believe the problem you've encountered stems from Google Play Services support on the phones you're reporting.

I'd recommend reaching out to the user, if possible, or adding information to the app to instruct users to install Google Play Services if CheckAndFixDependencies fails in this way.

I hope this helps!

google-oss-bot commented 2 years ago

Hey @kultie. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 2 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@kultie if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.