34

Read-only & non-realtime mode activated to improve browser performance

Message pops up in my project and I'm unable to delete the nodes as well

Also I read this https://groups.google.com/forum/#!topic/firebase-talk/qLxZCI8i47s

Which states :

If you have a lot of nodes in your Firebase (say thousands), we need to create a new element for each node and modern browsers simply have limitations of how many DOM elements you can add to a page

It says:

To resolve this problem, don't load your Firebase Dashboard at the root of your Firebase, but instead load it lower down in the hierarchy

I do not get what it means

How do I get back to my Realtime Dashboard?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Veeresh Charantimath
  • 4,641
  • 5
  • 27
  • 36

8 Answers8

98

If you want to delete a high level node when this is activated, I recommend doing this.

Open up a text editor and type in { }. Save this file as "blankJSON.json".

Go to high level node you want deleted and select it, once it opens up and shows you all the nodes that need to be removed, select the three bars at the top right and select "Import JSON", (It would be safe to first "Export JSON" If you don't have backups, in case you make a mistake here). Import the JSON file we created earlier titled "blankJSON".

This will delete all of the data inside.

Once again, I highly suggest you make a backup before doing this, It's extremely easy to make a backup and also it is much easier than you would think to upload this blankJSON to the wrong node and then erasing a bunch of important data.

Dallas
  • 1,788
  • 2
  • 13
  • 24
40

When it detects that it's downloading too many nodes from your database, the Firebase Console stops using real-time mode and switches to read-only mode. In this mode it requires less work from the browser, so it is more likely that the browser will stay performant.

To get back to realtime mode, you have to go to a location that has fewer nodes. So say that you start loading the database at the root, that means that "pseudo address bar" at the top of the data tree will say:

https://<your-project>.firebaseio.com/

And then will show the list of items. Now click on the URL in that pseudo address bar and change it to:

https://<your-project>.firebaseio.com/<one-of-your-keys>

And hit enter. The data tree will reload with just the node from one-of-your-keys and down and will likely switch to realtime mode again.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 13
    But how can I delete a high-level node that has a large number of children, from the browser ? For some reason even doing a programmatic delete of the high level node using a call to a mutableData.setValue(null) within a transaction stopped deleting that node for me...that method had worked earlier – dangling_refrenz Oct 09 '16 at 22:36
  • 4
    Ok sorry, it looks like the programmatic delete worked for me, just took a few seconds to be reflected in the browser....so conclusion: for nodes with large nr. of children I can only delete programmatically, not from the browser – dangling_refrenz Oct 09 '16 at 22:42
  • 2
    @dangling_refrenz Little late, but you can in fact delete high level nodes in browser. You can check my answer below to do so. – Dallas Jun 29 '17 at 17:57
  • @FrankvanPuffelen Hey I tried the above but the firebase console is still showing this: Read-only & non-realtime mode activated to improve browser performance. How can I switch back to real time mode again? – QWERTY Aug 22 '17 at 08:42
8

Every node key in firebase is a link, you can open a sub-node in a new tab and then edit that sub-node and its children.

  1. Right click on a sub-node you want to edit or delete

  2. Select open link in a new tab

  3. Edit the sub-node in the new tab

Ashwin
  • 7,277
  • 1
  • 48
  • 70
  • 1
    That's a great observation! This means that you can enter the node you want through the address bar, even if the sub-node doesn't exist! This allows you to create new nodes even if its father is too big. – Ivan Rubinson Jul 26 '18 at 13:35
  • 1
    this is the best solution as you just right click and select open in new tab and tada.. thanks Ashwin! – Charlie Sep 01 '18 at 10:37
  • 1
    But this doesnt work if the node that you have to edit has a lot of nodes. Firebase will still show you the "read only" mode. – Diego Ricardo Valdivia Arreola Jan 22 '20 at 22:10
6

1) Click on the Node you want to mass delete

2) Import an empty .json file (just containing curly braces, {} )

3) The node value will be set to null, in other words it is deleted or rather overridden with an empty node!

KSA
  • 91
  • 1
  • 4
2

What you can do is to have an OnClickListener and call the remove value method to your DatabaseReference, like this:

  mCart.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            mDatabaseReference.removeValue();
        }
    });
Zack
  • 472
  • 7
  • 16
1

I have the same problem... I'm a bit surprised because I though Firebase could easily scale to support huge amount of data (example million users, etc.).

I have a node with 80000 sub-nodes (each object has his own push-id) and I cannot delete or perform any action on it because the real-time doesn't work in Firebase console.

I think the only way to udate or delete the data it's to do it via JAVA code :(

DavideN
  • 253
  • 2
  • 11
  • 3
    It has nothing to do with Firebase scalability, it is just that they limit browser editing for large number of nodes – interrupt Apr 23 '17 at 06:11
0

Multiple times trying to load the specific keys can be tiresome. There is a python library that could do this for you easily.

http://ozgur.github.io/python-firebase/

I needed to delete a lot of keys and this helped me do that in one go.

  • Links to potential solutions are always welcome, but please add some details for future visitors in case the link is no longer available. – Nikolay Mihaylov Aug 24 '16 at 06:17
0

What I do is export the entire tree, edit/add the node I want using an editor, then import the JSON and overwrite the previous node/tree. Problem solved! Risky though

kawerewagaba
  • 1,107
  • 2
  • 15
  • 21