I have tried different values of once() and then() but I seem to get a similar error. The current error message is:
"DataSnapshot.val failed: Was called with 1 a