firebase-ios-sdk: Incorrect long values storage in database persistent storage
- Xcode version: 9.0 (9A235)
- Firebase SDK version: 4.2.0
- Library version: 4.2.0
- Firebase Product: database
Hello, we store dates in firebase like long numbers in milliseconds since the epoch. All works fine, until I enable database data persistence on disk
It looks like, SDK stores long values as ints and int overflow happens.
When I download value like 1506428988000 from database - all works fine, but, when I fetch same value from local cache - it returns -1104532896
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 16 (8 by maintainers)
Guys, any progress on this issue?
The fix has landed! I’ll make a comment when it’s shipped (unfortunately the next release has already been assembled so it’ll have to make it into the next one after that, ~2 weeks from now).
I’ve contacted Firebase support about this and they asked for a way to reproduce the issue. I thought I may as well post it here as well.
Edit: Replaced “keepSynced” with “setPersistenceEnabled” to correctly repro the issue.