-
Notifications
You must be signed in to change notification settings - Fork 40
Description
wen trying to sign in to my share point site it is throwing following error
if (js['S:Body']['S:Fault']) {
^
TypeError: Cannot read property 'S:Fault' of undefined
at E:\My Examples\nodetestsamples\samplechat2\node_modules\sharepoint\sharep
oint.js:114:33
at Parser. (E:\My Examples\nodetestsamples\samplechat2\node_modul
es\sharepoint\sharepoint.js:27:21)
at Parser.EventEmitter.emit (events.js:95:17)
at Object.saxParser.onclosetag (E:\My Examples\nodetestsamples\samplechat2\n
ode_modules\sharepoint\node_modules\xml2js\lib\xml2js.js:225:24)
at emit (E:\My Examples\nodetestsamples\samplechat2\node_modules\sharepoint
node_modules\xml2js\node_modules\sax\lib\sax.js:589:33)
at emitNode (E:\My Examples\nodetestsamples\samplechat2\node_modules\sharepo
int\node_modules\xml2js\node_modules\sax\lib\sax.js:594:3)
at closeTag (E:\My Examples\nodetestsamples\samplechat2\node_modules\sharepo
int\node_modules\xml2js\node_modules\sax\lib\sax.js:834:5)
at Object.write (E:\My Examples\nodetestsamples\samplechat2\node_modules\sha
repoint\node_modules\xml2js\node_modules\sax\lib\sax.js:1253:29)
at Parser.exports.Parser.Parser.parseString (E:\My Examples\nodetestsamples
samplechat2\node_modules\sharepoint\node_modules\xml2js\lib\xml2js.js:264:29)
at Parser.parseString (E:\My Examples\nodetestsamples\samplechat2\node_modul
es\sharepoint\node_modules\xml2js\lib\xml2js.js:77:45)
I am using the following code to login
var SP = require('sharepoint'),
site = 'http://vsp113:11291/sites/ChatroomSite',
username = 'domainname\username',
password = 'password',
spclient = new SP.RestService(site);
spclient.signin(username, password, function (err,data) {
// At this point, authentication is complete,
// so we can do requests.
if(err)
{
console.log('error occourec : '+err);
}
console.log('sharepoint login completed sucessfull');
});
it is not even entering the if (err) block