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] Unity Editor Crash in post login-register with Firebase Auth Emulator #910

Open
khrm355 opened this issue Nov 29, 2023 · 0 comments
Open

Comments

@khrm355
Copy link

khrm355 commented Nov 29, 2023

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2022.3.10.f1
  • Firebase Unity SDK version: 11.6.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Auth
  • Other Firebase Components in use: Auth, Analytics, Realtime Database, Function, AppCheck, Crashlytics
  • Additional SDKs you are using: Facebook
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: iOS, Android
  • Scripting Runtime: IL2CPP
  • Pre-built SDK from the website or open-source from this repo: website

[REQUIRED] Please describe the issue here:

Unity Editor crashes after successful login-register with Firebase Auth Emulator.
All callbacks working in the Function, database emulator (it creates the user, and callbacks are called)

As we can see in the stacktrace I've shared below, after the user logs in, it looks like the Firebase sdk is trying to create a persistence folder in appdata and using the Firebase authentication URL for that folder name. Since the emulator uses the URL "localhost:9000", it cannot proceed because the Windows file system does not allow ":". colon to use in the folder name.

Steps to reproduce:

  • Add "USE_AUTH_EMULATOR" variable into Windows Environment Variables
  • Start Firebase Auth Emulator
  • Register or login with any function (with credentials or email etc)
  • After this function successful, and client log in, editor crashes

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
No i haven't tried,

What's the issue repro rate? (eg 100%, 1/5 etc)
%100

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

ERROR: Could not initialize persistence: App data directory error: Could not create directory C:\Users\gokay\AppData\Local/com.airforce1337.petclicker/localhost:9000
Crash!!!
SymInit: Symbol-SearchPath: 'C:/Program Files/Unity/Hub/Editor/2022.3.10f1/Editor/Data/Mono;.;C:\Users\gokay\OneDrive\Documents\GitHub\Pet-Clicker;C:\Users\gokay\OneDrive\Documents\GitHub\Pet-Clicker\Library\BurstCache\JIT;C:\Program Files\Unity\Hub\Editor\2022.3.10f1\Editor;C:\WINDOWS;C:\WINDOWS\system32;', symOptions: 534, UserName: 'gokay'
OS-Version: 10.0.0
Token[0:8] = eyJhbGci
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
OnlineServices/<>c:<IdTokenChanged>b__21_0 (System.Threading.Tasks.Task`1<string>) (at Assets/Scripts/OnlineService.cs:116)
Firebase.Extensions.TaskExtension/<>c__DisplayClass4_1`1<string>:<ContinueWithOnMainThread>b__1 () (at /Users/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 /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:77)
Firebase.ExceptionAggregator:Wrap (System.Action) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/ExceptionAggregator.cs:112)
Firebase.Dispatcher:PollJobs () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Dispatcher.cs:123)
Firebase.Platform.FirebaseHandler:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:207)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)

Relevant Code:

 Task<FirebaseUser> loginTask = OnlineServices.Instance.auth.SignInWithCredentialAsync(CredentialGathering.Task.Result);

    loginTask.ContinueWithOnMainThread(task =>
    {
        if (task.IsCompletedSuccessfully)
        {
            OnlineServices.Instance.OnSignInCompleted();
            ((LoginScenePage)ParentPage).LoginWaitingScreen.Open("Login Successful");
            loginInProgress = false;
        }
        else
        {
            ProcessLoginFailure(task.Exception);
        }
    });
@aalej aalej removed the new New issue. label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants