-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Error when get document by firestore #533
Comments
@arvitaly Can you send us the entire stack trace, not just the first couple of lines? |
Yes, of course
|
@chrisbianca seems to be related to the issue you mentioned on Discord "Unknown pattern character 'X'" |
@chrisbianca In commit fc3fc6d , the |
@urajat Yes, I introduced this to fix a failing test in our test suite. However it seems that this failing test is caused by the fact that the Android emulator uses a different version of Java to an actual device!! In Java SDK 7+ (which I hadn't realised was only used in the emulator), |
@chrisbianca Checked https://developer.android.com/reference/java/text/SimpleDateFormat.html#iso8601timezone In this case, using XX should help. I am testing on the emulator where the single X works, but discards the timezone minutes. With XX or XXX, the values are interpreted correctly. XX appears to be the direct equivalent of Z. |
@urajat Thanks for this. Can you do me a favour and see what happens when you run with XX on a device? According to this open bug, even though it states that X is supported, it doesn't actually work on most versions of Android: https://issuetracker.google.com/issues/65350732. Instead you get the error that's cited above |
@chrisbianca I just checked with a Moto X Play device with Android 6.0.1. No combination of X works - X, XX, XXX - throws the |
@urajat The Z option seems to work correctly when sending dates from Native to JS, but when reading dates that are sent from JS to Native I get a The test case we have that is failing sets a date from the JS side into Firestore, then reads it back out to check they're the same. It looks like Javascript |
@urajat Ok, I think I have figured it out, though because I'm in the GMT/BST timezone, it's always an easier one to account for! Are you able to try out this commit and see whether it works for you: You should be able to install directly by doing the following:
|
This has now been released as part of version 3.0.5 |
@chrisbianca Just got around to testing this. 3.0.5 works on the emulator (tested on Android 7.1.1). But on the device with 7.1.1, this doesn't work - I get an |
I'm moving this over to a new issue: #545 as the initial bug is fixed. |
Issue
App crashed
Environment
The text was updated successfully, but these errors were encountered: