# Issues with Firebase references in Node-Red flows

**URL:** <https://discourse.nodered.org/t/issues-with-firebase-references-in-node-red-flows/77735>\
**Category:** General\
**Created:** [20 April 2023 10:01 UTC](https://discourse.nodered.org/t/issues-with-firebase-references-in-node-red-flows/77735 "2023-04-20T10:01:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pereibex](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pereibex/32/79045_2.png) [@pereibex](https://discourse.nodered.org/u/pereibex)\
**Post date:** [20 April 2023 10:01 UTC](https://discourse.nodered.org/t/issues-with-firebase-references-in-node-red-flows/77735/1 "2023-04-20T10:01:07Z")

</div>

It is not possible to use document references through the Javascript SDK for Firebase.

```auto
FirebaseError: [code=invalid-argument]: Function setDoc() called with invalid data. Data must be an object, but it was: a custom Object object 

```

This is a variable typing problem when trying to pass a Firebase reference as a parameter.

The problem is described in another post: [Node-red is somehow mutating normal Object so I can't pass it into Firestore setDoc() function](https://discourse.nodered.org/t/node-red-is-somehow-mutating-normal-object-so-i-cant-pass-it-into-firestore-setdoc-function/53893)

The problem has been discussed but using another library is not the solution.

As Sulomus indicates, when creating an object in nodered it does not have the type "object" but "Object object", which is not accepted by the Firebase SDK.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 June 2023 10:01 UTC](https://discourse.nodered.org/t/issues-with-firebase-references-in-node-red-flows/77735/2 "2023-06-19T10:01:21Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
