You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Node v10.15.0 64-bit] Calling Jsonix.Context([...]) results in "Uncaught RangeError: Maximum call stack size exceeded" #221
I am attempting to create a node.js client for a vendor's API.
I used the Jsonix Schema Compiler to generate the JavaScript file for creditcard_loan, and I can run that just fine in my unit tests.
When I run my unit tests for personal_loan though I get
RangeError: Maximum call stack size exceeded
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2232:20)
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2236:25)
...
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2236:25)
at Class.buildTypeInfos (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:3993:13)
at Class.processModules (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:5921:13)
at Class.initialize (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:5889:10)
at new Class (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:44:19)
I found issue #114 and tried to follow the guidance of using a bindings file, but didn't get any where.
From what seemed to be the root cause of issue #114 I looked through the generated JavaScript for personal_loan and found that the DECLARATIONS under PERSONALBASEAPPLICANT may be the issue. So I tried commenting out the DECLARATIONS element from the personal_loan.xsd, regenerated the JavaScript, and my unit tests started passing. When I compared this DECLARATIONS to the creaditcard_loan I found that the creditcard_loan appears to have the same structure as personal_loan, so I am struggling to why the creditcard_loan works, but the personal_loan does not.
Is there anything here that you can help with? Or any more information you might need to be able to help?
Also, I found that it seems to be specific to the SPOUSE of the APPLICANT on the personal_loan.
If I comment out the DECLARATIONS element under PERSONALBASEAPPLICANT or the SPOUSE element (which is a PERSONALBASEAPPLICANT) under APPLICANT I can get my unit tests to pass for personal_loan
Activity
jabez007 commentedon Jun 19, 2019
Also, I found that it seems to be specific to the
SPOUSEof theAPPLICANTon the personal_loan.If I comment out the
DECLARATIONSelement underPERSONALBASEAPPLICANTor theSPOUSEelement (which is aPERSONALBASEAPPLICANT) underAPPLICANTI can get my unit tests to pass for personal_loanjabez007 commentedon Jun 19, 2019
Some how, adding this complexType to the original personal_loan XSD (and changing absolutely nothing else) allows my unit tests to pass
and the XML document deserializes correctly as far as I can tell.
highsource commentedon Jun 21, 2019
Please send me a PR with a reproducing test project here:
https://github.com/highsource/jsonix-support/tree/master/l/lpq
Ideally you'd provide a generating script and some kind of a test case. Here's an exemplary test project:
https://github.com/highsource/jsonix-support/tree/master/r/reqif
Then I will look into it.
Apparently there's some kind of an infinite cycle, but I can't tell what's causing it exactly.