Skip to content
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

Possible 'undefined' error of 'ExchangeServices' on ews.js 'run' function #107

Open
jeffreyleeon opened this issue Jan 15, 2019 · 3 comments

Comments

@jeffreyleeon
Copy link

I am using version 3.2.4.
I have setup a valid email account and successfully authenticated.
When calling ".run" function from ews.js, the returned client's ExchangeServices is undefined, causing the chaining of "client.describe().ExchangeServices.ExchangeServicePort" failing.

Did I wrongly setup the environment? Or the account needs to subscribe on some ExchangeServices before getting a valid "ExchangeServices" object? Thank you.

2019-01-15T01:15:17.584611084Z /usr/src/app/node_modules/node-ews/lib/ews.js:227
2019-01-15T01:15:17.584704844Z           let validEwsFunctions = _.keys(client.describe().ExchangeServices.ExchangeServicePort);
2019-01-15T01:15:17.584720800Z                                                                            ^
2019-01-15T01:15:17.584733194Z
2019-01-15T01:15:17.584744904Z TypeError: Cannot read property 'ExchangeServicePort' of undefined
2019-01-15T01:20:02.094181310Z     at soap.createClient (/usr/src/app/node_modules/node-ews/lib/ews.js:227:76)
2019-01-15T01:20:02.094194368Z     at /usr/src/app/node_modules/soap/lib/soap.js:59:5
2019-01-15T01:20:02.094305407Z     at WSDL.callback (/usr/src/app/node_modules/soap/lib/soap.js:26:9)
2019-01-15T01:20:02.094323245Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1073:12
2019-01-15T01:20:02.094335460Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1187:7
2019-01-15T01:20:02.094347390Z     at WSDL._processNextInclude (/usr/src/app/node_modules/soap/lib/wsdl.js:1158:12)
2019-01-15T01:20:02.094359511Z     at WSDL.callback (/usr/src/app/node_modules/soap/lib/wsdl.js:1186:10)
2019-01-15T01:20:02.094370698Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1073:12
2019-01-15T01:20:02.094381991Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1187:7
2019-01-15T01:20:02.094403831Z     at WSDL._processNextInclude (/usr/src/app/node_modules/soap/lib/wsdl.js:1158:12)
2019-01-15T01:20:02.094415685Z     at WSDL.callback (/usr/src/app/node_modules/soap/lib/wsdl.js:1186:10)
2019-01-15T01:20:02.094426768Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1073:12
2019-01-15T01:20:02.094438215Z     at WSDL._processNextInclude (/usr/src/app/node_modules/soap/lib/wsdl.js:1158:12)
2019-01-15T01:20:02.094449418Z     at WSDL.processIncludes (/usr/src/app/node_modules/soap/lib/wsdl.js:1201:8)
2019-01-15T01:20:02.094463167Z     at /usr/src/app/node_modules/soap/lib/wsdl.js:1028:10
2019-01-15T01:20:02.094474491Z     at process._tickCallback (internal/process/next_tick.js:176:11)
@jeffreyleeon
Copy link
Author

jeffreyleeon commented Jan 15, 2019

I am using the config "temp" to always clone messages.xsd, services.wsdl and types.xsd to '/tmp' folder.

var ewsConfig = {
      username: username,
      password: password,
      host: url,
      temp: '/tmp'
};

And I noticed that from time to time services.wsdl file will be regenerated, causing "ExchangeServices" to be undefined.

@SDETQATestAutomation
Copy link

I am also getting similar issue from few days.

TypeError: Cannot read property 'ExchangeServicePort' of undefined
Any workaround to fix this issue?

@apitts
Copy link

apitts commented Sep 29, 2021

We are also experiencing this issue while using the temp folder config setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants