New Cascader-Component leading to page-crash without response

Hi, we came to a pretty annoying bug, using the new Cascader-Component.
If using the parent-attribute on a datasource, where the parent-relation will lead to some circle, the complete retool-page will crash without any possibility to debug this.
Just found the solution by deleting every component, until the crash was not present anymore, which took about 2 days.

It would be pretty neat, if the parent-relationship would be checked for circular parenting and will just abort further rendering and throwing an error, instead of crashing with an endless loop.

Hey @flaschenpost-wha, thanks for reporting this! To help me debug further, are you using Retool Cloud or a self-hosted instance? If self-hosted, could you let me know what version you’re running?

1 Like

Hi @ChiEn, of course! Should have known beforehand to provide this info...
We are Self-Hosting with version 3.196.6

And a *.json with an example
cascader_crash.json (14.7 KB)

Hi @flaschenpost-wha,

I checked your module JSON, and you’re right—the cascader crashes. But this isn’t a Retool bug or an issue on Retool’s side. The crash happens because the cascader data isn’t structured correctly. The JSON itself is invalid for the component.

I tested by recreating the same module with the same component, and it also crashed. After reviewing, I realized the problem is with the data setup:

Note : I also confirmed this same behavior happens in Retool Cloud, so it’s not environment-specific.


  • Item 1 has parent = 2
  • Item 2 has parent = 1

That loop (1 → 2 → 1) causes Retool to render endlessly and crash.

A few things to note:

  • Circular references → any loop will break the Cascader.
  • Number vs. string mismatch → Cascader works best when value and parent are strings.

Here’s a working example with a proper hierarchy:

[
  { label: "Option 1", value: "1", parent: null },
  { label: "Option 1.1", value: "1.1", parent: "1" },
  { label: "Option 1.2", value: "1.2", parent: "1" },
  { label: "Option 2", value: "2", parent: null },
  { label: "Option 2.1", value: "2.1", parent: "2" },
  { label: "Option 2.2", value: "2.2", parent: "2" }
]

This avoids loops and renders cleanly:

Item 1
 └── Item 1.1 / Item 1.2
Item 2
 └── Item 2.1 / Item 2.2

By avoiding cycles and keeping parent/child values consistent, your cascader should work without any crashes.

Here is json with an example :
cascader_crash(1).json (15.7 KB)

2 Likes

Hi @WidleStudioLLP , you are totally correct and we are aware of the cause, as described in the original post.
Nether the less, the way Retool handles the rendering in this case can not be called correct behaviour and the infinite loop should be aborted by Retool, after rendering the same item in the cascader a second time.

The example i provided, plus your example are both idealized.
Our real-world input came from an API, which is out of our scope and would not prevent circular-reference. This leading to a total crash should be fixed soon.

An Application crashing, just by giving a wrong input, is not properly thought out at this point.

So still i think: Its a Bug on Retool's side not aborting the infinite-loop.

1 Like

@WidleStudioLLP Just think about another example, aside from this topic: SQL-Injection.
Knowing your Application is vulnerable to some specific sort of input would make you filtering/detecting this input, instead of telling the people to just not input this specific case.
Intentions can be malicious, knowing of such a bug, or failing input just can not be totally ruled out, because of missing scope for the input-source.

Hey @flaschenpost-wha, thanks so much for providing the feedback and the JSON export, I really appreciate it! I did some research internally and it looks like this could be a regression from a previous fix. I’ve filed a report and will keep you updated as soon as I hear anything back :pray:

Hi @ChiEn , will there be a fix in the near future?

Hey @flaschenpost-wha, thanks for checking in. I’m waiting to hear back from the engineering team and will share an update as soon as I have one! :pray:t3: