-
Notifications
You must be signed in to change notification settings - Fork 428
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
Real Time database cannot reconnect #35
Comments
Hi -- would you be able to give a few more details on how the disconnect and reconnect is happening? |
Hi, I'm using example from quickstart-unity-master\database\testapp. With some minor changes in UI. I'm getting this issue only on android phone Lg G3, not on PC. In one session I have a multiple disconnection and auto reconnection (screenshot attached). I do not call GoOffline(), the reason of this disconnection I beleive unstable Internet connection or some other thing related to internal library logic. This code shows connect|disconnect events: FirebaseDatabase.DefaultInstance.GetReference(".info/connected").ValueChanged = Chat_ValueChanged;
It's work fine till I get exception from my first message. After that auto reconnect does not work. Calling GoOnline() from code gives the same exception in log. |
Have you logged in with someone with permissions to the database? What are your security rules? Do you get this issue with the quickstart without any changes? (make your database temporarily open and run it on the Lg G3 with the original source code). |
My DB rules: |
Does this issue this occur with plugin 1.1.2 https://firebase.google.com/support/release-notes/unity#1.1.2 ? |
We've extensively tested connection in 1.1.2 and 3.0.0, please check out the latest release https://firebase.google.com/support/release-notes/unity#3.0.0 |
".read": "auth == null", |
Dears,
I've met issue with re-connection to database. Time by time re-connection is unsuccessful with this error message: "Firebase.Database.Internal.TubeSock.WebSocketException: IO Exception ---> System.IO.IOException: IO exception during Write. ---> System.ObjectDisposedException: The object was used after being disposed."
Please check the log for more detalies:
I/Unity ( 1137): WebSocket:ws_1 - had an error
I/Unity ( 1137): Firebase.Database.Internal.TubeSock.WebSocketException: IO Error ---> System.IO.IOException: EndRead failure ---> System.Net.Sockets.SocketException: Connection timed out
I/Unity ( 1137): at System.Net.Sockets.Socket SocketAsyncResult.CheckIfThrowDelayedException () [0x00000] in :0
I/Unity ( 1137): at System.Net.Sockets.Socket.EndReceive (IAsyncResult asyncResult, System.Net.Sockets.SocketError& errorCode) [0x00000] in :0
I/Unity ( 1137): at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x00000] in :0
I/Unity ( 1137): at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x00000] in :0
I/Unity ( 1137): --- End of inner exception stack trace ---
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtim
I/Unity ( 1137): WebSocket:ws_1 - |IO Error|
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): WebSocket:ws_1 - closing itself
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): Connection:conn_1 - Realtime connection lost
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): Connection:conn_1 - closing realtime connection
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): PersistentConnection:pc_0 - Got on disconnect due to Other
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): PersistentConnection:pc_0 - Scheduling connection attempt
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): ConnectionRetryHelper:Scheduling retry in %dms
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): EventRaiser:Raising 1 event(s)
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): WebSocket:ws_1 - closed
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): WebSocket:ws_1 - had an error
I/Unity ( 1137): Firebase.Database.Internal.TubeSock.WebSocketException: IO Exception ---> System.IO.IOException: IO exception during Write. ---> System.ObjectDisposedException: The object was used after being disposed.
I/Unity ( 1137): at System.Net.Sockets.NetworkStream.CheckDisposed () [0x00000] in :0
I/Unity ( 1137): at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in :0
I/Unity ( 1137): at Mono.Security.Protocol.Tls.SslStreamBase.InternalBeginWrite (Mono.Security.Protocol.Tls.InternalAsyncResult asyncResult) [0x00000] in :0
I/Unity ( 1137): --- End of inner exception stack trace ---
I/Unity ( 1137): at Mono.Security.Protocol.Tls.SslStreamBase.InternalBeginWrite (Mono.Security.Protocol.Tls.InternalAsyncResult asyncResult) [0x00000] in :0
I/Unity ( 1137): at Mono.Security.Protocol.Tls.SslStreamBase.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 count, System.AsyncCallback callback, System.Obj
I/Unity ( 1137): WebSocket:ws_1 - |IO Exception
I/Unity ( 1137): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
I/Unity ( 1137): EventRaiser:Raising /.info/connected: Value: False
Thank you!
The text was updated successfully, but these errors were encountered: