I get this error; 'TypeError: undefined is not an object (evaluating 'view.getQuery)'
I am able to use firebase.auth()
. After I login the app I get the error.
Important Note: There is no error when debugger is on.
This is where I call firebase.database()
which causes the error.
componentDidMount(){
firebase.database().ref(`/posts/`).on('value', snapshot => {
const keys = Object.keys(snapshot.val());
alert(keys)
});
}
I tried to upgrade and downgrade to all the firebase versions, it didn't solve.
related library versions;
"firebase": "^6.3.3",
"react": "^16.6.3",
"react-native": "0.58.3",
Android API 28
Java version: 1.8.0
Thanks for your recommendations.
Error screenshot: https://i.stack.imgur.com/oQT4W.png