-
Notifications
You must be signed in to change notification settings - Fork 2.3k
"Maximum call stack size exceeded" when OneOf has many options #3829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@scooby359 since the |
I am also facing the same issue, I have a dropdown list containing 559 options. Whenever I set the options to be 545 it works fine with the validator. Adding an extra option in the array results in Maximum call stack size exceeded. I tried in the playground of rjsf and when the validate option is enabled it results in the same issue. |
I had same issue with default validator and was able to reproduce it in playground as well. To reproduce just create any select field with 500+elements in anyOf |
Ran into the same issue recently. Did anyone find a workaround? |
I can work around it by using |
We deprecated We're still waiting for a playground reproduction or CodeSandbox so someone can investigate if this is an issue in RJSF or Ajv. If certain workarounds are working for some and not others, it's possible we have multiple different bugs in this issue. |
Hey, can I bump this issue. It appears to be thrown in my case from the get names() method function in the class. As the others have said, reducing the options stops the call stack error from being called |
Ran into the same issue today. Weirdly, I can't reproduce it in the playground.
|
@nickgros Could you please help using
|
Hi everyone, we have the same issue getting this "Maximum call stack size exceeded" error after changing enum/enumNames to oneOf. |
@Mr-Goldberg You can follow the uiSchema convention by putting |
@nickgros Thank you! Somehow, I didn't realize that usage pattern 😅 |
Prerequisites
What theme are you using?
core
Version
5.1.0
Current Behavior
I'm passing in a JSF with a large number of "OneOf" options - specifically two fields, one with 178 options, the other field with 260 options.
The form renders and behaves as expected when running the site locally.
When deployed to a production environment, it fails to work as expected. The form is rendered and the dropdowns functional, but validation for the whole form fails to occur. No error is logged to the console, but by logging the "onChange" event, I can see the message "Maximum call stack size exceeded" in multiple locations. As validation does not occur, the submit button does not become enabled.
Input Schema:
Output of the change event errors:
Expected Behavior
Expect the form with validation work as expected in a production environment.
Steps To Reproduce
Environment
Anything else?
The text was updated successfully, but these errors were encountered: