wsdl-to-ts icon indicating copy to clipboard operation
wsdl-to-ts copied to clipboard

"RangeError: Maximum call stack size exceeded" when trying with larger files

Open jovanmilenoski opened this issue 8 years ago • 13 comments

Hi. Is this really made to work with smaller wsdl files, or I am doing something wrong?

Stack trace below.

RangeError: Maximum call stack size exceeded at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:26:32) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24) at wsdlTypeToInterfaceObj (/usr/lib/node_modules/wsdl-to-ts/lib/wsdl-to-ts.js:61:24)

jovanmilenoski avatar Aug 29 '17 07:08 jovanmilenoski

Hmm, did not think this would be a problem. Thanks for noticing. Do you know if the interface has a recursive definition and that is what is causing this? (E.g. A -> B -> C -> D -> B.)

Is the WSDL you are executing against public? If so are you able to add a comment with a link?

TimLuq avatar Aug 29 '17 10:08 TimLuq

Unfortunately, I can not share that publicly. Can I send you by email or something?

jovanmilenoski avatar Aug 29 '17 11:08 jovanmilenoski

My guess is that there is an infinite recursion going on. In that case this project will need a rewrite which will be released as v1.0.

If that is not the case you may try to extend the available size of the stack by running something like: node --stack_size=1200 "$(which wsdl-to-ts)"

TimLuq avatar Aug 29 '17 14:08 TimLuq

Setting --stack_size=1200 made the error go away, but no files were generated.

MarkRobertJohnson avatar Oct 09 '17 23:10 MarkRobertJohnson

Here is the WSDL I am trying to convert:

salesforcemetadata.zip

MarkRobertJohnson avatar Oct 09 '17 23:10 MarkRobertJohnson

@MarkRobertJohnson lol... came here for the same error. I'm trying to do the salesforce partner WSDL.

Did you ever figure out something that worked?

ChuckJonas avatar Dec 02 '17 01:12 ChuckJonas

@ChuckJonas No, I threw in the towel and ended up using JSForce.

MarkRobertJohnson avatar Dec 02 '17 04:12 MarkRobertJohnson

@TimLuq I'm getting the stack error on this WSDL: https://srv6.demo-attendant.advam.com/makeBooking/webservice/booking.wsdl

Pretty sure it is a case of recursive types unfortunately.

aranda-adapptor avatar Dec 13 '17 02:12 aranda-adapptor

I'm going to spend some time on v1 during next week. I can't promise anything, but v1 may be released as a late holiday gift.

TimLuq avatar Dec 13 '17 07:12 TimLuq

I found out there was a problem with attributes not being exposed from node soap so the generated types were missing part of their 'fields' (unrelated to this issue but maybe an interesting to know before investing on it)

sledorze avatar Dec 13 '17 07:12 sledorze

I had 3 weeks off work, which I actually ended up working 80 hours of. I began some stuff on v1 which I pushed to the v1 branch. It's under way, but a lot left to do.

TimLuq avatar Jan 15 '18 16:01 TimLuq

awesome module! However, I also hit the recursive definition issue. @TimLuq, is it still something you're working on?

mvayngrib avatar Feb 04 '18 16:02 mvayngrib

No progress during the last 20 days, but it's in the back of my mind. I will continue when I have the time.

If anyone wants to clone the v1 branch do something minor or major, I'll accept PR's as well.

TimLuq avatar Feb 04 '18 17:02 TimLuq