nodejs-connect-rest-sample icon indicating copy to clipboard operation
nodejs-connect-rest-sample copied to clipboard

Getting the following exception?

Open briviere opened this issue 10 years ago • 11 comments

Not Found

Error: Not Found at IncomingMessage. (/home/brian/nodejs-connect-rest-sample-master/requestUtil.js:79:17) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:934:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

briviere avatar Nov 13 '16 16:11 briviere

Hi @briviere . Thanks for reporting this issue. Can you please either put a breakpoint on line 91 in requestUtil.js and see what the error.innerError.message is, or add this line to error.hbs?

<pre>{{error.innerError.message}}</pre>

DianeD avatar Nov 15 '16 14:11 DianeD

Hello @DianeD

Here is the error I'm getting:

{ Error: Not Found at IncomingMessage. (/home/brian/nodejs-connect-rest-sample-master/requestUtil.js:79:17) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:934:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) code: 404, message: 'Not Found', innerError: { code: 'UnknownError', message: '', innerError: { 'request-id': 'c84bf68b-90a2-44be-ad0a-4d2872138002', date: '2016-11-16T01:54:42' } } }

briviere avatar Nov 16 '16 01:11 briviere

Thanks @briviere . I'm checking to see if I can learn more on this end using the request-id, but I may need to ask you for the whole response body and headers.

DianeD avatar Nov 16 '16 21:11 DianeD

[email protected] start /home/brian/nodejs-connect-rest-sample-master mocha ./tests/confTest.js && node ./bin/www

ADAL

✓ Checking clientID and clientSecret in authHelper.js

1 passing (13ms)

GET / 200 627.805 ms - 1623 GET /stylesheets/style.css 304 11.989 ms - - IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: false, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: false, decoder: null, encoding: null }, readable: false, domain: null, _events: { end: [ [Function: responseOnEnd], [Function] ], data: [Function] }, _eventsCount: 2, _maxListeners: undefined, socket: TLSSocket { _tlsOptions: { pipe: null, secureContext: [Object], isServer: false, requestCert: true, rejectUnauthorized: true, session: <Buffer 30 82 07 32 02 01 01 02 02 03 03 04 02 c0 28 04 20 e2 26 00 00 3e b2 5f 99 ce 68 2c 76 68 2c db 52 e2 01 ce 32 22 df de 4e d3 10 ad f5 41 3b df 02 04 ... >, NPNProtocols: undefined, ALPNProtocols: undefined, requestOCSP: undefined }, _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: { close: [Object], end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], secure: [Function], free: [Function: onFree], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener] }, _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'graph.microsoft.com', _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, domain: null, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, needDrain: false, ending: true, ended: true, finished: true, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: true, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 3546, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: ClientRequest { domain: null, _events: [Object], _eventsCount: 2, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedHeader: [Object], _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1.0/me/microsoft.graph.sendMail HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer EwAgA8l6BAAU1sPaz/0rP7ovs9bCsPzXhoCjrNEAASE7zgBHbGI2KWY+PTf0YACbw7bdYyJl9VfxbxCud9qzphf0g0seVk6ts9WqPlzd5EA269oRKj0ZH2k4No9gAsZvdwtAI2NAgHzvsRWf1rN4q5ydAsC9Fq8SOQkXJE57ZMRsknLba8q2/Rfq7JPuDl+s6zggdRDy+yqCvWpMKUym6DPlcEfSP7ctHm1XxcnDAyxgf5CGSfuVkH1/UYWFLspKBLMNtqSbu6LDUC5wir5BsHTO/vUwQiy4z5mB4CbeQDlQy9l4mfJ3XQPHB2uhjIMoTQ9UwH5L5OTKkQ9GiiLqnjR7mSlTamOgxjChKBFG61uhu03AgGtezzFV0jI/g2EDZgAACFSVaLhtW0h08AHTHnhH5bjRDEO2iwpZbr+s5GQu11gagluKrnwVDJeHVcMEQ0piPoxsN1fhul9JA4omXcU03J/HN6NfdObj6ssmLJbaVrRwoUPEpcpm5FHWs1Rx/PvIdcm/tuOPIo9WIPPr9hz06rcnsxy7fC1vmizmewXV4sPtOELZdoSsfMlxA4F2ubWZIkzRlmALe1RoQfv6M6jY8mTL/2dM9Kid7x0KslHAAKIWHcpYfLNlu9IdV80gCnEla4YSyQKc0Ad0McD3sLiWf0owz/XaYkGzy+Mn7wKNgao0uOTqLtlqblyQ6hYv0jPnCj++w4Klj/WMBvLQGPdKbenXWvJ/fdk1rcd5/4CtfPascDVb540m1kfPmZ5EzyAqGf7YCIED0QoS57Hw2hq06LELddWT0KkCkaQc+5R8bA5DJ5ZIqAYIzyxpqT29kFsw/VRUK7T4ihnsNFlv/smuor+KVyLpW+932zjtd1T33U4iDQbn0xZcgdiVCZaGB25Nb4KJXKPTNZ0+71EOA8tbn6U4sZiMX8IgysvPYD9gOr3qq2UpdxpkHRc89gtxwb8V9raNSjWz74kdAdqAuRaman3Mz7veK3DFPn4sEGg2qUbavb7yzKHvajRtF3UZGTxrkJ6bpq9dQcO9xNmT0cBrX29VOZH5oI5BnH4aGwI=\r\nContent-Length: 2303\r\nHost: graph.microsoft.com\r\nConnection: close\r\n\r\n', _headers: [Object], _headerNames: [Object], _onPendingData: null, agent: [Object], socketPath: undefined, method: 'POST', path: '/v1.0/me/microsoft.graph.sendMail', _ended: true, parser: null, res: [Circular] }, read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, connection: TLSSocket { _tlsOptions: { pipe: null, secureContext: [Object], isServer: false, requestCert: true, rejectUnauthorized: true, session: <Buffer 30 82 07 32 02 01 01 02 02 03 03 04 02 c0 28 04 20 e2 26 00 00 3e b2 5f 99 ce 68 2c 76 68 2c db 52 e2 01 ce 32 22 df de 4e d3 10 ad f5 41 3b df 02 04 ... >, NPNProtocols: undefined, ALPNProtocols: undefined, requestOCSP: undefined }, _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: { close: [Object], end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], secure: [Function], free: [Function: onFree], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener] }, _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'graph.microsoft.com', _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, domain: null, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, needDrain: false, ending: true, ended: true, finished: true, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: true, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 3546, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: ClientRequest { domain: null, _events: [Object], _eventsCount: 2, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedHeader: [Object], _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1.0/me/microsoft.graph.sendMail HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer EwAgA8l6BAAU1sPaz/0rP7ovs9bCsPzXhoCjrNEAASE7zgBHbGI2KWY+PTf0YACbw7bdYyJl9VfxbxCud9qzphf0g0seVk6ts9WqPlzd5EA269oRKj0ZH2k4No9gAsZvdwtAI2NAgHzvsRWf1rN4q5ydAsC9Fq8SOQkXJE57ZMRsknLba8q2/Rfq7JPuDl+s6zggdRDy+yqCvWpMKUym6DPlcEfSP7ctHm1XxcnDAyxgf5CGSfuVkH1/UYWFLspKBLMNtqSbu6LDUC5wir5BsHTO/vUwQiy4z5mB4CbeQDlQy9l4mfJ3XQPHB2uhjIMoTQ9UwH5L5OTKkQ9GiiLqnjR7mSlTamOgxjChKBFG61uhu03AgGtezzFV0jI/g2EDZgAACFSVaLhtW0h08AHTHnhH5bjRDEO2iwpZbr+s5GQu11gagluKrnwVDJeHVcMEQ0piPoxsN1fhul9JA4omXcU03J/HN6NfdObj6ssmLJbaVrRwoUPEpcpm5FHWs1Rx/PvIdcm/tuOPIo9WIPPr9hz06rcnsxy7fC1vmizmewXV4sPtOELZdoSsfMlxA4F2ubWZIkzRlmALe1RoQfv6M6jY8mTL/2dM9Kid7x0KslHAAKIWHcpYfLNlu9IdV80gCnEla4YSyQKc0Ad0McD3sLiWf0owz/XaYkGzy+Mn7wKNgao0uOTqLtlqblyQ6hYv0jPnCj++w4Klj/WMBvLQGPdKbenXWvJ/fdk1rcd5/4CtfPascDVb540m1kfPmZ5EzyAqGf7YCIED0QoS57Hw2hq06LELddWT0KkCkaQc+5R8bA5DJ5ZIqAYIzyxpqT29kFsw/VRUK7T4ihnsNFlv/smuor+KVyLpW+932zjtd1T33U4iDQbn0xZcgdiVCZaGB25Nb4KJXKPTNZ0+71EOA8tbn6U4sZiMX8IgysvPYD9gOr3qq2UpdxpkHRc89gtxwb8V9raNSjWz74kdAdqAuRaman3Mz7veK3DFPn4sEGg2qUbavb7yzKHvajRtF3UZGTxrkJ6bpq9dQcO9xNmT0cBrX29VOZH5oI5BnH4aGwI=\r\nContent-Length: 2303\r\nHost: graph.microsoft.com\r\nConnection: close\r\n\r\n', _headers: [Object], _headerNames: [Object], _onPendingData: null, agent: [Object], socketPath: undefined, method: 'POST', path: '/v1.0/me/microsoft.graph.sendMail', _ended: true, parser: null, res: [Circular] }, read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'cache-control': 'private', 'transfer-encoding': 'chunked', 'content-type': 'application/json', server: 'Microsoft-IIS/8.5', 'request-id': '0942b7e2-5ba0-40fe-b10b-b542d3026eb7', 'client-request-id': '0942b7e2-5ba0-40fe-b10b-b542d3026eb7', 'x-ms-ags-diagnostic': '{"ServerInfo":{"DataCenter":"North Central US","Slice":"SliceA","ScaleUnit":"003","Host":"AGSFE_IN_1","ADSiteName":"CHI"}}', duration: '279.9775', 'x-powered-by': 'ASP.NET', date: 'Thu, 17 Nov 2016 23:34:32 GMT', connection: 'close' }, rawHeaders: [ 'Cache-Control', 'private', 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json', 'Server', 'Microsoft-IIS/8.5', 'request-id', '0942b7e2-5ba0-40fe-b10b-b542d3026eb7', 'client-request-id', '0942b7e2-5ba0-40fe-b10b-b542d3026eb7', 'x-ms-ags-diagnostic', '{"ServerInfo":{"DataCenter":"North Central US","Slice":"SliceA","ScaleUnit":"003","Host":"AGSFE_IN_1","ADSiteName":"CHI"}}', 'Duration', '279.9775', 'X-Powered-By', 'ASP.NET', 'Date', 'Thu, 17 Nov 2016 23:34:32 GMT', 'Connection', 'close' ], trailers: {}, rawTrailers: [], upgrade: false, url: '', method: null, statusCode: 404, statusMessage: 'Not Found', client: TLSSocket { _tlsOptions: { pipe: null, secureContext: [Object], isServer: false, requestCert: true, rejectUnauthorized: true, session: <Buffer 30 82 07 32 02 01 01 02 02 03 03 04 02 c0 28 04 20 e2 26 00 00 3e b2 5f 99 ce 68 2c 76 68 2c db 52 e2 01 ce 32 22 df de 4e d3 10 ad f5 41 3b df 02 04 ... >, NPNProtocols: undefined, ALPNProtocols: undefined, requestOCSP: undefined }, _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: { close: [Object], end: [Object], finish: [Function: onSocketFinish], _socketEnd: [Function: onSocketEnd], secure: [Function], free: [Function: onFree], agentRemove: [Function: onRemove], drain: [Function: ondrain], error: [Function: socketErrorListener] }, _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'graph.microsoft.com', _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [], length: 0, pipes: null, pipesCount: 0, flowing: true, ended: false, endEmitted: false, reading: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, defaultEncoding: 'utf8', ranOut: false, awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, domain: null, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, needDrain: false, ending: true, ended: true, finished: true, decodeStrings: false, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function], writecb: null, writelen: 0, bufferedRequest: null, lastBufferedRequest: null, pendingcb: 0, prefinished: true, errorEmitted: false, bufferedRequestCount: 0, corkedRequestsFree: [Object] }, writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 3546, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: ClientRequest { domain: null, _events: [Object], _eventsCount: 2, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedHeader: [Object], _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Circular], connection: [Circular], _header: 'POST /v1.0/me/microsoft.graph.sendMail HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer EwAgA8l6BAAU1sPaz/0rP7ovs9bCsPzXhoCjrNEAASE7zgBHbGI2KWY+PTf0YACbw7bdYyJl9VfxbxCud9qzphf0g0seVk6ts9WqPlzd5EA269oRKj0ZH2k4No9gAsZvdwtAI2NAgHzvsRWf1rN4q5ydAsC9Fq8SOQkXJE57ZMRsknLba8q2/Rfq7JPuDl+s6zggdRDy+yqCvWpMKUym6DPlcEfSP7ctHm1XxcnDAyxgf5CGSfuVkH1/UYWFLspKBLMNtqSbu6LDUC5wir5BsHTO/vUwQiy4z5mB4CbeQDlQy9l4mfJ3XQPHB2uhjIMoTQ9UwH5L5OTKkQ9GiiLqnjR7mSlTamOgxjChKBFG61uhu03AgGtezzFV0jI/g2EDZgAACFSVaLhtW0h08AHTHnhH5bjRDEO2iwpZbr+s5GQu11gagluKrnwVDJeHVcMEQ0piPoxsN1fhul9JA4omXcU03J/HN6NfdObj6ssmLJbaVrRwoUPEpcpm5FHWs1Rx/PvIdcm/tuOPIo9WIPPr9hz06rcnsxy7fC1vmizmewXV4sPtOELZdoSsfMlxA4F2ubWZIkzRlmALe1RoQfv6M6jY8mTL/2dM9Kid7x0KslHAAKIWHcpYfLNlu9IdV80gCnEla4YSyQKc0Ad0McD3sLiWf0owz/XaYkGzy+Mn7wKNgao0uOTqLtlqblyQ6hYv0jPnCj++w4Klj/WMBvLQGPdKbenXWvJ/fdk1rcd5/4CtfPascDVb540m1kfPmZ5EzyAqGf7YCIED0QoS57Hw2hq06LELddWT0KkCkaQc+5R8bA5DJ5ZIqAYIzyxpqT29kFsw/VRUK7T4ihnsNFlv/smuor+KVyLpW+932zjtd1T33U4iDQbn0xZcgdiVCZaGB25Nb4KJXKPTNZ0+71EOA8tbn6U4sZiMX8IgysvPYD9gOr3qq2UpdxpkHRc89gtxwb8V9raNSjWz74kdAdqAuRaman3Mz7veK3DFPn4sEGg2qUbavb7yzKHvajRtF3UZGTxrkJ6bpq9dQcO9xNmT0cBrX29VOZH5oI5BnH4aGwI=\r\nContent-Length: 2303\r\nHost: graph.microsoft.com\r\nConnection: close\r\n\r\n', _headers: [Object], _headerNames: [Object], _onPendingData: null, agent: [Object], socketPath: undefined, method: 'POST', path: '/v1.0/me/microsoft.graph.sendMail', _ended: true, parser: null, res: [Circular] }, read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, _consuming: true, _dumped: false, req: ClientRequest { domain: null, _events: { error: [Function], prefinish: [Function: requestOnPrefinish] }, _eventsCount: 2, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: true, sendDate: false, _removedHeader: { 'content-length': false }, _contentLength: null, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'graph.microsoft.com', _readableState: [Object], readable: false, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 3546, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular], read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, connection: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, _SNICallback: null, servername: null, npnProtocol: undefined, alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object], _eventsCount: 9, connecting: false, _hadError: false, _handle: null, _parent: null, _host: 'graph.microsoft.com', _readableState: [Object], readable: false, domain: null, _maxListeners: undefined, _writableState: [Object], writable: false, allowHalfOpen: false, destroyed: true, _bytesDispatched: 3546, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular], read: [Function], _consuming: true, _idleNext: null, _idlePrev: null, _idleTimeout: -1 }, _header: 'POST /v1.0/me/microsoft.graph.sendMail HTTP/1.1\r\nContent-Type: application/json\r\nAuthorization: Bearer EwAgA8l6BAAU1sPaz/0rP7ovs9bCsPzXhoCjrNEAASE7zgBHbGI2KWY+PTf0YACbw7bdYyJl9VfxbxCud9qzphf0g0seVk6ts9WqPlzd5EA269oRKj0ZH2k4No9gAsZvdwtAI2NAgHzvsRWf1rN4q5ydAsC9Fq8SOQkXJE57ZMRsknLba8q2/Rfq7JPuDl+s6zggdRDy+yqCvWpMKUym6DPlcEfSP7ctHm1XxcnDAyxgf5CGSfuVkH1/UYWFLspKBLMNtqSbu6LDUC5wir5BsHTO/vUwQiy4z5mB4CbeQDlQy9l4mfJ3XQPHB2uhjIMoTQ9UwH5L5OTKkQ9GiiLqnjR7mSlTamOgxjChKBFG61uhu03AgGtezzFV0jI/g2EDZgAACFSVaLhtW0h08AHTHnhH5bjRDEO2iwpZbr+s5GQu11gagluKrnwVDJeHVcMEQ0piPoxsN1fhul9JA4omXcU03J/HN6NfdObj6ssmLJbaVrRwoUPEpcpm5FHWs1Rx/PvIdcm/tuOPIo9WIPPr9hz06rcnsxy7fC1vmizmewXV4sPtOELZdoSsfMlxA4F2ubWZIkzRlmALe1RoQfv6M6jY8mTL/2dM9Kid7x0KslHAAKIWHcpYfLNlu9IdV80gCnEla4YSyQKc0Ad0McD3sLiWf0owz/XaYkGzy+Mn7wKNgao0uOTqLtlqblyQ6hYv0jPnCj++w4Klj/WMBvLQGPdKbenXWvJ/fdk1rcd5/4CtfPascDVb540m1kfPmZ5EzyAqGf7YCIED0QoS57Hw2hq06LELddWT0KkCkaQc+5R8bA5DJ5ZIqAYIzyxpqT29kFsw/VRUK7T4ihnsNFlv/smuor+KVyLpW+932zjtd1T33U4iDQbn0xZcgdiVCZaGB25Nb4KJXKPTNZ0+71EOA8tbn6U4sZiMX8IgysvPYD9gOr3qq2UpdxpkHRc89gtxwb8V9raNSjWz74kdAdqAuRaman3Mz7veK3DFPn4sEGg2qUbavb7yzKHvajRtF3UZGTxrkJ6bpq9dQcO9xNmT0cBrX29VOZH5oI5BnH4aGwI=\r\nContent-Length: 2303\r\nHost: graph.microsoft.com\r\nConnection: close\r\n\r\n', _headers: { 'content-type': 'application/json', authorization: 'Bearer EwAgA8l6BAAU1sPaz/0rP7ovs9bCsPzXhoCjrNEAASE7zgBHbGI2KWY+PTf0YACbw7bdYyJl9VfxbxCud9qzphf0g0seVk6ts9WqPlzd5EA269oRKj0ZH2k4No9gAsZvdwtAI2NAgHzvsRWf1rN4q5ydAsC9Fq8SOQkXJE57ZMRsknLba8q2/Rfq7JPuDl+s6zggdRDy+yqCvWpMKUym6DPlcEfSP7ctHm1XxcnDAyxgf5CGSfuVkH1/UYWFLspKBLMNtqSbu6LDUC5wir5BsHTO/vUwQiy4z5mB4CbeQDlQy9l4mfJ3XQPHB2uhjIMoTQ9UwH5L5OTKkQ9GiiLqnjR7mSlTamOgxjChKBFG61uhu03AgGtezzFV0jI/g2EDZgAACFSVaLhtW0h08AHTHnhH5bjRDEO2iwpZbr+s5GQu11gagluKrnwVDJeHVcMEQ0piPoxsN1fhul9JA4omXcU03J/HN6NfdObj6ssmLJbaVrRwoUPEpcpm5FHWs1Rx/PvIdcm/tuOPIo9WIPPr9hz06rcnsxy7fC1vmizmewXV4sPtOELZdoSsfMlxA4F2ubWZIkzRlmALe1RoQfv6M6jY8mTL/2dM9Kid7x0KslHAAKIWHcpYfLNlu9IdV80gCnEla4YSyQKc0Ad0McD3sLiWf0owz/XaYkGzy+Mn7wKNgao0uOTqLtlqblyQ6hYv0jPnCj++w4Klj/WMBvLQGPdKbenXWvJ/fdk1rcd5/4CtfPascDVb540m1kfPmZ5EzyAqGf7YCIED0QoS57Hw2hq06LELddWT0KkCkaQc+5R8bA5DJ5ZIqAYIzyxpqT29kFsw/VRUK7T4ihnsNFlv/smuor+KVyLpW+932zjtd1T33U4iDQbn0xZcgdiVCZaGB25Nb4KJXKPTNZ0+71EOA8tbn6U4sZiMX8IgysvPYD9gOr3qq2UpdxpkHRc89gtxwb8V9raNSjWz74kdAdqAuRaman3Mz7veK3DFPn4sEGg2qUbavb7yzKHvajRtF3UZGTxrkJ6bpq9dQcO9xNmT0cBrX29VOZH5oI5BnH4aGwI=', 'content-length': 2303, host: 'graph.microsoft.com' }, _headerNames: { 'content-type': 'Content-Type', authorization: 'Authorization', 'content-length': 'Content-Length', host: 'Host' }, _onPendingData: null, agent: Agent { domain: null, _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 443, protocol: 'https:', options: [Object], requests: {}, sockets: [Object], freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256, maxCachedSessions: 100, _sessionCache: [Object] }, socketPath: undefined, method: 'POST', path: '/v1.0/me/microsoft.graph.sendMail', _ended: true, parser: null, res: [Circular] }, read: [Function] } { Error: Not Found at IncomingMessage. (/home/brian/nodejs-connect-rest-sample-master/requestUtil.js:79:17) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:934:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) code: 404, message: 'Not Found', innerError: { code: 'UnknownError', message: '', innerError: { 'request-id': '0942b7e2-5ba0-40fe-b10b-b542d3026eb7', date: '2016-11-17T23:34:33' } } } POST / 200 602.504 ms - 894 GET /stylesheets/style.css 304 5.071 ms - -

briviere avatar Nov 17 '16 23:11 briviere

Thanks @briviere ! One of our engineers is looking into this.

DianeD avatar Nov 18 '16 16:11 DianeD

@briviere , I'm afraid we didn't get any more information from the logs. Would you be able to sign into the Graph explorer with your account and see if the request works from there? If you get the same error, then can you please send the entire request body that's returned? Here's an abbreviated version of the sendMail REST request that you can use.

  1. Sign in with the account you used for the sample, and choose a POST request.
  2. Enter this endpoint: https://graph.microsoft.com/v1.0/me/sendMail (or https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail which this sample uses).
  3. Paste this into the Request Body section, and enter your email address for the Address attribute: {"Message":{"Subject":"Sent from the Microsoft Graph Connect sample","Body":{"ContentType":"HTML","Content":"<html><head>\r\n<meta http-equiv='Content-Type' content='text/html; charset=us-ascii'>\r\n<title></title>\r\n</head>\r\n<body style='font-family:calibri'>\r\n<h2>Congratulations!</h2>\r\n<p>This is a message from the Microsoft Graph Connect Sample. You are well on your way to incorporating Microsoft Graph endpoints in your apps.</p>\r\n<h3>What's next?</h3><ul>\r\n<li>Check out <a href='https://graph.microsoft.io'>graph.microsoft.io</a> to start building Microsoft Graph apps today with all the latest tools, templates, and guidance to get started quickly.</li>\r\n<li>Use the <a href='https://graph.microsoft.io/graph-explorer'>Graph explorer</a> to explore the rest of the APIs and start your testing.</li>\r\n<li>Browse other <a href='https://github.com/microsoftgraph/'>samples on GitHub</a> to see more of the APIs in action.</li>\r\n</ul>\r\n</body>\r\n</html>"},"ToRecipients":[{"EmailAddress":{"Address":"ENTER YOUR EMAIL HERE"}}]},"SaveToSentItems":true}

DianeD avatar Nov 28 '16 04:11 DianeD

@DianeD Here is the response from Graph Explorer:

Status Code: 404

{ "error": { "code": "UnknownError", "message": "", "innerError": { "request-id": "e21085ca-7e03-4ff4-a20d-ba7cc7d94156", "date": "2016-11-29T12:49:30" } } }

briviere avatar Nov 29 '16 12:11 briviere

After setting up outlook live the above query appears to be working now:

client-request-id: aabf4add-49e3-4483-ab97-9dfe15347eb4 content-type: text/plain cache-control: private request-id: aabf4add-49e3-4483-ab97-9dfe15347eb4 Status Code: 202

briviere avatar Nov 29 '16 13:11 briviere

Thanks @briviere . Does the query also work in the sample?

DianeD avatar Nov 29 '16 15:11 DianeD

@DianeD Yes it is working now. Since my outlook mail was not configured the 404 not found make sense to me now.

Thanks

briviere avatar Nov 30 '16 01:11 briviere

Great, thanks again!

DianeD avatar Nov 30 '16 01:11 DianeD