-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async getData() returns the value of parent node instead of the child node. #12965
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
This appears to be the same issue as #12168 and #12225. We are encountering hard-to-discover bugs related to this issue, and I would love to help fixing it. @paulb777 Would it at all be possible for you to share your investigations about the extent of this issue, so that myself or others might be able to help fixing the issue? |
Thanks for the reply @mortenbekditlevsen |
Description
Hello!
When I call the async
getData()
method, it returns the snapshot of the parent, not the actual child.Reproducing the issue
Create
User
node and two nodes inside of it:id
,name
.-- id : testId
-- name: testName
Call:
let userId = try! await Database.database().reference().child("User").child("id").getData().value
It returns 2 key-value pairs id="testId", name="testName". But not the
id
only.Firebase SDK Version
10.17.0
Xcode Version
15.1
Installation Method
Swift Package Manager
Firebase Product(s)
Database
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: