com.google.firebase.FirebaseException: An internal error has occurred. [ 7: ]

徘徊边缘 提交于 2020-01-15 06:37:10

问题


I used to create accounts and connect to my application with firebase but then soon when I disconnected I couldn't create accounts. After 1h of that, I managed to create an account and when I disconnected to see if the problem was resolved, I realize that it's still there.

By doing task.getException() in case of account creation failure, I get this error: "com.google.firebase.FirebaseException: An internal error has occurred. [7:]" Do you have an idea of ​​the cause of the problem?


回答1:


I have same problem because my internet was not active. Make sure you have active internet connection.




回答2:


I had a similar issue and got the same exception and code: 7. I was calling firebaseUser.getIdToken() in a Rx stream. So while testing the apps functionality while being offline, I found that the JWT token that is returned in firebaseUser.getIdToken() had expired and was throwing said error. It has a lifetime of 1h.

So I split out my implementation to separate functions, only calling firebaseUser.getIdToken() before a authorised call, which must be done while online anyway to be sure and secure.

Without seeing any code, it seems you are signed in/keep a reference to a expired firebase token. Make sure you signed out properly from firebaseAuth before calling your "account creation" piece.




回答3:


If you are sure you have an active Internet connection and you are testing from an Emulator, restart your emulator and it should work. Sometimes, the emulator disconnects from the Internet and these sort of problems occur.



来源:https://stackoverflow.com/questions/57998111/com-google-firebase-firebaseexception-an-internal-error-has-occurred-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!