Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot authenticate, SignInAnonymouslyAsync encountered an error: One or more errors occurred (An internal error has occurred.) #1191

Open
LeonardoSilvaOsten opened this issue Feb 19, 2025 · 7 comments
Labels
api: auth desktop production Issues regarding usage for desktop production needs-info Need information for the developer unity-editor Issues related to Firebase usage in Unity editor

Comments

@LeonardoSilvaOsten
Copy link

LeonardoSilvaOsten commented Feb 19, 2025

Description

This started on my main project so I switched to the most basic project/code to perform a login but I'm still getting an error when trying to authenticate.

This doesn't happen on MacOS Build and Unity Editor.
It only happens on some Windows Build and Unity Editor.

I've tried on 4 machines where I work and it happens on all of them, also a lot of people who tried my game all over the world also faced it.

Already tried, reimport auth package, start a new firebase project, start a new unity project, reimport all, delete library, delete unity cache.

I really have no idea if it's network related but once it starts is 100% guarantee to keep not working.

Final Error

SignInAnonymouslyAsync encountered an error: One or more errors occurred. (An internal error has occurred.)
UnityEngine.Debug:LogError (object)
FirebaseClientLogin:b__5_0 (System.Threading.Tasks.Task1<Firebase.Auth.AuthResult>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:58) Firebase.Extensions.TaskExtension/<>c__DisplayClass4_11<Firebase.Auth.AuthResult>:b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)
Firebase.Dispatcher/<>c__DisplayClass5_0`1:b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)
Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)
Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)
Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

Reproducing the issue

How to reproduce:
Create a Firebase project, create a android app
Download google-services.json
Import google-services.json into unity, I tried put either it into the StreamingAssets or Root Assets
Create a empty unity project
import FirebaseAuth package
Open a empty scene
Add this script (The simples script possible)

using Firebase;
using Firebase.Auth;
using System;
using UnityEngine;
using Firebase.Extensions;
 
public class FirebaseClientLogin : MonoBehaviour
{
    private FirebaseAuth auth;
    private FirebaseApp app;
    private FirebaseUser user;
 
    private void Start()
    {
        InitializeFirebase();
    }
 
    private void InitializeFirebase()
    {
        if (app == null)
        {
            FirebaseApp.LogLevel = LogLevel.Verbose;
            Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
            {
                var dependencyStatus = task.Result;
                if (dependencyStatus == Firebase.DependencyStatus.Available)
                {
                    // Initialize FirebaseApp and FirebaseAuth
                    app = Firebase.FirebaseApp.DefaultInstance;
                    auth = FirebaseAuth.DefaultInstance;
 
                    // Sign in anonymously
                    SignInAnonymously();
                }
                else
                {
                    Debug.LogError($"Could not resolve all Firebase dependencies: {dependencyStatus}");
                }
            });
        }
    }
 
    private void SignInAnonymously()
    {
        auth.SignInAnonymouslyAsync().ContinueWithOnMainThread(task =>
        {
            if (task.IsCanceled)
            {
                Debug.LogError("SignInAnonymouslyAsync was canceled.");
                return;
            }
 
            if (task.IsFaulted)
            {
                Debug.LogError($"SignInAnonymouslyAsync encountered an error: {task.Exception.Message}");
                return;
            }
 
            AuthResult result = task.Result;
            user = result.User; // Assign user to the reference
            Debug.LogFormat("User signed in successfully: {0} ({1})", user.DisplayName, user.UserId);
        });
    }
}

Enter play mode

Firebase Unity SDK Version

Tried 12.2.0, 12.5.0, 12.6.0

Unity editor version

2022.3.42f1, Unity 6

Installation Method

.unitypackage

Problematic Firebase Component(s)

Authentication

Other Firebase Component(s) in use

Authentication

Additional SDKs you are using

No response

Targeted Platform(s)

Desktop

Unity editor platform

Windows

Scripting Runtime

Mono

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

Disabling all app initializers

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.AppUtil:SetEnabledAllAppCallbacks (bool) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:4672)

Firebase.FirebaseApp:InitializeAppUtilCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2275)

Firebase.FirebaseApp:CheckDependenciesAsync () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2601)

Firebase.FirebaseApp:CheckAndFixDependenciesAsync () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2657)

FirebaseClientLogin:InitializeFirebase () (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:25)

FirebaseClientLogin:Start () (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:16)

 
Disable analytics
Disable app_check
Disable auth
Disable crashlytics
Disable database
Disable dynamic_links
Disable functions
Disable messaging
Disable remote_config
Disable storage
analytics app initializer Disabling
app_check app initializer Disabling
 
Enable module 'auth' for 'Firebase.Auth.FirebaseAuth, Firebase.Auth'

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.FirebaseApp:InitializeAppUtilCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2290)

Firebase.FirebaseApp:CheckDependenciesAsync () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2601)

Firebase.FirebaseApp:CheckAndFixDependenciesAsync () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2657)

FirebaseClientLogin:InitializeFirebase () (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:25)

FirebaseClientLogin:Start () (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:16)

 
crashlytics app initializer Disabling
database app initializer Disabling
dynamic_links app initializer Disabling
functions app initializer Disabling
 
 
App initializer installations not found, failed to enable.
App initializer invites not found, failed to enable.
messaging app initializer Disabling
App initializer performance not found, failed to enable.
remote_config app initializer Disabling
storage app initializer Disabling
App initializer test_lab not found, failed to enable.
 
Creating Firebase App __FIRAPP_DEFAULT for Firebase C++ 12.6.0

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.FirebaseApp:CreateInternal () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2859)

Firebase.FirebaseApp/<>c:<Create>b__14_0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1981)

Firebase.FirebaseApp:CreateAndTrack (Firebase.FirebaseApp/CreateDelegate,Firebase.FirebaseApp) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2443)

Firebase.FirebaseApp:Create () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1981)

Firebase.FirebaseApp:get_DefaultInstance () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1956)

FirebaseClientLogin:<InitializeFirebase>b__4_0 (System.Threading.Tasks.Task`1<Firebase.DependencyStatus>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:31)

Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.DependencyStatus>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)

Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)

Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)

Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
Validating semaphore creation
 
