Email action fails with property message null

Hello,

I configured an e-mail action in Watcher in Kibana/Elasticsearch 6.1.1 and tried to send an e-mail. The error I get is:

TypeError: Cannot read property 'message' of null
    at http://localhost:5601/bundles/kibana.bundle.js?v=16350:153:75625
    at processQueue (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:132456)
    at http://localhost:5601/bundles/commons.bundle.js?v=16350:29:133349
    at Scope.$digest (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:144239)
    at Scope.$apply (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:147018)
    at done (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:100026)
    at completeRequest (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:104697)
    at XMLHttpRequest.requestError (http://localhost:5601/bundles/commons.bundle.js?v=16350:29:105545)

I have tried with gmail and exchange and get the same error. Here is my elasticsearch.yml config for e-mail:

xpack.notification.email.account:
    gmail_account:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: xxxi@gmail.com
            password: xxx

Any idea what could be wrong? Thanks

Here is the complete error:

  optionalFields.body.text = this.body;
                           ^

TypeError: Cannot set property 'text' of undefined
    at EmailAction.get upstreamJson [as upstreamJson] (C:/tools/kibana-6.1.1-windows-x86_64/plugins/x-pack/plugins/watcher/server/models/action/email_action.js:48:7)

    at action (C:/tools/kibana-6.1.1-windows-x86_64/plugins/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_actions.js:10:27)
    at arrayEach (C:\tools\kibana-6.1.1-windows-x86_64\plugins\x-pack\node_modules\lodash\index.js:1289:13)
    at C:\tools\kibana-6.1.1-windows-x86_64\plugins\x-pack\node_modules\lodash\index.js:3345:13
    at buildActions (C:/tools/kibana-6.1.1-windows-x86_64/plugins/x-pack/plugins/watcher/server/models/watch/threshold_watch/build_actions.js:9:3)
    at ThresholdWatch.get watchJson [as watchJson] (C:/tools/kibana-6.1.1-windows-x86_64/plugins/x-pack/plugins/watcher/server/models/watch/threshold_watch/threshold
_watch.js:51:18)
    at handler (C:/tools/kibana-6.1.1-windows-x86_64/plugins/x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.js:31:73)
    at Object.internals.handler (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\handler.js:96:36)
    at Items.serial (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\handler.js:63:26)
    at done (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\node_modules\items\lib\index.js:31:25)
    at done (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\node_modules\items\lib\index.js:63:25)
    at pre (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\handler.js:52:24)
    at finalize (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\handler.js:281:20)
    at wrapped (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hoek\lib\index.js:875:20)
    at internals.Response._processPrepare (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\response.js:521:16)
    at internals.Response._prepare (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\response.js:460:21)
    at process.nextTick (C:\tools\kibana-6.1.1-windows-x86_64\node_modules\hapi\lib\reply.js:152:22)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)

By the way, is this a bug? Because what happens after that error is that the Kibana process crashes and requires a reboot. This is on windows 7 with everything in 6.1.1.

Hi @Souciance_Eqdam_Rash,

This is the same as Typeerror: cannot read property 'message' of null watcher and will be fixed in the next release.

Thanks,
Chris

Thanks, yeah I kind of guessed that. Looking forward to the next release then.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.