# JS errors preventing Discover tab from displaying

**URL:** <https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633>\
**Category:** Kibana\
**Created:** [March 22, 2017, 6:08pm UTC](https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633 "2017-03-22T18:08:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemi](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@mikemi](https://discuss.elastic.co/u/mikemi)\
**Post date:** [March 22, 2017, 6:08pm UTC](https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633/1 "2017-03-22T18:08:53Z")

</div>

We're evaluating an [elastic.co](http://elastic.co) hosted instance of elasticsearch/kibana.

Today, the Discover tab either doesn't load, or when it does, it is all white. (not white due to no results based on the time filter though)

When I inspect the page, I am seeing the following javascript errors:

```
Failed to load resource: the server responded with a status of 400 (Bad Request)
commons.bundle.js?v=14723:38 Error: [illegal_argument_exception] mapper [hits] cannot be changed from type [long] to [integer]
    at respond (kibana.bundle.js?v=14723:14)
    at checkRespForFailure (kibana.bundle.js?v=14723:14)
    at kibana.bundle.js?v=14723:1
    at processQueue (commons.bundle.js?v=14723:38)
    at commons.bundle.js?v=14723:38
    at Scope.$eval (commons.bundle.js?v=14723:39)
    at Scope.$digest (commons.bundle.js?v=14723:39)
    at Scope.$apply (commons.bundle.js?v=14723:39)
    at done (commons.bundle.js?v=14723:37)
    at completeRequest (commons.bundle.js?v=14723:37)

```

The resource it is failing to load is: `/es_admin/.kibana/_mapping/search`

I get the same results on Chrome & Firefox. Clearing cache also does not seem to help.

Any suggestions would be appreciated.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [March 22, 2017, 7:42pm UTC](https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633/2 "2017-03-22T19:42:55Z")

</div>

This can happen when old dashboards, visualizations, saved searches, etc. are manually imported into a new elasticsearch cluster before Kibana gets a chance to run. Elasticsearch dynamically defines field `hits` as a long, then when Kibana runs it tries to creating the mapping as type integer and there's a conflict. The easiest solution, if viable, is to delete your `.kibana`, then import any old saved objects via Kibana's import mechanism.

Open github issue here for more info [https://github.com/elastic/kibana/issues/9888](https://github.com/elastic/kibana/issues/9888)

---

<div class="post-metadata">

**Author:** ![mikemi](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@mikemi](https://discuss.elastic.co/u/mikemi)\
**Post date:** [March 22, 2017, 10:30pm UTC](https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633/3 "2017-03-22T22:30:41Z")

</div>

Thanks Matt, removing `.kibana` resolved the issue!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2017, 10:31pm UTC](https://discuss.elastic.co/t/js-errors-preventing-discover-tab-from-displaying/79633/4 "2017-04-19T22:31:24Z")

</div>

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