skip to Main Content

I am getting the following error:

[Firebase/Database][I-RDB034005] Firebase Database connection was forcefully killed by the server. Will not attempt reconnect. Reason: Firebase error. Please ensure that you spelled the name of your Firebase correctly

Permissions on admin console are set .read and .write to false

I understand the error. when I run the following command and print the value of variable:

Database.database().reference()

I get (cant edit it):

https://bananas-31fe5-default-rtdb.firebaseio.com

And on admin console I have (cant edit it):

https://bananas-31fe5-default-rtdb.europe-west1.firebasedatabase.app

On admin console, I tried creating a new database (and disabling the primary one) on the US, but the one on xcode doesnt seem to change.

My gut feeling is this has to do with the pod library not being updated to enable multiple db location (EU is in beta).

2

Answers


  1. firebaser here

    For non-US-central databases the SDK may not be able to read the information from the plist file, so you have to pass it in the code.

    You can pass the database URL into the call to database, like:

    Database.database("https://bananas-31fe5-default-rtdb.europe-west1.firebasedatabase.app").reference()
    

    See docs for that method override.

    Login or Signup to reply.
  2. When you create a realtime database for the first time, DATABASE_URL is added to your GoogleService-Info.plist file on the server side. You may be getting an error because the GoogleService-Info.plist is outdated and does not contain DATABASE_URL. You can download your updated GoogleService-Info.plist file from your Project Settings and try again.

    I hope it helped

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search