Questions tagged [firebase-realtime-database]

Firebase Realtime Database is a cloud hosted, NoSQL, JSON database that provides offline caching and synchronization. Do NOT use this tag for questions about Cloud Firestore; instead use the [google-cloud-firestore] tag.

About Firebase Realtime Database

Firebase Realtime Database is a component of the Firebase suite of tools for cross-platform application development.

  • Intuitive and easy-to-use API
  • Remains responsive regardless of network latency or Internet connectivity so your Firebase app works offline. Data synchronizes when connectivity returns
  • Handles the complexity of realtime synchronization and provides flexible conflict resolution
  • Accessible directly from client SDKs, or from your server with the REST API

To learn more: Firebase Realtime Database for SQL Developers (video series)

Related tags

40037 questions
39
votes
5 answers

Firebase @PropertyName doesn't work

THE STORY I am using Firebase Realtime Database in my app. I have a model something like this. class Item { int mItemName; // Simplified for brevity } Now, this stores the field as itemName in my real time database. But I don't want to use…
Aritra Roy
  • 15,355
  • 10
  • 73
  • 107
39
votes
7 answers

How to disable Signup in Firebase 3.x

I have created some users using firebase.auth().signInWithEmailAndPassword and would like to stop signUp now, but keep signIn working. I tried some rules on users and even to stop writing to firebase at all. However registration was still…
38
votes
2 answers

Getting the user id from a database trigger in Cloud Functions for Firebase?

In the example below, is there a way to get the uid of the user who wrote to /messages/{pushId}/original? exports.makeUppercase = functions.database.ref('/messages/{pushId}/original') .onWrite(event => { // Grab the current value of what was…
38
votes
6 answers

Making firebase storage public for reading and writing on android

I am new to firebase storage. Can anyone tell me how to make the storage files public for reading and writing?. The default code provided by firebase is given below. What changes should I make ? service firebase.storage { match…
38
votes
17 answers

setPersistenceEnabled(true) crashes app

I’m creating my first Firebase App. One of its requirements is that it run when the network is not available. The Firebase guide states: Enabling disk persistence allows our app to also keep all of its state even after an app restart. We can…
Loren
  • 820
  • 2
  • 11
  • 18
38
votes
7 answers

Firebase Database Permission denied with read/write permissions set to true

I'm having trouble writing to my Firebase database in my simple Android app. I've set my database rules to be public: { "rules": { ".read": true, ".write": true } } Created a simple class Message: import…
Ben
  • 757
  • 1
  • 7
  • 15
37
votes
3 answers

Escaping issue with firebase privateKey as a Heroku config variable

I'm trying to create an Heroku node task that reads data from Firebase and console.log it. My node script (located inside the /bin directory) is: require('dotenv').config({ silent: true }); var firebase =…
Amit Kaspi
  • 835
  • 2
  • 10
  • 19
37
votes
4 answers

Clear firebase persistence after logout

Is there any way to clear data stored in Firebase Database persistence enabled via setPersistenceEnabled(true)? Or eventually prevent read access to previously stored users data on the device? And extra question - is there any way to check if any…
wrozwad
  • 2,610
  • 1
  • 30
  • 38
37
votes
4 answers

How to separate initial data load from incremental children with Firebase?

I have an application where new children get added to Firebase every 5 seconds or so. I have thousands of children. On application load, I'd like to process the initial thousands differently from the subsequent children that trickle in every 5…
Keith Carter
  • 422
  • 1
  • 6
  • 18
36
votes
8 answers

How do I fix a Firebase 9.0 import error? "Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase')."

I am trying to implement firebase in my React application but it seems my version of importing is outdated. Here is my code: import firebase from "firebase/app"; import "firebase/auth"; const app = firebase.initializeApp({ apiKey:…
36
votes
9 answers

view config getter callback for component 'div' must be a function (received 'undefined'). Make sure to start component names with a capital letter

Error is: Invariant Violation: view config getter callback for component 'div' must be a function (received 'undefined'). Make sure to start component names with a capital letter. I am getting this error while trying to retrieve data from firebase…
36
votes
4 answers

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_FIRApp"

I am integrating Firebase in my app according to the instructions and added [FIRApp configure]; in the code however, while compiling the app I am getting the following error: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_FIRApp",…
aareeph
  • 875
  • 1
  • 12
  • 20
36
votes
4 answers

How to remove child nodes in firebase android?

I have a number of child nodes in my firebase db and I want to delete only one child node. Firebase firebase=new Firebase("..address.."); firebase.push().setValue(classObj); //here classObj is a class object which has a getter and setter for an…
Akhil
  • 511
  • 1
  • 8
  • 13
35
votes
1 answer

Firebase vs AngularFire

I am working on an Angular App, which is connected with Firebase Real-time database. I am currently using AngularFire for accessing Firebase database. After reading Vanilla Firebase and AngularFire documentation, and after implementing some portion…
35
votes
9 answers

com.google.firebase.database.DatabaseException: Calls to setPersistenceEnabled() must be made before any other usage of FirebaseDatabase instance

I am having a problem when I try to setPersistence in fIREBASE,can someone please explain on how to go about it, protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Vincent Macharia
  • 475
  • 2
  • 7
  • 20