database - ref doesn't work #5381
Unanswered
AttilaBerczik
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I would start by looking at how we use the APIs in the documentation and in the E2E tests, e.g.: https://github.com/invertase/react-native-firebase/tree/master/packages/database/e2e/reference (and everything around there). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I can't read or write into my database, so I was trying to figure out the problem.
When I run
console.log(database().ref("/users/123"));
I get
"null/users/123"
But when I try this with firestore
console.log(firestore().doc("users/" + userId));
I get a long message
{"_documentPath": {"_parts": ["users", "Gz7eG1y7qWX6Q9gijSPDlcLcZop1"]},
...When I run
console.log(database());
I get a long message
{"_app": {"_automaticDataCollectionEnabled": true, "_deleteApp": [Function bound deleteApp],
...From this I assume that my firebase setup is correct, there should be a problem with the ref function.
Could you guys help?
I use
"@react-native-firebase/app": "^12.0.0", "@react-native-firebase/database": "^12.0.0", "@react-native-firebase/firestore": "^12.0.0", "react-native": "0.63.4",
Beta Was this translation helpful? Give feedback.
All reactions