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
when Updating a value in the snapshot, the function is triggered but not populating change.after.val() however it is populating change.after (it is a datasnapshot) See attached Logging)
[REQUIRED] Expected behavior
To get the snapshot value as a dict.
[REQUIRED] Actual behavior
Were you able to successfully deploy your functions?
yes
The text was updated successfully, but these errors were encountered:
Related issues
[REQUIRED] Version info
node: v20.10.0
firebase-functions: 6.1.0
firebase-tools: 13.24.0
firebase-admin: ^6.1.0
[REQUIRED] Test case
exports.updateInvoice = functions.region('europe-west2').database.ref('/Invoice/Created/{invoiceKey}')
.onUpdate(async (change, context) => {
functions.logger.log("Updating Invoice", context.params.invoiceKey);
functions.logger.log("Updated snap", change.after.val());
functions.logger.log("change, context", change, context);
const snap_after_val = change.after.val();
functions.logger.log("Updated snap", snap_after_val);
const snap_before_v2 = change.before.val();
functions.logger.log("Updated change", change);
functions.logger.log("Updated change.before", change.before);
functions.logger.log("Updated change.after", change.after);
functions.logger.log("Updated change after._data", change.after._data);
functions.logger.log("Updated snap_before", snap_before_v2);
})
[REQUIRED] Steps to reproduce
when Updating a value in the snapshot, the function is triggered but not populating change.after.val() however it is populating change.after (it is a datasnapshot) See attached Logging)
[REQUIRED] Expected behavior
To get the snapshot value as a dict.
[REQUIRED] Actual behavior
Were you able to successfully deploy your functions?
yes
The text was updated successfully, but these errors were encountered: