firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
JS Realtime Database truncates children
When using the project in JS, I try to collect the values for an object, but the children count is always 1. The same code on Android returns more than 1.
Firebase.database.reference("rooms").valueEvents.collect { querySnapshot ->
console.log("rooms: ${querySnapshot.children.count()}")
}
using: firebase-database:1.4.3
are you able to add a failing test for this in a PR? I suspect this is not an issue with the firebase-kotlin-sdk but perhaps the firebase-js-sdk
Sure, I don't see any unit tests for database jsMain. I'll look for other js tests, but what database would I point to in the PR?
You can write the tests in commonTest using the same style as the firestore tests, there is a test project already setup, let me know what test data you need in the db and I can add it
I haven't contributed to an open source project before so I may have done this wrong, but I could not create a branch:
remote: Permission to GitLiveApp/firebase-kotlin-sdk.git denied to thejoeba.
I have attached my commit to a patch in this comment. I was not able to run the firestore test or this new test I wrote. Issue-236-patch.zip
You need to fork the repository and then push the branch to your fork then you can create a pull request to this repo
Thanks. I have done this.
@thejoeba @nbransby I faced the same problem, is there any solution?