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
After updating firebase-admin from 10.3.0 to use the new COUNT() feature, I can no longer update a DOC with set() and FieldValue.arrayUnion, even though the property was in the Document previously.
Steps to reproduce:
In version 10.3.0 when I use the code below it works as expected.
// Initializing Firebase in CloudFunctionsconstfunctions=require("firebase-functions"),admin=require('firebase-admin');constIS_EMULATOR=((typeofprocess.env.FUNCTIONS_EMULATOR==='boolean'&&process.env.FUNCTIONS_EMULATOR)||process.env.FUNCTIONS_EMULATOR==='true');admin.initializeApp();letfirestore=admin.firestore();if(IS_EMULATOR){firestore.settings({host: 'localhost',port: '8081',ssl: false})}
I don't know if, between versions 10.3.0 and 11.2.0, the way to call the arrayUnion({}) function changed or if I'm doing something wrong, but since nothing was changed in the code, only the version, I understand that maybe the problem be on the new version, any input is welcome :)
The text was updated successfully, but these errors were encountered:
After looking at some other issues that other users were having with Firestore here in the repository and reading this comment from @lahirumaramba, it was enough minor modifications in the way to call the Firestore functions that the problem was solved. The big problem was the switch to modular SDK
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
After updating firebase-admin from 10.3.0 to use the new COUNT() feature, I can no longer update a DOC with set() and FieldValue.arrayUnion, even though the property was in the Document previously.
Steps to reproduce:
In version 10.3.0 when I use the code below it works as expected.
In version 11.2.0 when I use the same code above, it returns an error, in the console and does not update the Document.
Relevant Code:
I don't know if, between versions 10.3.0 and 11.2.0, the way to call the
arrayUnion({})
function changed or if I'm doing something wrong, but since nothing was changed in the code, only the version, I understand that maybe the problem be on the new version, any input is welcome :)The text was updated successfully, but these errors were encountered: