sendMail Function seem not working
I can login through the first step here it is
Hi, PATHOMPONG CHAISRI (GABLE-NBP-EM)!
You're now connected to Microsoft Graph. Click the button below to send a message from your account using the Microsoft Graph API.
but when I try to send an email it's say
This page isn’t working
localhost didn’t send any data.
here is my log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/st4rboy/Desktop/Intern/nodejs-connect-rest-sample-master/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle [email protected]~start: CWD: /Users/st4rboy/Desktop/Intern/nodejs-connect-rest-sample-master
11 silly lifecycle [email protected]~start: Args: [ '-c', 'mocha ./tests/confTest.js && node ./bin/www' ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: mocha ./tests/confTest.js && node ./bin/www
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.mocha ./tests/confTest.js && node ./bin/www
22 error Exit status 1
23 error Failed at the [email protected] start script 'mocha ./tests/confTest.js && node ./bin/www'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the nodejs-microsoft-graph-connect package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error mocha ./tests/confTest.js && node ./bin/www
23 error You can get information on how to open an issue for this project with:
23 error npm bugs nodejs-microsoft-graph-connect
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls nodejs-microsoft-graph-connect
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Thanks for reporting this. Does your account have a profile photo? If not, then this is another instance of a known issue.
My account have a profile picture @jamescro
Are you using a consumer (hotmail or live.com) account?
@jamescro It seems many people are having similar issue. We all tried consumer account w/ profile picture. Here is my log with some information redacted for privacy:
[email protected] start /home/jack/nodejs-connect-rest-sample-master mocha ./tests/confTest.js && node ./bin/www
ADAL ✓ Checking clientID and clientSecret in config.js
1 passing (9ms)
{"name":"AzureAD: OIDC Passport Strategy","hostname":"XXXX","pid":11643,"level":40,"msg":"Production environments should always validate the issuer.","time":"2017-06-23T14:47:13.196Z","v":0} {"name":"AzureAD: OIDC Passport Strategy","hostname":"XXXX","pid":11643,"level":40,"msg":"Using http for redirectUrl is not recommended, please consider using https","time":"2017-06-23T14:47:13.204Z","v":0}
Listening on port 3000 GET /sendMail 404 14.663 ms - 1349 Error: Not Found at /home/jack/nodejs-connect-rest-sample-master/app.js:80:15 at Layer.handle [as handle_request] (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:317:13) at /home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:335:12) at next (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:275:10) at /home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:635:15 at next (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:260:14) at Function.handle (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:174:3) at router (/home/jack/nodejs-connect-rest-sample-master/node_modules/express/lib/router/index.js:47:12) GET / 304 115.812 ms - - GET /stylesheets/style.css 304 7.309 ms - - GET /login 302 541.363 ms - 0 GET /token?code=Mf7092cf2-1467-0785-e000-3fc410d8b68f&state=D6THcPDiaRB44e4gbP1Be8O6AyTbUgyF 200 1385.728 ms - 2007 GET /stylesheets/style.css 304 4.681 ms - - /home/jack/nodejs-connect-rest-sample-master/routes/index.js:139 res.render('error', { ^
TypeError: Cannot read property 'render' of undefined
at renderError (/home/jack/nodejs-connect-rest-sample-master/routes/index.js:139:6)
at graphHelper.getProfilePhoto (/home/jack/nodejs-connect-rest-sample-master/routes/index.js:73:19)
at request.get.set.end (/home/jack/nodejs-connect-rest-sample-master/utils/graphHelper.js:35:6)
at Request.callback (/home/jack/nodejs-connect-rest-sample-master/node_modules/superagent/lib/node/index.js:688:3)
at /home/jack/nodejs-connect-rest-sample-master/node_modules/superagent/lib/node/index.js:883:18
at IncomingMessage.mocha ./tests/confTest.js && node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
We just checked in a number of changes, including one that should make consumer account profile pictures accessible. Could you try again with the latest version of the repo?
This should be working with recent changes. Closing.
Encountered this issue again with the latest changes.