Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Converting circular structure to JSON with Alexa Lambda Integration #28

Closed
hyzhak opened this issue Nov 20, 2018 · 7 comments

Comments

@hyzhak
Copy link

hyzhak commented Nov 20, 2018

I have followed instruction here https://www.dashbot.io/docs/alexa/lambdav2/
but got an error:

TypeError: Converting circular structure to JSON
at JSON.stringify ()
at module.exports (/internet-archive-google-action/functions/node_modules/dashbot/src/make-request.js:13:16)
at internalLogIncoming (/internet-archive-google-action/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:23:12)
at DashBotBase.DashBotAmazonAlexa.that.logIncoming (/internet-archive-google-action/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:51:12)
at Object.setupAspectJoinpoint (/internet-archive-google-action/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:151:32)
at callAround (/internet-archive-google-action/functions/node_modules/meld/meld.js:242:20)
at callNext (/internet-archive-google-action/functions/node_modules/meld/meld.js:221:8)
at Advisor._callAroundAdvice (/internet-archive-google-action/functions/node_modules/meld/meld.js:290:11)
at Object.Advisor.advised.advised [as handler] (/internet-archive-google-action/functions/node_modules/meld/meld.js:130:33)
at LambdaServer.invoke (/internet-archive-google-action/functions/node_modules/bespoken-tools/lib/client/lambda-server.js:94:52)

So as you can see it comes from Alexa and I've found that LambdaContext has a lot of circular properties. I have used util.inspect(context, {depth: 5})).

@shotamakino
Copy link
Contributor

hi hyzhak, when instantiating dashbot with the dashbot API key, can you also include config options for printErrors and debug? For example:

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY, {printErrors: true, debug: true}).alexa;

and then send us the log output from the lambda function?

@hyzhak
Copy link
Author

hyzhak commented Jan 3, 2019

hi @shotamakino !
Sorry for delay! There was NY holiday and I haven't seen you message.
Here is longs with options which have mentioned:

Dashbot Incoming: https://tracker.dashbot.io/track?apiKey=GaYo....&type=incoming&platform=alexa&v=10.2.1-npm
TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at internalLogIncoming (/internet-archive-voice-apps/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:20:24)
    at DashBotBase.DashBotAmazonAlexa.that.logIncoming (/internet-archive-voice-apps/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:51:12)
    at Object.setupAspectJoinpoint (/internet-archive-voice-apps/functions/node_modules/dashbot/src/dashbot-amazon-alexa.js:151:32)
    at callAround (/internet-archive-voice-apps/functions/node_modules/meld/meld.js:242:20)
    at callNext (/internet-archive-voice-apps/functions/node_modules/meld/meld.js:221:8)
    at Advisor._callAroundAdvice (/internet-archive-voice-apps/functions/node_modules/meld/meld.js:290:11)
    at Object.Advisor.advised.advised [as handler] (/internet-archive-voice-apps/functions/node_modules/meld/meld.js:130:33)
    at LambdaServer.invoke (/internet-archive-voice-apps/functions/node_modules/bespoken-tools/lib/client/lambda-server.js:94:52)
    at IncomingMessage.<anonymous> (/internet-archive-voice-apps/functions/node_modules/bespoken-tools/lib/client/lambda-server.js:34:22)
(node:81557) UnhandledPromiseRejectionWarning: TypeError: callback is not a function
    at /internet-archive-voice-apps/functions/node_modules/ask-sdk-core/dist/skill/factory/BaseSkillFactory.js:104:25
    at process._tickCallback (internal/process/next_tick.js:68:7)

I hope it is helpful here

@hyzhak
Copy link
Author

hyzhak commented Jan 3, 2019

ok, I've got more useful longs after patch original dashbot source, by replacing

console.log(JSON.stringify(data, null, 2));

with:

console.log(util.inspect(data, { depth: null}))

so logs are:

Dashbot Incoming: https://tracker.dashbot.io/track?apiKey=Ga...&type=incoming&platform=alexa&v=10.2.1-npm
{ dashbot_timestamp: 1546519921256,
  event:
   { version: '1.0',
     session:
      { new: true,
        sessionId:
         'amzn1.echo-api.session.....',
        application:
         { applicationId: 'amzn1.ask.skill.....' },
        user:
         { userId:
            'amzn1.ask.account.....' } },
     context:
      { AudioPlayer: { playerActivity: 'IDLE' },
        System:
         { application:
            { applicationId: 'amzn1.ask.skill.....' },
           user:
            { userId:
               'amzn1.ask.account....' },
           device:
            { deviceId:
               'amzn1.ask.device....',
              supportedInterfaces: { AudioPlayer: {} } },
           apiEndpoint: 'https://api.amazonalexa.com',
           apiAccessToken:
            '...' },
        Viewport:
         { experiences:
            [ { arcMinuteWidth: 246,
                arcMinuteHeight: 144,
                canRotate: false,
                canResize: false } ],
           shape: 'RECTANGLE',
           pixelWidth: 1024,
           pixelHeight: 600,
           dpi: 160,
           currentPixelWidth: 1024,
           currentPixelHeight: 600,
           touch: [ 'SINGLE' ] } },
     request:
      { type: 'LaunchRequest',
        requestId:
         'amzn1.echo-api.request.559bcd8a-1846-4cbd-878d-004ec71af0d7',
        timestamp: '2019-01-03T12:52:00Z',
        locale: 'en-US',
        shouldLinkResultBeReturned: false } },
  context:
   LambdaContext {
     request:
      IncomingMessage {
        _readableState:
         ReadableState {
           objectMode: false,
           highWaterMark: 16384,
           buffer: BufferList { head: null, tail: null, length: 0 },
           length: 0,
           pipes: null,
           pipesCount: 0,
           flowing: true,
           ended: true,
           endEmitted: true,
           reading: false,
           sync: false,
           needReadable: false,
           emittedReadable: false,
           readableListening: false,
           resumeScheduled: false,
           emitClose: true,
           destroyed: false,
           defaultEncoding: 'utf8',
           awaitDrain: 0,
           readingMore: false,
           decoder: null,
           encoding: null },
        readable: false,
        _events: { data: [Function], end: [Function] },
        _eventsCount: 2,
        _maxListeners: undefined,
        socket:
         Socket {
           connecting: false,
           _hadError: false,
           _handle:
            TCP {
              reading: true,
              onread: [Function: onStreamRead],
              onconnection: null,
              _consumed: true,
              [Symbol(owner)]: [Circular] },
           _parent: null,
           _host: null,
           _readableState:
            ReadableState {
              objectMode: false,
              highWaterMark: 16384,
              buffer: BufferList { head: null, tail: null, length: 0 },
              length: 0,
              pipes: null,
              pipesCount: 0,
              flowing: true,
              ended: false,
              endEmitted: false,
              reading: true,
              sync: false,
              needReadable: true,
              emittedReadable: false,
              readableListening: false,
              resumeScheduled: false,
              emitClose: false,
              destroyed: false,
              defaultEncoding: 'utf8',
              awaitDrain: 0,
              readingMore: false,
              decoder: null,
              encoding: null },
           readable: true,
           _events:
            { end:
               [ [Function: onReadableStreamEnd],
                 [Function: bound socketOnEnd] ],
              drain: [ [Function: ondrain], [Function: bound socketOnDrain] ],
              timeout: [Function: socketOnTimeout],
              data: [Function: bound socketOnData],
              error: [Function: socketOnError],
              close:
               [ [Function: bound socketOnClose],
                 [Function: onServerResponseClose] ],
              resume: [Function: onSocketResume],
              pause: [Function: onSocketPause] },
           _eventsCount: 8,
           _maxListeners: undefined,
           _writableState:
            WritableState {
              objectMode: false,
              highWaterMark: 16384,
              finalCalled: false,
              needDrain: false,
              ending: false,
              ended: false,
              finished: false,
              destroyed: false,
              decodeStrings: false,
              defaultEncoding: 'utf8',
              length: 0,
              writing: false,
              corked: 0,
              sync: true,
              bufferProcessing: false,
              onwrite: [Function: bound onwrite],
              writecb: null,
              writelen: 0,
              bufferedRequest: null,
              lastBufferedRequest: null,
              pendingcb: 0,
              prefinished: false,
              errorEmitted: false,
              emitClose: false,
              bufferedRequestCount: 0,
              corkedRequestsFree:
               { next: null,
                 entry: null,
                 finish: [Function: bound onCorkedFinish] } },
           writable: true,
           allowHalfOpen: true,
           _sockname: null,
           _pendingData: null,
           _pendingEncoding: '',
           server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           _server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           timeout: 120000,
           parser:
            HTTPParser {
              '0': [Function: parserOnHeaders],
              '1': [Function: parserOnHeadersComplete],
              '2': [Function: parserOnBody],
              '3': [Function: parserOnMessageComplete],
              '4': [Function: bound onParserExecute],
              _headers: [],
              _url: '',
              _consumed: true,
              socket: [Circular],
              incoming: [Circular],
              outgoing: null,
              maxHeaderPairs: 2000,
              onIncoming: [Function: bound parserOnIncoming] },
           on: [Function: socketOnWrap],
           _paused: false,
           _httpMessage:
            ServerResponse {
              _events: { finish: [Function: bound resOnFinish] },
              _eventsCount: 1,
              _maxListeners: undefined,
              output: [],
              outputEncodings: [],
              outputCallbacks: [],
              outputSize: 0,
              writable: true,
              _last: false,
              chunkedEncoding: false,
              shouldKeepAlive: true,
              useChunkedEncodingByDefault: true,
              sendDate: true,
              _removedConnection: false,
              _removedContLen: false,
              _removedTE: false,
              _contentLength: null,
              _hasBody: true,
              _trailer: '',
              finished: false,
              _headerSent: false,
              socket: [Circular],
              connection: [Circular],
              _header: null,
              _onPendingData: [Function: bound updateOutgoingData],
              _sent100: false,
              _expect_continue: false,
              [Symbol(isCorked)]: false,
              [Symbol(outHeadersKey)]: null },
           [Symbol(asyncId)]: 56,
           [Symbol(lastWriteQueueSize)]: 0,
           [Symbol(timeout)]:
            Timeout {
              _called: false,
              _idleTimeout: 120000,
              _idlePrev: [TimersList],
              _idleNext: [TimersList],
              _idleStart: 11529,
              _onTimeout: [Function: bound ],
              _timerArgs: undefined,
              _repeat: null,
              _destroyed: false,
              [Symbol(unrefed)]: true,
              [Symbol(asyncId)]: 57,
              [Symbol(triggerId)]: 56 },
           [Symbol(kBytesRead)]: 0,
           [Symbol(kBytesWritten)]: 0 },
        connection:
         Socket {
           connecting: false,
           _hadError: false,
           _handle:
            TCP {
              reading: true,
              onread: [Function: onStreamRead],
              onconnection: null,
              _consumed: true,
              [Symbol(owner)]: [Circular] },
           _parent: null,
           _host: null,
           _readableState:
            ReadableState {
              objectMode: false,
              highWaterMark: 16384,
              buffer: BufferList { head: null, tail: null, length: 0 },
              length: 0,
              pipes: null,
              pipesCount: 0,
              flowing: true,
              ended: false,
              endEmitted: false,
              reading: true,
              sync: false,
              needReadable: true,
              emittedReadable: false,
              readableListening: false,
              resumeScheduled: false,
              emitClose: false,
              destroyed: false,
              defaultEncoding: 'utf8',
              awaitDrain: 0,
              readingMore: false,
              decoder: null,
              encoding: null },
           readable: true,
           _events:
            { end:
               [ [Function: onReadableStreamEnd],
                 [Function: bound socketOnEnd] ],
              drain: [ [Function: ondrain], [Function: bound socketOnDrain] ],
              timeout: [Function: socketOnTimeout],
              data: [Function: bound socketOnData],
              error: [Function: socketOnError],
              close:
               [ [Function: bound socketOnClose],
                 [Function: onServerResponseClose] ],
              resume: [Function: onSocketResume],
              pause: [Function: onSocketPause] },
           _eventsCount: 8,
           _maxListeners: undefined,
           _writableState:
            WritableState {
              objectMode: false,
              highWaterMark: 16384,
              finalCalled: false,
              needDrain: false,
              ending: false,
              ended: false,
              finished: false,
              destroyed: false,
              decodeStrings: false,
              defaultEncoding: 'utf8',
              length: 0,
              writing: false,
              corked: 0,
              sync: true,
              bufferProcessing: false,
              onwrite: [Function: bound onwrite],
              writecb: null,
              writelen: 0,
              bufferedRequest: null,
              lastBufferedRequest: null,
              pendingcb: 0,
              prefinished: false,
              errorEmitted: false,
              emitClose: false,
              bufferedRequestCount: 0,
              corkedRequestsFree:
               { next: null,
                 entry: null,
                 finish: [Function: bound onCorkedFinish] } },
           writable: true,
           allowHalfOpen: true,
           _sockname: null,
           _pendingData: null,
           _pendingEncoding: '',
           server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           _server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           timeout: 120000,
           parser:
            HTTPParser {
              '0': [Function: parserOnHeaders],
              '1': [Function: parserOnHeadersComplete],
              '2': [Function: parserOnBody],
              '3': [Function: parserOnMessageComplete],
              '4': [Function: bound onParserExecute],
              _headers: [],
              _url: '',
              _consumed: true,
              socket: [Circular],
              incoming: [Circular],
              outgoing: null,
              maxHeaderPairs: 2000,
              onIncoming: [Function: bound parserOnIncoming] },
           on: [Function: socketOnWrap],
           _paused: false,
           _httpMessage:
            ServerResponse {
              _events: { finish: [Function: bound resOnFinish] },
              _eventsCount: 1,
              _maxListeners: undefined,
              output: [],
              outputEncodings: [],
              outputCallbacks: [],
              outputSize: 0,
              writable: true,
              _last: false,
              chunkedEncoding: false,
              shouldKeepAlive: true,
              useChunkedEncodingByDefault: true,
              sendDate: true,
              _removedConnection: false,
              _removedContLen: false,
              _removedTE: false,
              _contentLength: null,
              _hasBody: true,
              _trailer: '',
              finished: false,
              _headerSent: false,
              socket: [Circular],
              connection: [Circular],
              _header: null,
              _onPendingData: [Function: bound updateOutgoingData],
              _sent100: false,
              _expect_continue: false,
              [Symbol(isCorked)]: false,
              [Symbol(outHeadersKey)]: null },
           [Symbol(asyncId)]: 56,
           [Symbol(lastWriteQueueSize)]: 0,
           [Symbol(timeout)]:
            Timeout {
              _called: false,
              _idleTimeout: 120000,
              _idlePrev: [TimersList],
              _idleNext: [TimersList],
              _idleStart: 11529,
              _onTimeout: [Function: bound ],
              _timerArgs: undefined,
              _repeat: null,
              _destroyed: false,
              [Symbol(unrefed)]: true,
              [Symbol(asyncId)]: 57,
              [Symbol(triggerId)]: 56 },
           [Symbol(kBytesRead)]: 0,
           [Symbol(kBytesWritten)]: 0 },
        httpVersionMajor: 1,
        httpVersionMinor: 1,
        httpVersion: '1.1',
        complete: true,
        headers:
         { 'content-type': 'application/json; charset=utf-8',
           accept: 'application/json',
           'accept-charset': 'utf-8',
           signature:
            '...',
           signaturecertchainurl: 'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
           'content-length': '2825',
           connection: 'Keep-Alive',
           'user-agent': 'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
           host: 'proxy.bespoken.tools' },
        rawHeaders:
         [ 'content-type',
           'application/json; charset=utf-8',
           'accept',
           'application/json',
           'accept-charset',
           'utf-8',
           'signature',
           '...',
           'signaturecertchainurl',
           'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
           'content-length',
           '2825',
           'connection',
           'Keep-Alive',
           'user-agent',
           'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
           'Host',
           'proxy.bespoken.tools' ],
        trailers: {},
        rawTrailers: [],
        aborted: false,
        upgrade: false,
        url: '/',
        method: 'POST',
        statusCode: null,
        statusMessage: null,
        client:
         Socket {
           connecting: false,
           _hadError: false,
           _handle:
            TCP {
              reading: true,
              onread: [Function: onStreamRead],
              onconnection: null,
              _consumed: true,
              [Symbol(owner)]: [Circular] },
           _parent: null,
           _host: null,
           _readableState:
            ReadableState {
              objectMode: false,
              highWaterMark: 16384,
              buffer: BufferList { head: null, tail: null, length: 0 },
              length: 0,
              pipes: null,
              pipesCount: 0,
              flowing: true,
              ended: false,
              endEmitted: false,
              reading: true,
              sync: false,
              needReadable: true,
              emittedReadable: false,
              readableListening: false,
              resumeScheduled: false,
              emitClose: false,
              destroyed: false,
              defaultEncoding: 'utf8',
              awaitDrain: 0,
              readingMore: false,
              decoder: null,
              encoding: null },
           readable: true,
           _events:
            { end:
               [ [Function: onReadableStreamEnd],
                 [Function: bound socketOnEnd] ],
              drain: [ [Function: ondrain], [Function: bound socketOnDrain] ],
              timeout: [Function: socketOnTimeout],
              data: [Function: bound socketOnData],
              error: [Function: socketOnError],
              close:
               [ [Function: bound socketOnClose],
                 [Function: onServerResponseClose] ],
              resume: [Function: onSocketResume],
              pause: [Function: onSocketPause] },
           _eventsCount: 8,
           _maxListeners: undefined,
           _writableState:
            WritableState {
              objectMode: false,
              highWaterMark: 16384,
              finalCalled: false,
              needDrain: false,
              ending: false,
              ended: false,
              finished: false,
              destroyed: false,
              decodeStrings: false,
              defaultEncoding: 'utf8',
              length: 0,
              writing: false,
              corked: 0,
              sync: true,
              bufferProcessing: false,
              onwrite: [Function: bound onwrite],
              writecb: null,
              writelen: 0,
              bufferedRequest: null,
              lastBufferedRequest: null,
              pendingcb: 0,
              prefinished: false,
              errorEmitted: false,
              emitClose: false,
              bufferedRequestCount: 0,
              corkedRequestsFree:
               { next: null,
                 entry: null,
                 finish: [Function: bound onCorkedFinish] } },
           writable: true,
           allowHalfOpen: true,
           _sockname: null,
           _pendingData: null,
           _pendingEncoding: '',
           server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           _server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           timeout: 120000,
           parser:
            HTTPParser {
              '0': [Function: parserOnHeaders],
              '1': [Function: parserOnHeadersComplete],
              '2': [Function: parserOnBody],
              '3': [Function: parserOnMessageComplete],
              '4': [Function: bound onParserExecute],
              _headers: [],
              _url: '',
              _consumed: true,
              socket: [Circular],
              incoming: [Circular],
              outgoing: null,
              maxHeaderPairs: 2000,
              onIncoming: [Function: bound parserOnIncoming] },
           on: [Function: socketOnWrap],
           _paused: false,
           _httpMessage:
            ServerResponse {
              _events: { finish: [Function: bound resOnFinish] },
              _eventsCount: 1,
              _maxListeners: undefined,
              output: [],
              outputEncodings: [],
              outputCallbacks: [],
              outputSize: 0,
              writable: true,
              _last: false,
              chunkedEncoding: false,
              shouldKeepAlive: true,
              useChunkedEncodingByDefault: true,
              sendDate: true,
              _removedConnection: false,
              _removedContLen: false,
              _removedTE: false,
              _contentLength: null,
              _hasBody: true,
              _trailer: '',
              finished: false,
              _headerSent: false,
              socket: [Circular],
              connection: [Circular],
              _header: null,
              _onPendingData: [Function: bound updateOutgoingData],
              _sent100: false,
              _expect_continue: false,
              [Symbol(isCorked)]: false,
              [Symbol(outHeadersKey)]: null },
           [Symbol(asyncId)]: 56,
           [Symbol(lastWriteQueueSize)]: 0,
           [Symbol(timeout)]:
            Timeout {
              _called: false,
              _idleTimeout: 120000,
              _idlePrev: [TimersList],
              _idleNext: [TimersList],
              _idleStart: 11529,
              _onTimeout: [Function: bound ],
              _timerArgs: undefined,
              _repeat: null,
              _destroyed: false,
              [Symbol(unrefed)]: true,
              [Symbol(asyncId)]: 57,
              [Symbol(triggerId)]: 56 },
           [Symbol(kBytesRead)]: 0,
           [Symbol(kBytesWritten)]: 0 },
        _consuming: true,
        _dumped: false },
     body:
      <Buffer 7b 22 76 65 72 73 69 6f 6e 22 3a 22 31 2e 30 22 2c 22 73 65 73 73 69 6f 6e 22 3a 7b 22 6e 65 77 22 3a 74 72 75 65 2c 22 73 65 73 73 69 6f 6e 49 64 22 ... >,
     response:
      ServerResponse {
        _events: { finish: [Function: bound resOnFinish] },
        _eventsCount: 1,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: false,
        chunkedEncoding: false,
        shouldKeepAlive: true,
        useChunkedEncodingByDefault: true,
        sendDate: true,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: false,
        _headerSent: false,
        socket:
         Socket {
           connecting: false,
           _hadError: false,
           _handle:
            TCP {
              reading: true,
              onread: [Function: onStreamRead],
              onconnection: null,
              _consumed: true,
              [Symbol(owner)]: [Circular] },
           _parent: null,
           _host: null,
           _readableState:
            ReadableState {
              objectMode: false,
              highWaterMark: 16384,
              buffer: BufferList { head: null, tail: null, length: 0 },
              length: 0,
              pipes: null,
              pipesCount: 0,
              flowing: true,
              ended: false,
              endEmitted: false,
              reading: true,
              sync: false,
              needReadable: true,
              emittedReadable: false,
              readableListening: false,
              resumeScheduled: false,
              emitClose: false,
              destroyed: false,
              defaultEncoding: 'utf8',
              awaitDrain: 0,
              readingMore: false,
              decoder: null,
              encoding: null },
           readable: true,
           _events:
            { end:
               [ [Function: onReadableStreamEnd],
                 [Function: bound socketOnEnd] ],
              drain: [ [Function: ondrain], [Function: bound socketOnDrain] ],
              timeout: [Function: socketOnTimeout],
              data: [Function: bound socketOnData],
              error: [Function: socketOnError],
              close:
               [ [Function: bound socketOnClose],
                 [Function: onServerResponseClose] ],
              resume: [Function: onSocketResume],
              pause: [Function: onSocketPause] },
           _eventsCount: 8,
           _maxListeners: undefined,
           _writableState:
            WritableState {
              objectMode: false,
              highWaterMark: 16384,
              finalCalled: false,
              needDrain: false,
              ending: false,
              ended: false,
              finished: false,
              destroyed: false,
              decodeStrings: false,
              defaultEncoding: 'utf8',
              length: 0,
              writing: false,
              corked: 0,
              sync: true,
              bufferProcessing: false,
              onwrite: [Function: bound onwrite],
              writecb: null,
              writelen: 0,
              bufferedRequest: null,
              lastBufferedRequest: null,
              pendingcb: 0,
              prefinished: false,
              errorEmitted: false,
              emitClose: false,
              bufferedRequestCount: 0,
              corkedRequestsFree:
               { next: null,
                 entry: null,
                 finish: [Function: bound onCorkedFinish] } },
           writable: true,
           allowHalfOpen: true,
           _sockname: null,
           _pendingData: null,
           _pendingEncoding: '',
           server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           _server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           timeout: 120000,
           parser:
            HTTPParser {
              '0': [Function: parserOnHeaders],
              '1': [Function: parserOnHeadersComplete],
              '2': [Function: parserOnBody],
              '3': [Function: parserOnMessageComplete],
              '4': [Function: bound onParserExecute],
              _headers: [],
              _url: '',
              _consumed: true,
              socket: [Circular],
              incoming:
               IncomingMessage {
                 _readableState:
                  ReadableState {
                    objectMode: false,
                    highWaterMark: 16384,
                    buffer: BufferList { head: null, tail: null, length: 0 },
                    length: 0,
                    pipes: null,
                    pipesCount: 0,
                    flowing: true,
                    ended: true,
                    endEmitted: true,
                    reading: false,
                    sync: false,
                    needReadable: false,
                    emittedReadable: false,
                    readableListening: false,
                    resumeScheduled: false,
                    emitClose: true,
                    destroyed: false,
                    defaultEncoding: 'utf8',
                    awaitDrain: 0,
                    readingMore: false,
                    decoder: null,
                    encoding: null },
                 readable: false,
                 _events: { data: [Function], end: [Function] },
                 _eventsCount: 2,
                 _maxListeners: undefined,
                 socket: [Circular],
                 connection: [Circular],
                 httpVersionMajor: 1,
                 httpVersionMinor: 1,
                 httpVersion: '1.1',
                 complete: true,
                 headers:
                  { 'content-type': 'application/json; charset=utf-8',
                    accept: 'application/json',
                    'accept-charset': 'utf-8',
                    signature:
                     '...',
                    signaturecertchainurl: 'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
                    'content-length': '2825',
                    connection: 'Keep-Alive',
                    'user-agent': 'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
                    host: 'proxy.bespoken.tools' },
                 rawHeaders:
                  [ 'content-type',
                    'application/json; charset=utf-8',
                    'accept',
                    'application/json',
                    'accept-charset',
                    'utf-8',
                    'signature',
                    '...',
                    'signaturecertchainurl',
                    'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
                    'content-length',
                    '2825',
                    'connection',
                    'Keep-Alive',
                    'user-agent',
                    'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
                    'Host',
                    'proxy.bespoken.tools' ],
                 trailers: {},
                 rawTrailers: [],
                 aborted: false,
                 upgrade: false,
                 url: '/',
                 method: 'POST',
                 statusCode: null,
                 statusMessage: null,
                 client: [Circular],
                 _consuming: true,
                 _dumped: false },
              outgoing: null,
              maxHeaderPairs: 2000,
              onIncoming: [Function: bound parserOnIncoming] },
           on: [Function: socketOnWrap],
           _paused: false,
           _httpMessage: [Circular],
           [Symbol(asyncId)]: 56,
           [Symbol(lastWriteQueueSize)]: 0,
           [Symbol(timeout)]:
            Timeout {
              _called: false,
              _idleTimeout: 120000,
              _idlePrev: [TimersList],
              _idleNext: [TimersList],
              _idleStart: 11529,
              _onTimeout: [Function: bound ],
              _timerArgs: undefined,
              _repeat: null,
              _destroyed: false,
              [Symbol(unrefed)]: true,
              [Symbol(asyncId)]: 57,
              [Symbol(triggerId)]: 56 },
           [Symbol(kBytesRead)]: 0,
           [Symbol(kBytesWritten)]: 0 },
        connection:
         Socket {
           connecting: false,
           _hadError: false,
           _handle:
            TCP {
              reading: true,
              onread: [Function: onStreamRead],
              onconnection: null,
              _consumed: true,
              [Symbol(owner)]: [Circular] },
           _parent: null,
           _host: null,
           _readableState:
            ReadableState {
              objectMode: false,
              highWaterMark: 16384,
              buffer: BufferList { head: null, tail: null, length: 0 },
              length: 0,
              pipes: null,
              pipesCount: 0,
              flowing: true,
              ended: false,
              endEmitted: false,
              reading: true,
              sync: false,
              needReadable: true,
              emittedReadable: false,
              readableListening: false,
              resumeScheduled: false,
              emitClose: false,
              destroyed: false,
              defaultEncoding: 'utf8',
              awaitDrain: 0,
              readingMore: false,
              decoder: null,
              encoding: null },
           readable: true,
           _events:
            { end:
               [ [Function: onReadableStreamEnd],
                 [Function: bound socketOnEnd] ],
              drain: [ [Function: ondrain], [Function: bound socketOnDrain] ],
              timeout: [Function: socketOnTimeout],
              data: [Function: bound socketOnData],
              error: [Function: socketOnError],
              close:
               [ [Function: bound socketOnClose],
                 [Function: onServerResponseClose] ],
              resume: [Function: onSocketResume],
              pause: [Function: onSocketPause] },
           _eventsCount: 8,
           _maxListeners: undefined,
           _writableState:
            WritableState {
              objectMode: false,
              highWaterMark: 16384,
              finalCalled: false,
              needDrain: false,
              ending: false,
              ended: false,
              finished: false,
              destroyed: false,
              decodeStrings: false,
              defaultEncoding: 'utf8',
              length: 0,
              writing: false,
              corked: 0,
              sync: true,
              bufferProcessing: false,
              onwrite: [Function: bound onwrite],
              writecb: null,
              writelen: 0,
              bufferedRequest: null,
              lastBufferedRequest: null,
              pendingcb: 0,
              prefinished: false,
              errorEmitted: false,
              emitClose: false,
              bufferedRequestCount: 0,
              corkedRequestsFree:
               { next: null,
                 entry: null,
                 finish: [Function: bound onCorkedFinish] } },
           writable: true,
           allowHalfOpen: true,
           _sockname: null,
           _pendingData: null,
           _pendingEncoding: '',
           server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           _server:
            Server {
              _events:
               { connection: [Function: connectionListener],
                 request: [Function],
                 listening: [Function] },
              _eventsCount: 3,
              _maxListeners: undefined,
              _connections: 1,
              _handle:
               TCP {
                 reading: false,
                 onread: null,
                 onconnection: [Function: onconnection],
                 [Symbol(owner)]: [Circular] },
              _usingWorkers: false,
              _workers: [],
              _unref: false,
              allowHalfOpen: true,
              pauseOnConnect: false,
              httpAllowHalfOpen: false,
              timeout: 120000,
              keepAliveTimeout: 5000,
              _pendingResponseData: 0,
              maxHeadersCount: null,
              _connectionKey: '6::::10000',
              [Symbol(IncomingMessage)]:
               { [Function: IncomingMessage]
                 super_:
                  { [Function: Readable]
                    ReadableState: [Function: ReadableState],
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable: [Circular],
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex: { [Function: Duplex] super_: [Circular] },
                       Transform:
                        { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform] super_: { [Function: Duplex] super_: [Circular] } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] },
                    _fromList: [Function: fromList] } },
              [Symbol(ServerResponse)]:
               { [Function: ServerResponse]
                 super_:
                  { [Function: OutgoingMessage]
                    super_:
                     { [Function: Stream]
                       super_:
                        { [Function: EventEmitter]
                          EventEmitter: [Circular],
                          usingDomains: true,
                          defaultMaxListeners: [Getter/Setter],
                          init: [Function],
                          listenerCount: [Function] },
                       Readable:
                        { [Function: Readable]
                          ReadableState: [Function: ReadableState],
                          super_: [Circular],
                          _fromList: [Function: fromList] },
                       Writable:
                        { [Function: Writable] WritableState: [Function: WritableState], super_: [Circular] },
                       Duplex:
                        { [Function: Duplex]
                          super_:
                           { [Function: Readable]
                             ReadableState: [Function: ReadableState],
                             super_: [Circular],
                             _fromList: [Function: fromList] } },
                       Transform:
                        { [Function: Transform]
                          super_:
                           { [Function: Duplex]
                             super_:
                              { [Function: Readable]
                                ReadableState: [Function: ReadableState],
                                super_: [Circular],
                                _fromList: [Function: fromList] } } },
                       PassThrough:
                        { [Function: PassThrough]
                          super_:
                           { [Function: Transform]
                             super_:
                              { [Function: Duplex]
                                super_:
                                 { [Function: Readable]
                                   ReadableState: [Function: ReadableState],
                                   super_: [Circular],
                                   _fromList: [Function: fromList] } } } },
                       pipeline: [Function: pipeline],
                       finished: [Function: eos],
                       Stream: [Circular],
                       _isUint8Array: [Function: isUint8Array],
                       _uint8ArrayToBuffer: [Function: _uint8ArrayToBuffer] } } },
              [Symbol(asyncId)]: 17 },
           timeout: 120000,
           parser:
            HTTPParser {
              '0': [Function: parserOnHeaders],
              '1': [Function: parserOnHeadersComplete],
              '2': [Function: parserOnBody],
              '3': [Function: parserOnMessageComplete],
              '4': [Function: bound onParserExecute],
              _headers: [],
              _url: '',
              _consumed: true,
              socket: [Circular],
              incoming:
               IncomingMessage {
                 _readableState:
                  ReadableState {
                    objectMode: false,
                    highWaterMark: 16384,
                    buffer: BufferList { head: null, tail: null, length: 0 },
                    length: 0,
                    pipes: null,
                    pipesCount: 0,
                    flowing: true,
                    ended: true,
                    endEmitted: true,
                    reading: false,
                    sync: false,
                    needReadable: false,
                    emittedReadable: false,
                    readableListening: false,
                    resumeScheduled: false,
                    emitClose: true,
                    destroyed: false,
                    defaultEncoding: 'utf8',
                    awaitDrain: 0,
                    readingMore: false,
                    decoder: null,
                    encoding: null },
                 readable: false,
                 _events: { data: [Function], end: [Function] },
                 _eventsCount: 2,
                 _maxListeners: undefined,
                 socket: [Circular],
                 connection: [Circular],
                 httpVersionMajor: 1,
                 httpVersionMinor: 1,
                 httpVersion: '1.1',
                 complete: true,
                 headers:
                  { 'content-type': 'application/json; charset=utf-8',
                    accept: 'application/json',
                    'accept-charset': 'utf-8',
                    signature:
                     '...',
                    signaturecertchainurl: 'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
                    'content-length': '2825',
                    connection: 'Keep-Alive',
                    'user-agent': 'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
                    host: 'proxy.bespoken.tools' },
                 rawHeaders:
                  [ 'content-type',
                    'application/json; charset=utf-8',
                    'accept',
                    'application/json',
                    'accept-charset',
                    'utf-8',
                    'signature',
                    '...',
                    'signaturecertchainurl',
                    'https://s3.amazonaws.com/echo.api/echo-api-cert-6-ats.pem',
                    'content-length',
                    '2825',
                    'connection',
                    'Keep-Alive',
                    'user-agent',
                    'Apache-HttpClient/4.5.x (Java/1.8.0_172)',
                    'Host',
                    'proxy.bespoken.tools' ],
                 trailers: {},
                 rawTrailers: [],
                 aborted: false,
                 upgrade: false,
                 url: '/',
                 method: 'POST',
                 statusCode: null,
                 statusMessage: null,
                 client: [Circular],
                 _consuming: true,
                 _dumped: false },
              outgoing: null,
              maxHeaderPairs: 2000,
              onIncoming: [Function: bound parserOnIncoming] },
           on: [Function: socketOnWrap],
           _paused: false,
           _httpMessage: [Circular],
           [Symbol(asyncId)]: 56,
           [Symbol(lastWriteQueueSize)]: 0,
           [Symbol(timeout)]:
            Timeout {
              _called: false,
              _idleTimeout: 120000,
              _idlePrev: [TimersList],
              _idleNext: [TimersList],
              _idleStart: 11529,
              _onTimeout: [Function: bound ],
              _timerArgs: undefined,
              _repeat: null,
              _destroyed: false,
              [Symbol(unrefed)]: true,
              [Symbol(asyncId)]: 57,
              [Symbol(triggerId)]: 56 },
           [Symbol(kBytesRead)]: 0,
           [Symbol(kBytesWritten)]: 0 },
        _header: null,
        _onPendingData: [Function: bound updateOutgoingData],
        _sent100: false,
        _expect_continue: false,
        [Symbol(isCorked)]: false,
        [Symbol(outHeadersKey)]: null },
     verbose: false,
     awsRequestId: 'N/A',
     callbackWaitsForEmptyEventLoop: true,
     functionName: 'BST.LambdaServer',
     functionVersion: 'N/A',
     memoryLimitInMB: -1,
     invokedFunctionArn: 'N/A',
     logGroupName: 'N/A',
     logStreamName: null,
     identity: null,
     clientContext: null } }

@shotamakino
Copy link
Contributor

Hi hyzhak, I am not able to replicate the problem on my end using only Lambda functions and the Alexa skills sdk, but I noticed you are using bespoken-tools for development and it is passing the LambdaContext class itself without instantiating an object of it.

I'll attempt to replicate your issue using bespoken - would you kindly share how you're using bespoken-tools?

@hyzhak
Copy link
Author

hyzhak commented Jan 4, 2019

Hi @shotamakino, Sure! Big thanks for the help!
Our project is open source, so you can see all its sources.
There is place where I'm attache dashbot
https://github.com/internetarchive/internet-archive-voice-apps/blob/feature/add-dashbot-to-alexa/functions/src/platform/alexa/handler/index.js#L44

and there is script to launch bespoken tool:
https://github.com/internetarchive/internet-archive-voice-apps/blob/feature/add-dashbot-to-alexa/functions/package.json#L16

@shotamakino
Copy link
Contributor

hi hyzhak, pushed a patch out to take care of this

@hyzhak
Copy link
Author

hyzhak commented Jan 5, 2019

@shotamakino thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants