Firebase Query Raw Mode: "code terminated for an unknown reason"

Our team has an internal tool which was working as normal, but is now showing an error for any Firebase Firestore Raw Mode queries. Any Firebase Firestore Raw Mode query I make in old or new tools is returning "The code terminated for an unknown reason. Potentially, the memory limit 256 Mibs was breached.".

Recreating the query in GUI mode is successful. No changes have been made to the tool. The last known successful use of this query from our audit logs was at 2025-01-29T21:08:11.466Z. As GUI mode works, utilizing the resource outside of Retool works, and everything worked up until this afternoon I am really hoping the Retool team has a solution to help out here as this is a critical internal tool.

Is anyone else experiencing similar problems?

4 Likes

We also starting having this issue, I did create a post about this just now Firestore queries with "Raw Mode" return: The code terminated for an unknown reason. Potentially, the memory limit 256 Mibs was breached

Didn't see this post before we created the post of our own

1 Like

Experiencing the same issue!

1 Like

We have the exact same issue. this is affecting our operations

1 Like

Have been facing this exact issue, please update if you get a solution or this

Hello everyone,

Apologies for this issue, our engineering team is working on resolving this currently.

Will update with any further updates we have :saluting_face:

Same issue too! We can't use our app anymore.
Please fix this ASAP!!!

We are also experiencing the same issue.

@Stephane_Petrot and @chetheaker apologies for the inconvenience!

Our engineering team is working on fixing this as fast as we can.

Should be resolved shortly. Will update with any further news I hear :sweat:

Is this issue back? I have been getting reports of this error from our users all day today:

GUI mode is working as expected @Jack_T

Hi @mikew,

I will let our engineers know and see if they can figure out what might have caused this. Are you on cloud?

Hi @Jack_T - Yes I am! This started happening on July 30th without any changes on our end. We had to switch all of our functions back to GUI mode and then they worked.

However, there are performance gains from using RAW mode so that is our preference.

Hi @mikew,

Just got some details and a potential explanation back from the engineering team.

They told me that "If the number of documents being returned by that query has increased over time then they could have started hitting the memory limit without any changes in our code or their query. They'll have to break it up into smaller paginated queries. "

I asked them about how GUI mode differs from Raw mode and they told me that " GUI mode does not have any memory limits. The reason is that in 'Raw' mode we are executing arbitrary user code and in GUI mode we are not. So in 'Raw' mode we use a code execution sandbox for security and that sandbox has hard memory limits."

Given this info, I would recommend if you want to run Raw queries that you use pagination. And if you want to avoid memory limit issues to continue to use the GUI mode.

Apologies for the inconvenience and hope this helps!

Good to know! Thanks, @Jack_T

1 Like