[Unity3d] Somtimes database has no callback with auth

498 views
Skip to first unread message

Lit Qoo

unread,
Dec 9, 2016, 5:10:57 AM12/9/16
to Firebase Google Group

Database is works fine without email-password auth.

but somestimes database has no GetValueAsync callback with auth. There is no reaction. (An error occurs at a rate of about 50%.)

firebase version 1.0.1 , unity3d 5.4.1f1, osx el capitan 10.11.6,  testing on android device 


public class FireBaseTestController : MonoBehaviour {



    public UnityEngine.UI.Text MessageText;



    public void AddMessage(string _message){

        Debug.Log("firebase " + _message);

        MessageText.text = MessageText.text + "\n" + _message;

    }



    void Awake(){

     
        FirebaseDatabase.DefaultInstance.LogLevel = LogLevel.Verbose;



    }

    // Use this for initialization

    void Start () {

        InitFirebase();

    }



    public void InitFirebase(){

        AddMessage("InitFirebase start");

        DependencyStatus dependencyStatus = FirebaseApp.CheckDependencies();

        if (dependencyStatus != DependencyStatus.Available) {

            FirebaseApp.FixDependenciesAsync().ContinueWith(task => {

                dependencyStatus = FirebaseApp.CheckDependencies();

                if (dependencyStatus == DependencyStatus.Available) {

                    Signin();

                } else {

                    AddMessage("Could not resolve all dependencies: " + dependencyStatus);

                }

            });

        } else {

            Signin();

        }

    }



    public void Signin(){

        AddMessage("Signin start");

        string _testEmail = "test@test.com";

        string _testPassword = "password";

        FirebaseAuth.DefaultInstance.SignInWithEmailAndPasswordAsync(_testEmail, _testPassword).ContinueWith(HandleSigninResult);

    }



    public void HandleSigninResult(Task<Firebase.Auth.FirebaseUser> authTask) {

        if (authTask.IsCanceled) {

            AddMessage("signin canceled");

        } else if (authTask.IsFaulted) {

            AddMessage("signin faulted " + authTask.Exception.ToString());

        } else if (authTask.IsCompleted) {

            AddMessage("signin complete , user id is " + authTask.Result.UserId);

            GetValueInDatabase();

        } else {

            AddMessage("signin unknown error");

        }

           

    }



    public void GetValueInDatabase(){

        AddMessage("GetValueInDatabase start");

        FirebaseDatabase.DefaultInstance.GetReference("testvalue").GetValueAsync().ContinueWith(task => {

            AddMessage("GetValueInDatabase GetValue");

            if(task.IsCanceled || task.IsFaulted){

                AddMessage("GetValueInDatabase fail");

            }else if(task.IsCompleted){

                AddMessage("GetValueInDatabase return " + task.Result.Value.ToString());

            }

        });

    }

}



log when works fine 
12-09 17:50:14.757 300-323/? I/Unity: firebase::App initializing app com.litqoo.angrykeeper (default 1).
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:14.762 300-323/? I/Unity: Analytics API Initializing
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:14.762 300-323/? I/Unity: Analytics API Initialized
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:14.762 300-323/? I/Unity: Remote Config API Initialized
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:18.577 300-323/? I/Unity: firebase InitFirebase start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:18.617 300-323/? I/Unity: firebase Signin start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:20.472 300-323/? I/Unity: firebase signin complete , user id is K8d5c9xUjLPwXQ8iXCHEzYm5D302
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:20.477 300-323/? I/Unity: firebase GetValueInDatabase start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:20.582 300-323/? I/Unity: resetting config root due to unwriteable path:
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:20.582 300-323/? I/Unity: Firebase is setting XDG_CONFIG_HOME to /data/data/com.litqoo.angrykeeper/files because ssl certs need to be stored
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.582 300-486/? I/Unity: PersistentConnection:pc_0 - Scheduling connection attempt
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.587 300-486/? I/Unity: ConnectionRetryHelper:Scheduling retry in %dms
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.847 300-486/? I/Unity: PersistentConnection:pc_0 - Listening on testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.847 300-486/? I/Unity: PersistentConnection:pc_0 - Adding listen query: testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.862 300-486/? I/Unity: PersistentConnection:pc_0 - Trying to fetch auth token
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.902 300-323/? I/Unity: PersistentConnection:pc_0 - Successfully fetched token, opening connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.942 300-323/? I/Unity: Connection:conn_0 - Opening a connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.962 300-488/? I/Unity: WebSocket:ws_0 - Connecting to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:21.967 300-488/? I/Unity: WebSocket:ws_0 - getting ip:angrykeeper-5dbd3.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:22.502 300-488/? E/Unity: Unable to find libc
12-09 17:50:22.542 300-488/? I/Unity: WebSocket:ws_0 - connecting socket:angrykeeper-5dbd3.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:22.742 300-488/? I/Unity: WebSocket:ws_0 - Connected to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.132 300-488/? I/Unity: WebSocket:ws_0 - authenticated to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.447 300-486/? I/Unity: WebSocket:ws_0 - websocket opened
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.452 300-486/? I/Unity: WebSocket:ws_0 - Reset keepAlive
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.462 300-488/? I/Unity: WebSocket:ws_0 - ws message: {"t":"c","d":{"t":"r","d":"s-usc1c-nss-102.firebaseio.com"}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.467 300-486/? I/Unity: WebSocket:ws_0 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.492 300-486/? I/Unity: WebSocket:ws_0 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.502 300-486/? I/Unity: Connection:conn_0 - Got control message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.502 300-486/? I/Unity: Connection:conn_0 - Got a reset; killing connection to angrykeeper-5dbd3.firebaseio.com:443; Updating internalHost to s-usc1c-nss-102.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.502 300-486/? I/Unity: Connection:conn_0 - closing realtime connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.502 300-486/? I/Unity: WebSocket:ws_0 - websocket is being closed
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.522 300-486/? I/Unity: PersistentConnection:pc_0 - Got on disconnect due to ServerReset
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.542 300-486/? I/Unity: PersistentConnection:pc_0 - Scheduling connection attempt
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.542 300-486/? I/Unity: ConnectionRetryHelper:Scheduling retry in %dms
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.552 300-486/? I/Unity: PersistentConnection:pc_0 - Trying to fetch auth token
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.562 300-323/? I/Unity: PersistentConnection:pc_0 - Successfully fetched token, opening connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.562 300-323/? I/Unity: Connection:conn_1 - Opening a connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.567 300-501/? I/Unity: WebSocket:ws_1 - Connecting to:s-usc1c-nss-102.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.567 300-501/? I/Unity: WebSocket:ws_1 - getting ip:s-usc1c-nss-102.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.722 300-501/? I/Unity: WebSocket:ws_1 - connecting socket:s-usc1c-nss-102.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:24.907 300-501/? I/Unity: WebSocket:ws_1 - Connected to:s-usc1c-nss-102.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.622 300-501/? I/Unity: WebSocket:ws_1 - authenticated to:s-usc1c-nss-102.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.822 300-486/? I/Unity: WebSocket:ws_1 - websocket opened
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.822 300-486/? I/Unity: WebSocket:ws_1 - Reset keepAlive
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.822 300-501/? I/Unity: WebSocket:ws_1 - ws message: {"t":"c","d":{"t":"h","d":{"ts":1481273426666,"v":"5","h":"s-usc1c-nss-102.firebaseio.com","s":"ojfepClploxSgo9ARRV7qwwjGFhNKlCN"}}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.822 300-486/? I/Unity: WebSocket:ws_1 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.827 300-486/? I/Unity: WebSocket:ws_1 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.827 300-486/? I/Unity: Connection:conn_1 - Got control message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.827 300-486/? I/Unity: Connection:conn_1 - realtime connection established
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.827 300-486/? I/Unity: PersistentConnection:pc_0 - onReady
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.832 300-486/? I/Unity: PersistentConnection:pc_0 - handling timestamp
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.842 300-486/? I/Unity: PersistentConnection:pc_0 - Sending first connection stats
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.852 300-486/? I/Unity: Connection:conn_1 - Sending data: %s
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.897 300-486/? I/Unity: PersistentConnection:pc_0 - calling restore state
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.897 300-486/? I/Unity: PersistentConnection:pc_0 - Restoring auth.
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:25.902 300-486/? I/Unity: Connection:conn_1 - Sending data (contents hidden)
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.152 300-501/? I/Unity: WebSocket:ws_1 - ws message: {"t":"d","d":{"r":0,"b":{"s":"ok","d":""}}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.152 300-486/? I/Unity: WebSocket:ws_1 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.152 300-486/? I/Unity: WebSocket:ws_1 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.152 300-486/? I/Unity: Connection:conn_1 - received data message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.337 300-501/? I/Unity: WebSocket:ws_1 - ws message: {"t":"d","d":{"r":1,"b":{"s":"ok","d":{"auth":{"email_verified":false,"provider":"password","email":"te...@test.com","user_id":"K8d5c9xUjLPwXQ8iXCHEzYm5D302","token":{"email_verified":false,"email":"te...@test.com","exp":1481277020,"user_id":"K8d5c9xUjLPwXQ8iXCHEzYm5D302","iat":1481273420,"sub":"K8d5c9xUjLPwXQ8iXCHEzYm5D302","aud":"angrykeeper-5dbd3","auth_time":1481273420,"iss":"https://securetoken.google.com/angrykeeper-5dbd3","firebase":{"identities":{"email":["te...@test.com"]},"sign_in_provider":"password"}},"uid":"K8d5c9xUjLPwXQ8iXCHEzYm5D302"},"expires":1481277020}}}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.337 300-486/? I/Unity: WebSocket:ws_1 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.342 300-486/? I/Unity: WebSocket:ws_1 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.342 300-486/? I/Unity: Connection:conn_1 - received data message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.352 300-486/? I/Unity: PersistentConnection:pc_0 - Restoring outstanding listens
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.357 300-486/? I/Unity: PersistentConnection:pc_0 - Restoring listen testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.367 300-486/? I/Unity: Connection:conn_1 - Sending data: %s
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.372 300-486/? I/Unity: PersistentConnection:pc_0 - Restoring writes.
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.562 300-501/? I/Unity: WebSocket:ws_1 - ws message: {"t":"d","d":{"b":{"p":"testvalue","d":"testtesttest"},"a":"d"}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.562 300-501/? I/Unity: WebSocket:ws_1 - ws message: {"t":"d","d":{"r":2,"b":{"s":"ok","d":{}}}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.562 300-486/? I/Unity: WebSocket:ws_1 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.562 300-486/? I/Unity: WebSocket:ws_1 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.562 300-486/? I/Unity: Connection:conn_1 - received data message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.577 300-486/? I/Unity: PersistentConnection:pc_0 - handleServerMessage: d System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.592 300-486/? I/Unity: RepoOperation:onDataUpdate: /testvalue
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.592 300-486/? I/Unity: RepoOperation:onDataUpdate: /testvalue testtesttest
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.687 300-486/? I/Unity: EventRaiser:Raising 1 event(s)
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.687 300-486/? I/Unity: WebSocket:ws_1 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.692 300-486/? I/Unity: WebSocket:ws_1 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.692 300-486/? I/Unity: Connection:conn_1 - received data message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.707 300-323/? I/Unity: EventRaiser:Raising /testvalue: Value: testtesttest
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.732 300-323/? I/Unity: firebase GetValueInDatabase GetValue
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.732 300-323/? I/Unity: firebase GetValueInDatabase return testtesttest
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.777 300-486/? I/Unity: PersistentConnection:pc_0 - unlistening on testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.777 300-486/? I/Unity: PersistentConnection:pc_0 - removing query testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:50:26.777 300-486/? I/Unity: PersistentConnection:pc_0 - Trying to Remove listener for QuerySpec testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object]) but no listener exists.
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)



log when error

12-09 17:54:41.982 640-668/? I/Unity: firebase::App initializing app com.litqoo.angrykeeper (default 1).
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:41.987 640-668/? I/Unity: Analytics API Initializing
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:41.987 640-668/? I/Unity: Analytics API Initialized
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:41.992 640-668/? I/Unity: Remote Config API Initialized
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:45.792 640-668/? I/Unity: firebase InitFirebase start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:45.882 640-668/? I/Unity: firebase Signin start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:47.702 640-668/? I/Unity: firebase signin complete , user id is K8d5c9xUjLPwXQ8iXCHEzYm5D302
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:47.707 640-668/? I/Unity: firebase GetValueInDatabase start
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:47.827 640-668/? I/Unity: resetting config root due to unwriteable path:
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:47.827 640-668/? I/Unity: Firebase is setting XDG_CONFIG_HOME to /data/data/com.litqoo.angrykeeper/files because ssl certs need to be stored
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:48.797 640-740/? I/Unity: PersistentConnection:pc_0 - Scheduling connection attempt
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:48.807 640-740/? I/Unity: ConnectionRetryHelper:Scheduling retry in %dms
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:48.967 640-740/? I/Unity: PersistentConnection:pc_0 - Trying to fetch auth token
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.032 640-668/? I/Unity: PersistentConnection:pc_0 - Successfully fetched token, opening connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.112 640-668/? I/Unity: Connection:conn_0 - Opening a connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.137 640-744/? I/Unity: WebSocket:ws_0 - Connecting to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.142 640-744/? I/Unity: WebSocket:ws_0 - getting ip:angrykeeper-5dbd3.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.272 640-740/? I/Unity: PersistentConnection:pc_0 - Listening on testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.272 640-740/? I/Unity: PersistentConnection:pc_0 - Adding listen query: testvalue (params: System.Collections.Generic.Dictionary`2[System.String,System.Object])
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:49.822 640-744/? E/Unity: Unable to find libc
12-09 17:54:49.862 640-744/? I/Unity: WebSocket:ws_0 - connecting socket:angrykeeper-5dbd3.firebaseio.com:443
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:50.147 640-744/? I/Unity: WebSocket:ws_0 - Connected to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.522 640-744/? I/Unity: WebSocket:ws_0 - authenticated to:angrykeeper-5dbd3.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.822 640-740/? I/Unity: WebSocket:ws_0 - websocket opened
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.827 640-740/? I/Unity: WebSocket:ws_0 - Reset keepAlive
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.842 640-744/? I/Unity: WebSocket:ws_0 - ws message: {"t":"c","d":{"t":"r","d":"s-usc1c-nss-102.firebaseio.com"}}
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.847 640-740/? I/Unity: WebSocket:ws_0 - HandleNewFrameCount: 1
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.872 640-740/? I/Unity: WebSocket:ws_0 - handleIncomingFrame complete frame: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.877 640-740/? I/Unity: Connection:conn_0 - Got control message: System.Collections.Generic.Dictionary`2[System.String,System.Object]
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.877 640-740/? I/Unity: Connection:conn_0 - Got a reset; killing connection to angrykeeper-5dbd3.firebaseio.com:443; Updating internalHost to s-usc1c-nss-102.firebaseio.com
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.877 640-740/? I/Unity: Connection:conn_0 - closing realtime connection
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.882 640-740/? I/Unity: WebSocket:ws_0 - websocket is being closed
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.897 640-740/? I/Unity: PersistentConnection:pc_0 - Got on disconnect due to ServerReset
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.912 640-740/? I/Unity: PersistentConnection:pc_0 - Scheduling connection attempt
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.912 640-740/? I/Unity: ConnectionRetryHelper:Scheduling retry in %dms
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
12-09 17:54:51.922 640-740/? I/Unity: PersistentConnection:pc_0 - Trying to fetch auth token
                                       
                                      (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)



There is no reaction after that!!!!


Piotr Brzostowski

unread,
Dec 10, 2016, 1:02:28 AM12/10/16
to Firebase Google Group
I have notice very simillar issue. It's 50/50 that it will sign in me successfully with callback invocations. More important is that, if i am using this on device, during firebase auth with credentials (even email/password) in moment that callback should be called, my game is hanging and after a while ANR occurs on my Android device (Android 5.1 and 7.1 tested, but it's probably not the case - No iOS tested). I thought that's a problem with threading or something, but my attempts to change threads (explicitly to use Game Thread) that not helps. I noticed that using method without callback task and use auth OnStateChange that calls method in coroutine that kicked after 2-3s helps and my ANR not happens (not at that rate at least). This is very annoying and holds me to implement Firebase features now on my project. Beside this problem i had issues with GetValueAsync and it's callback task, so the problem seems to occurs somehow globally.

To sum up i will provide more info about my setup:
- Unity 5.5.0f3
- I am using Google Play Games Unity (0.9.35) plugin too, and auth to firebase using it's TokenId
- I am using Firebase 1.0.1 Analytics, Auth, Database (10.0.1), firebase-auth-common and firebase-auth-module is 9.8.0 (don't know why and how to change that to 10.0.1 if possible) + Google Play Services dependencies (10.0.1)
- iOS not tested

Benjamin Wulfe

unread,
Dec 11, 2016, 3:23:16 AM12/11/16
to Firebase Google Group
It looks like it is hanging on the second call to retrieve the auth credentials.
So this works 100% *on the device* if you do not use auth and instead use public access on the database?
...

Lit Qoo

unread,
Dec 11, 2016, 10:15:09 AM12/11/16
to Firebase Google Group
Database works fine if do not use auth and instead use public access.

2016년 12월 11일 일요일 오후 5시 23분 16초 UTC+9, Benjamin Wulfe 님의 말:
            if(task.IsCanceled<span

Lit Qoo

unread,
Dec 12, 2016, 11:29:23 AM12/12/16
to Firebase Google Group
I upgraded the plugin to version 1.1.0, but I have the same problem.


2016년 12월 12일 월요일 오전 12시 15분 9초 UTC+9, Lit Qoo 님의 말:

Joe Roy

unread,
Dec 12, 2016, 6:09:53 PM12/12/16
to Firebase Google Group

Same Problem here. SDK upgraded to 1.1.0, unity 5.5, windows 10, testing on Android. I can access the database with public access but signin with auth doesn't work on the phone. Signup works though.

Benjamin Wulfe

unread,
Dec 16, 2016, 5:12:42 PM12/16/16
to Firebase Google Group
Thanks Joe.  Thats valuable info.  We're working on this.

Stewart Miles

unread,
Jan 19, 2017, 7:16:54 AM1/19/17
to Firebase Google Group
We have released version 1.1.1 of the Firebase Unity SDK, which fixes this issue. You can view the release notes and download the new version from http://firebase.google.com/docs/unity/setup.

Cheers,
Stewart
Reply all
Reply to author
Forward
0 new messages