Skip to content

cant sign in to site #7

@pmaheshgupta

Description

@pmaheshgupta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions