-
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
🔥 [🐛] ignoreUndefinedProperties not respected for arrays of objects #5437
Comments
interesting! I can't imagine why we'd have a toggle to ignore them and still see that message ever, I'll be surprised if firebase-js-sdk works that way. Marked for review but I'm guessing you are correct and I appreciate the solution sketch |
That's my assumption as well, but believe me, I've seen some really weird SDKs during my 20 years as a developer. |
Preach 🙏 😆 |
this is requiring a decent amount of work to deal with. Is this planned for a BF release any time soon or should I downgrade to the last version that did not have this issue? |
@mikehardy Here's an example of something that fails for me:
I haven't tested it to see if it fails when it's not nested but by the sounds of the others it does. |
About as simple as I expected ;-) but happy to have a known-bad example, thank you @TMcLoone ! |
Sorry for not replying earlier, haven't been at the keyboard since Thursday noon. Can confirm that @TMcLoone 's example is in-line with our code that triggers the issue. |
@mikehardy Glad to hear there's a new testcase for this. What is the bug fix release cycle like for this project? I'm unfortunately running into this issue frequently in unexpected places. |
Sorry there's no published fix yet. As with all open source the cycle is either someone proposes a fix from the community and I can merge and release in the same day plus there's an auto generated set of patch package patches, or it waits on me or another maintainer with no ETA given. The feature was added recently as well, it may be trivial to simply go in and reverse it or use the older version temporarily Without giving an ETA as those simply lead to disappointment in open source I can say it's personally a high priority and having a reproduction is typically the biggest hurdle. We already have that |
Your patience has been greatly appreciated! I'm slowly catching up over here in firebase-land and I think I've got this one. Most of the PR I just posted is testing support (thanks again for the sample, obvious though it is, it was useful to be sure) I'd appreciate if someone could check the PR and maybe integrate the patch-package set to verify? It's the first patch post-release so it's super clean - [edit - re-pushed the PR, has new links if you were an early-bird and already looked here] |
This seemed important and is a real problem but I haven't heard back from anyone? In the absence of confirmation I will assume my fix is good and will merge and release it later today |
Mike,
Thank you. This is important as I have a half-baked solution to avoid crashes in production but a real solution will restore functionality.
Thank you!
… On Jul 21, 2021, at 23:30, Mike Hardy ***@***.***> wrote:
This seemed important and is a real problem but I haven't heard back from anyone? In the absence of confirmation I will assume my fix is good and will merge and release it later today
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@mikehardy , sorry for not replying earlier. I've been away from my computer for the last three weeks. I'll have a look at this later today. |
No problem, hopefully I nailed the issue, it's released already but we can always do a follow up PR if needed |
I'm planning to update our libraries next, will verify the fix within the next 24 hours or so. Got a little bit delayed by other stuff after returning from the vacays. |
Can confirm that the fix is working when using version 12.3.0. |
Issue
According to what I'm seeing, the
ignoreUndefinedProperties
setting is not respected for objects in arrays, i.e. if you have an object in an array that has one or more undefined values, then you'll get "Unsupported field value: undefined", even if you've setignoreUndefinedProperties
totrue
.I tracked down the issue and it could be fixed by adding
ignoreUndefined
tobuildNativeArray
and passing it along togenerateNativeData
, as well as adding the argument to thebuildNativeArray
call ingenerateNativeData
at line 108 (or thereabouts).Here lies a hidden question, should the arrays be checked like this or not? I'm not familiar with how the JS SDK behaves and nor do I have the time or the interest too look into it right now.
Project Files
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:12.1.0
Firebase
module(s) you're using that has the issue:Firestore
TypeScript
?N/A
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: