Sometimes cannot connect to firebase database on android

时间:2017-11-11 13:36:29

标签: android firebase firebase-realtime-database

I've got an issue with firebase. The problem is that I am sometimes not able to connect to the DB properly. I am not sure when it happens and if it does it miraculously disappears again. I have found some SO-Threads which stated that it is a problem with the authentication or similar but I seem to have a different problem. I activated the debug log and I can find this in the Logs:

11-10 23:46:56.212 20596-20765 D/PersistentConnection: pc_0 - Trying to fetch auth token
11-10 23:46:56.215 20596-20765 D/PersistentConnection: pc_0 - Successfully fetched token, opening connection
11-10 23:46:56.219 20596-20765 D/Connection: conn_9 - Opening a connection
11-10 23:47:04.829 20596-20705 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-10 23:47:20.485 20596-20765 D/WebSocket: ws_6 - WebSocket error.
                                                                        bkx: error while creating secure socket to wss://xxxxx.firebaseio.com/.ws?ns=xxxxx&v=5
                                                                            at bku.d(:com.google.android.gms.DynamiteModulesC@11746436:104)
                                                                            at bkv.run(:com.google.android.gms.DynamiteModulesC@11746436:4)
                                                                            at java.lang.Thread.run(Thread.java:762)
                                                                         Caused by: java.net.ConnectException: Connection timed out
                                                                            at java.net.PlainSocketImpl.socketConnect(Native Method)
                                                                            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
                                                                            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
                                                                            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
                                                                            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
                                                                            at java.net.Socket.connect(Socket.java:586)
                                                                            at com.android.org.conscrypt.OpenSSLSocketImpl.connect(OpenSSLSocketImpl.java:267)
                                                                            at com.android.org.conscrypt.OpenSSLSocketImpl.connect(OpenSSLSocketImpl.java:254)
                                                                            at java.net.Socket.<init>(Socket.java:427)
                                                                            at java.net.Socket.<init>(Socket.java:210)
                                                                            at javax.net.ssl.SSLSocket.<init>(SSLSocket.java:906)
                                                                            at com.android.org.conscrypt.OpenSSLSocketImpl.<init>(OpenSSLSocketImpl.java:194)
                                                                            at com.android.org.conscrypt.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java:68)
                                                                            at bku.d(:com.google.android.gms.DynamiteModulesC@11746436:94)
                                                                            at bkv.run(:com.google.android.gms.DynamiteModulesC@11746436:4) 
                                                                            at java.lang.Thread.run(Thread.java:762) 

this keeps repeating itself in the log... sometimes it takes about 30 Minutes and then I am able to use FirebaseDatabase again, sometimes it takes just a few minutes and sometimes I get the feeling it does not repair itself at all. I've already tried disabling all auth methods and updating the firebase-rules so you do not need to be logged in to read/write. The behaviour is still the same, regardless the Auth-Config.

Because of this I am unable to read or write anything to/from Firebase. (setvalue and ValueEventListeners are not working)

Has anyone seen this before? Or can someone tell me what this is supposed to mean: Local module descriptor class for com.google.firebase.auth not found.

I think it works about 75% of the time and 25% of the day I get connection problems. I also have an Angular Webapplication for the same Firebase Project and I have never faced those problems there.

Thanks in advance!

0 个答案:

没有答案