You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most probably my request exceeds the hard limit (in my use case, I need to update 60 over 63 fields in my doc, so the resulting url contains tens of fields).
I'm using version 22.
The text was updated successfully, but these errors were encountered:
This isn't a limitation of the library itself. However, since you are only updating certain fields, perhaps the best workaround (if anyone else comes across this) would be to split up the amount of fields to be updated and call .updateDocument multiple times.
Hi everyone. I ran into the exact same issue, so I'm glad that this thread is here. Thank you lelesrc for raising it and explaining it so well. I appreciate LaughDonor acknowledging the issue as well and providing a possible workaround. Thank you to j05u3 for providing another possible workaround, which seems to be meant more for the library itself.
For anyone that runs into the same issue- I first solved this by creating a custom set of Firebase Functions that accomplished the same goal. That worked. But after creating them, I came back to this, found this thread, and set the mask parameter to false. Handpalm, that worked too. My guess is that the mask adds the fields to the request url from the body OR adds additional characters to the request that in my case pushed it just past the limit. Either way, in my one example, that fix happened to work. I'm leaving this in case it helps anyone else or if anyone has more detailed thoughts on how to solve / workaround this issue.
When calling updateDocument with mask=true and a big set of fields to update, i got
There is an hard limit in URLFetch about url lenght:
https://issuetracker.google.com/issues/35892557
(This feature request is pending since 2012)
Inspecting the problem I noticed that fields to be masked in the update are added as request params in Write.js:
FirestoreGoogleAppsScript/Write.js
Line 42 in 97b3b3c
Most probably my request exceeds the hard limit (in my use case, I need to update 60 over 63 fields in my doc, so the resulting url contains tens of fields).
I'm using version 22.
The text was updated successfully, but these errors were encountered: