nodejs-connect-rest-sample
nodejs-connect-rest-sample copied to clipboard
500 Internal Server Error
I tried the sample on my Windows 10 Pro(ver1803 build 17134.345) PC, but it does not work well. I started the node sample as described in the tutorial.
>pwd
C:\Users\hogehoge\Desktop\code\nodejs-connect-rest-sample-master\starter-project
>node --version
v8.9.4
>npm start
> [email protected] start C:\Users\hogehoge\Desktop\code\nodejs-connect-rest-sample-master\starter-project
> mocha ./tests/confTest.js && node ./bin/www
ADAL
√ Checking clientID and clientSecret in config.js
1 passing (5ms)
{"name":"AzureAD: OIDC Passport Strategy","hostname":"hoge123","pid":16716,"level":40,"msg":"Production environments should always validate the issuer.","time":"2018-10-27T14:59:19.256Z","v":0}
{"name":"AzureAD: OIDC Passport Strategy","hostname":"hoge123","pid":16716,"level":40,"msg":"Using http for redirectUrl is not recommended, please consider using https","time":"2018-10-27T14:59:19.258Z","v":0}
Listening on port 3000
I executed the SendMail button at http: // localhost: 3000 but Internal Server Error is displayed.

500 Internal Server Error
{
"error": {
"code": "InternalServerError",
"message": "Unexpected end when reading token. Path 'Attachments[0]'.",
"innerError": {
"request-id": "b16c1817-72bc-4561-af57-8e466b335f27",
"date": "2018-10-27T15:34:29"
}
}
}
Error: Internal Server Error
at Request.callback (C:\Users\hogehoge\Desktop\code\nodejs-connect-rest-sample-master\starter-project\node_modules\superagent\lib\node\index.js:706:15)
at parser (C:\Users\hogehoge\Desktop\code\nodejs-connect-rest-sample-master\starter-project\node_modules\superagent\lib\node\index.js:916:18)
at IncomingMessage.res.on (C:\Users\hogehoge\Desktop\code\nodejs-connect-rest-sample-master\starter-project\node_modules\superagent\lib\node\parsers\json.js:19:7)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1055:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Am I something wrong?
@taketakekaho we are archiving this sample as it is no longer being maintained. We're replacing it with a new sample which you can find here: https://github.com/microsoftgraph/msgraph-training-nodeexpressapp