Added app name=__FIRAPP_DEFAULT: options, api_key=xxxxxxx, app_id=xxxxxxx, database_url=xxxxxxx, messaging_sender_id=xxxxxxx, storage_bucket=xxxxxx-xxxxxxx, project_id=xxxxxxx

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.FirebaseApp:CreateInternal () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2859)

Firebase.FirebaseApp/<>c:<Create>b__14_0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1981)

Firebase.FirebaseApp:CreateAndTrack (Firebase.FirebaseApp/CreateDelegate,Firebase.FirebaseApp) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:2443)

Firebase.FirebaseApp:Create () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1981)

Firebase.FirebaseApp:get_DefaultInstance () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1956)

FirebaseClientLogin:<InitializeFirebase>b__4_0 (System.Threading.Tasks.Task`1<Firebase.DependencyStatus>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:31)

Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.DependencyStatus>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)

Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)

Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)

Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
Creating Auth 0000028EC13D24E0 for App 0000029169AB8920

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.Auth.FirebaseAuth:GetAuthInternal (Firebase.FirebaseApp,Firebase.InitResult&) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3660)

Firebase.Auth.FirebaseAuth/<>c__DisplayClass18_1:<GetAuth>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3250)

Firebase.FirebaseApp:TranslateDllNotFoundException (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:1938)

Firebase.Auth.FirebaseAuth:GetAuth (Firebase.FirebaseApp) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3249)

Firebase.Auth.FirebaseAuth:get_DefaultInstance () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3345)

FirebaseClientLogin:<InitializeFirebase>b__4_0 (System.Threading.Tasks.Task`1<Firebase.DependencyStatus>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:32)

Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.DependencyStatus>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)

Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)

Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)

Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
USE_AUTH_EMULATOR not set.

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.Auth.FirebaseAuth:SignInAnonymouslyInternalAsync () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3625)

Firebase.Auth.FirebaseAuth/<SignInAnonymouslyAsync>d__49:MoveNext () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/auth/swig/Firebase.Auth_fixed.cs:3544)

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Firebase.Auth.AuthResult>:Start<Firebase.Auth.FirebaseAuth/<SignInAnonymouslyAsync>d__49> (Firebase.Auth.FirebaseAuth/<SignInAnonymouslyAsync>d__49&)

Firebase.Auth.FirebaseAuth:SignInAnonymouslyAsync ()

FirebaseClientLogin:SignInAnonymously () (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:48)

