Google Cloud Realtime Database node – will the node work with the European (Belgium) server?

Hi!

I’m a new user, just getting started with n8n.

I needed a database, so I signed up for a Firebase Google Cloud Realtime Database, but I cannot get the node to work with my database.

I get the following error:
“ERROR: The resource you are requesting could not be found. 404 Not Found”

When signing up for Firebase I chose to use the European site (Belgium).

According to the Firebase console the URL to the database is:
https://MYPROJECTID-default-rtdb.europe-west1.firebasedatabase.app

When checking the source code for the n8n Firebase node, I do only see one reference to a URL.
https://firebase.googleapis.com/v1beta1/projects

I guess this Is the reason for the 404-error? I found this thread, which seems to point out the same situation as I have:

Can I work around this in some way? Where to change?

Environment:
0.168.2, docker-compose

By the way. The node authenticates correctly with Firebase, since it identifies my Project ID successfully and populates the drop down box.

Hi @Areip, welcome to the community :tada:

I am sorry to hear you’re having trouble here. I have not used this node myself, but shall add this to our internal bug tracker for a more in-depth investigation and fix.

The URL you are seeing would be the one used to fetch your projects, I assume this is working fine and the error only occurs when actually trying to store or fetch data?

Other operations would use https://${projectId}.firebaseio.com/${resource}.json (seen here) which does indeed seem outdated (unless you’re in the us-central1 region) from looking at Google’s documentation:

Depending on the location of the database, the URL for the new database will be in one of the following forms:

  • DATABASE_NAME.firebaseio.com (for databases in us-central1)
  • DATABASE_NAME.REGION.firebasedatabase.app (for databases in all other locations)

So it seems your conclusion is spot on here.

Hi!

Thanks! I really appreciate it :grinning:

1 Like

You are most welcome and sorry I didn’t have any better news here

Hello,

I get the same error when trying to access data but my database is stored in us-central1 region.
So the problem may be somewhere else (even if I think that database stored in Europe region will not work…)

I had an old project residing on the same Firebase account, with a database at DATABASE_NAME.firebaseio.com
I can use the n8n node with this database without any problem. Works as expected.

However if I create a new project, and in that project, creates a realtime database in us-central1, the database address becomes DATABASE_NAME-default-rtdb.firebaseio.com.

1 Like

Thanks @Areip, I imagine this information helps a lot with fixing this!

@Areip

I see exactly the same database address with DATABASE_NAME-default-rtdb.firebaseio.com with my database which is stored in us-central1

1 Like

For your information, changing line 24 of the following file Google Firebase Realtime Generic Functions did the job:
Simply replace

url: uri || https://${projectId}.firebaseio.com/${resource}.json,

by

url: uri || https://${projectId}-default-rtdb.firebaseio.com/${resource}.json,

1 Like

Got released with [email protected]

1 Like

Great! 0.173.0 worked as expected.

Thanks for everything :smile:

1 Like