node-ews: CreateItem & UpdateItem Firing "Max call stack size exceeded"
First off - great module! I was able to tweak it to get a lot of functions working with EWS correctly (including FindItem
, GetItem
, Subscribe
, GetEvents
, ResolveNames
, and also Impersonation
). It only took some minor tweaks to the code, but for the most part the xml2js & node-soap/wsdl.js handle the functions perfectly. That is until CreateItem (or UpdateItem). For some reason the following error fires:
if (Array.isArray(parameterTypeObj.$lookupTypes) && parameterTypeObj.$lookupTypes.length) { ^
RangeError: Maximum call stack size exceeded at Function.isArray (native) at WSDL.findChildSchemaObject (/…/server/node-ews-rv/node-soap/lib/wsdl.js:1822:12) at WSDL.findChildSchemaObject (/…/server/node-ews-rv/node-soap/lib/wsdl.js:1862:20)
I can’t for the life of me figure out what about these functions causes the error. I know the call stack exceeding has to do with (most likely) recursive functions, and .findChildSchemaObject does fire within itself in WSDL.js, but this has no effect on any other EWS operations but CreateItem & UpdateItem.
Any thoughts?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- Merge pull request #1 from MatejMalicek/snyk-fix-fde2fd57457c434f6bae00e82033e529 [Snyk] Fix for 4 vulnerable dependencies — committed to nmarus/node-ews by deleted user 5 years ago
- Merge pull request #1 from alonrks/ws-cve-mitigation Bump httpntlm from 1.7.3 to 1.7.7 — committed to nmarus/node-ews by alonrks 2 years ago
FYI: I just fixed this issue. I did so by using node-soap’s
$xml
to manually set all the “children” ofCreateItem
with a string. Obviously it’d be better if we could just use the JSON args object, but for some reason the children throw that Max call error.