TypeError: Cannot read property 'message' of null

I have recently upgraded the ELK stack from 5.4.2 to 6.0.0 and I have an issue in kibana where in the Discover tab or Management > Index Patterns tab I have an ajax error saying:

"Cannot read property 'message' of null".

This comes from one of the bundles


The ajax request is the following (will break on any pattern given)

HTTP 400 -- <kibana>/kibana/api/index_patterns/_fields_for_wildcard?pattern=...

So far I have done;

  • a fresh re-install of elasticsearch/kibana/logstash,
  • enabled/disabled x-pack along with custom realm,
  • uninstall x-pack,
  • used tar.gz items to override the .deb package stuff (in /usr/share/kibana) for kibana

All the other features of kibana seems to work just fine. I can use the console and _cat/indices just fine and all my stuff seems to be there. I have tried and upgraded kibana index from 5.4.2 to 6.0.0 without issues, that didn't seem to help so I also re-created one from scratch. Didn't help either.

Basically whenever I hit the Discover tab or the Management > Index Patterns tab I see the normal "first setup" page Configure an index pattern BUT when I try and add an index, it will fail (with the above error) and will also set kibana defaultIndex setting, and from there (unless I remove that default) the aforementioned tabs will simply display a blank page (not even the setup part).

Hi @g-vamp,

would it be possible for you to provide the relevant console log output of the Kibana server for that request?

For sure! Here is the kibana client side error from the ajax request followed by the json console output.

TypeError: Cannot read property 'message' of null
    at https://<hostname>/kibana/bundles/kibana.bundle.js?v=16070:231:27746
    at processQueue (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:39:9912)
    at https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:39:10805
    at Scope.$digest (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:39:21741)
    at Scope.$apply (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:39:24520)
    at done (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:38:9495)
    at completeRequest (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:38:13952)
    at XMLHttpRequest.requestError (https://<hostname>/kibana/bundles/commons.bundle.js?v=16070:38:14800)

         "accept":"application/json, text/plain, */*",
         "accept-encoding":"gzip, deflate, br",
         ... stripped some custom headers from our proxy ...
   "message":"GET /api/index_patterns/_fields_for_wildcard?pattern=logstash-*&meta_fields=%5B%22_source%22 400 30ms - 9.0B"

Interesting, it looks like there is a %5D missing at the end of the url. Does your proxy accidentally truncate that url?

Nice catch! This is exactly what was the problem! Many thanks for your help!

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