Firestore Query Issue: Exceeding Maximum Call Stack Size Error

Hello everyone.
I’m querying a collection in Firestore to retrieve all documents from a given collection, and until recently, it was returning normally. Recently, I resumed the project and started receiving this message:

ERROR: Maximum call stack size exceeded

However, the number of documents in the collection is small (only three). Other workflows and even other nodes within the same workflow, which handle much more data, run normally. The only thing that was changed were the rules. As a test, I restored the rules to the state when there was no problem, but I still continue to receive the message. Therefore, I deduce that it shouldn’t be the rules, but…

What are the possible issues, and how should I address them?
What tests could I perform to analyze this?

Thank you.

Share the output returned by the last node

RangeError: Maximum call stack size exceeded
at documentToJson (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js:87:60)
at documentToJson (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js:120:27)
at documentToJson (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Firebase/CloudFirestore/GenericFunctions.js:120:27)

Information on your n8n setup

  • n8n version: 0.236.3
  • Running n8n via Docker:

Firestore Query Test Update: Issue Resolved by Disabling ‘Simplify’ Option – What’s the Logic Behind It?"

1 Like

Hi @RRonan, glad to hear this is now working for you. Are you using reference fields by any chance here? I seem to remember these having some potential for trouble. Disabling the “simplify” option would prevent these from being resolved automatically iirc.

1 Like

Yes, there are two reference fields. I tested it by deleting these fields, and the node worked normally. Thank you for the clarification.


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