FirebaseClientLogin:<InitializeFirebase>b__4_0 (System.Threading.Tasks.Task`1<Firebase.DependencyStatus>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:35)

Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.DependencyStatus>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)

Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)

Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)

Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
Disabling all app initializers
Disable analytics
Disable app_check
Disable auth
Disable crashlytics
Disable database
Disable dynamic_links
Disable functions
Disable messaging
Disable remote_config
Disable storage
 
LoadUserData: Credential com.ostengames.Data2073.data2073-ad3cf.firebase.auth/__FIRAPP_DEFAULT[0] not found

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.AppUtil:PollCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:4656)

Firebase.Platform.FirebaseAppUtils:PollCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/FirebaseAppUtils.cs:33)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:208)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
Failed to read user data for app (__FIRAPP_DEFAULT).  This could happen if the current user doesn't have access to the keystore, the keystore has been corrupted or the app intentionally deleted the stored data.

UnityEngine.Debug:Log (object)

Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:89)

Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)

Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)

Firebase.AppUtil:PollCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/linux_unity/app/swig/Firebase.App_fixed.cs:4656)

Firebase.Platform.FirebaseAppUtils:PollCallbacks () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/FirebaseAppUtils.cs:33)

Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:208)

Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

 
Auth state changed. Notifying 3 listeners.
ID token changed. Notifying 2 listeners.
 
DeleteUserData: Credential com.ostengames.Data2073.data2073-ad3cf.firebase.auth/__FIRAPP_DEFAULT[0] not found
SignInAnonymouslyAsync encountered an error: One or more errors occurred. (An internal error has occurred.)
UnityEngine.Debug:LogError (object)
FirebaseClientLogin:<SignInAnonymously>b__5_0 (System.Threading.Tasks.Task`1<Firebase.Auth.AuthResult>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:58)
Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.Auth.AuthResult>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)
Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)
Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)
Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)
Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

SignInAnonymouslyAsync encountered an error: One or more errors occurred. (An internal error has occurred.)
UnityEngine.Debug:LogError (object)
FirebaseClientLogin:<SignInAnonymously>b__5_0 (System.Threading.Tasks.Task`1<Firebase.Auth.AuthResult>) (at Assets/Scripts/Firebase/FirebaseClientLogin.cs:58)
Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<Firebase.Auth.AuthResult>:<ContinueWithOnMainThread>b__1 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/task_extension/TaskExtension.cs:128)
Firebase.Dispatcher/<>c__DisplayClass5_0`1<bool>:<RunAsync>b__0 () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)
Firebase.ExceptionAggregator:Wrap (System.Action) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)
Firebase.Dispatcher:PollJobs () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)
Firebase.Platform.FirebaseHandler:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@LeonardoSilvaOsten
Copy link
Author

Just tried firebase 11.9.0 without success.

@argzdev argzdev added desktop production Issues regarding usage for desktop production unity-editor Issues related to Firebase usage in Unity editor labels Feb 20, 2025
@argzdev
Copy link

argzdev commented Feb 20, 2025

Hey @LeonardoSilvaOsten, thanks for reaching out. You mentioned that this issue is reproducible by different users, is this issue solely on desktop version of the app? And only on Windows machine?

We'll try and investigate this further, however I don't have a windows machine at present so I'll bring this up to our engineers to check if they can figure something out.

@LeonardoSilvaOsten
Copy link
Author

Hey @LeonardoSilvaOsten, thanks for reaching out. You mentioned that this issue is reproducible by different users, is this issue solely on desktop version of the app? And only on Windows machine?

We'll try and investigate this further, however I don't have a windows machine at present so I'll bring this up to our engineers to check if they can figure something out.

Yes, randomly on some Desktop Windows Build and Unity Editor Windows.
Our app is launched for Desktop Windows at epic games (It's very random who gets the error)
https://store.epicgames.com/en-US/p/data2073-9d83d4

I use MacOS for over a year on this project and never got this either on build or editor.

We have heard this issue from some of our users around December 2024.

It happens on all 4 machines I tested on site.
1 of our 4 home office developers have the same issue.

We never tried android or iOS.


I tried to authenticate in a new unity and firebase project and still have the problem.

@LeonardoSilvaOsten
Copy link
Author

This might help identify the issue: firebase/flutterfire#12725

@LeonardoSilvaOsten
Copy link
Author

So far using VPN is the only know solution.

@argzdev
Copy link

argzdev commented Mar 5, 2025

Thanks for the additional information, @LeonardoSilvaOsten. This is really interesting, if network is the problem, then the only solution I can think of is whitelisting endpoints for Firebase Authentication.

Could you try whitelisting these endpoints and see if there's any difference:

identitytoolkit.googleapis.com
securetoken.googleapis.com

Other than that, I'm not sure if there's anything we can change on the SDK side to support network related issues.

@argzdev argzdev added the needs-info Need information for the developer label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: auth desktop production Issues regarding usage for desktop production needs-info Need information for the developer unity-editor Issues related to Firebase usage in Unity editor
Projects
None yet
Development

No branches or pull requests

3 participants