Firebase for Unity using service accounts doesn't work
I installed the shiny new Firebase for Unity package and am trying to get the database package to work using a service account, as detailed here. I was able to connect to and work with the database (without a service account) when the rules are left public, but not when using a service account.
Enabling verbose logging ( FirebaseDatabase.DefaultInstance.LogLevel = LogLevel.Verbose;
) gives me:
PersistentConnection:pc_0 - Scheduling connection attempt
ConnectionRetryHelper:Scheduling retry in %dms
PersistentConnection:pc_0 - Trying to fetch auth token
Then after a a min or two:
PersistentConnection:pc_0 - Connection interrupted for: connection_idle
I've tried giving the service account the Owner role and making it DwD. Neither helps.
Has anyone been able to get this working? Do I need to do something special when setting up the service account? Do I need to do something in Firebase after setting up the service account?
Answer by Tricnic · Nov 21, 2016 at 03:35 PM
I received a response from Firebase after submitting a request for help. They will be including a fix for this problem in their next release.
Do you have a link to the bug report so we can keep track of it please?
Actually, they released version 1.0.1 earlier today and it worked for me. The fix was the first item on their list of bug fixes in the READ$$anonymous$$E when you download the SD$$anonymous$$.
I opened a support request with them directly, so I don't really have anything to share, but it should work with the new version now.
Answer by ellulpatrick · Nov 15, 2016 at 11:52 AM
Did you follow the instructions exactly set here: https://firebase.google.com/docs/database/unity/start
Yes, I did. It works on a mobile device, complete with authentication.