A few days ago I could get a null value (or value that doesn’t exist) from my RealtimeDB database.
Now when the program tries to retrieve that variable (that doesn’t exist) it makes the entire screen white. I get “undefined” on the error message. Which typically means everything is ok.
I know it is a null value, but it was working before. This is a key part of my app to see if the user has entered data, and I don’t believe there is a way around it.
Yes, the platform is constantly evolving and for this reason, there may be situations when something does not work. But this does not mean that the problem is only in the platform. Before using the data, you should check that it exists. So make checks for null, undefined, and the like.
This is very frustrating. Originally, in my app I checked for a null value in my realtimedb and if it came back null then I asked for info from the user.
This doesn’t work anymore. I did a workaround and stored a local variable that let the code know “hey this user hasn’t sent this info yet”.
You can see in the screen shot I call a get function to realtimeDB and store that item in a stored variable. If the stored variable is null the function still runs properly. I also don’t get any funny errors with this.