# Getting Error in Importing json file in Kibana4

**URL:** <https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339>\
**Category:** Kibana\
**Created:** [May 18, 2016, 1:25pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339 "2016-05-18T13:25:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajeev\_Gaurav](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@Rajeev\_Gaurav](https://discuss.elastic.co/u/Rajeev_Gaurav)\
**Post date:** [May 18, 2016, 1:25pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/1 "2016-05-18T13:25:17Z")

</div>

When I am importing the json file containing dashboard and the visualization to Kibana 4 I am getting following error:

Saved Objects: Cannot read property 'byName' of undefined  
OK  
TypeError: Cannot read property 'byName' of undefined  
at FieldAggParamFactory.FieldAggParam.deserialize ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:84771:53](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:84771:53))  
at [http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90104:29](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90104:29)  
at Array.forEach (native)  
at AggConfigFactory.AggConfig.fillDefaults ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90082:28](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90082:28))  
at new AggConfig ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:89996:13](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:89996:13))  
at [http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90695:19](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90695:19)  
at Array.map (native)  
at new AggConfigs ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90693:35](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:90693:35))  
at VisFactory.Vis.setState ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:84236:20](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:84236:20))  
at SavedVis.\_updateVis ([http://stciperf:5601/bundles/kibana.bundle.js?v=9732:92582:17](http://stciperf:5601/bundles/kibana.bundle.js?v=9732:92582:17))  
But importing the same json file for second time works fine and I am able to see my dashboard. Kindly suggests few points.

---

<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:** [May 18, 2016, 9:57pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/2 "2016-05-18T21:57:54Z")

</div>

Are you able to share the json file?

---

<div class="post-metadata">

**Author:** ![Rajeev\_Gaurav](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@Rajeev\_Gaurav](https://discuss.elastic.co/u/Rajeev_Gaurav)\
**Post date:** [June 6, 2016, 9:49am UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/3 "2016-06-06T09:49:51Z")

</div>

Json file can be found at [https://drive.google.com/file/d/0B8uoBxPXS5sYYXR5Sk9sMFJEZ1k/view?usp=sharing](https://drive.google.com/file/d/0B8uoBxPXS5sYYXR5Sk9sMFJEZ1k/view?usp=sharing)

@Bargs

---

<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:** [June 7, 2016, 11:28pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/4 "2016-06-07T23:28:31Z")

</div>

Sorry, should have asked this before, what version of Kibana did the export come from, and what version are you importing to?

---

<div class="post-metadata">

**Author:** ![Rajeev\_Gaurav](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@Rajeev\_Gaurav](https://discuss.elastic.co/u/Rajeev_Gaurav)\
**Post date:** [June 8, 2016, 4:49pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/5 "2016-06-08T16:49:09Z")

</div>

I am creating the json programmatically by editing the json exported from kibana 4 and importing to the same version.

---

<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:** [June 14, 2016, 1:58pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/6 "2016-06-14T13:58:36Z")

</div>

A couple more follow up questions:

The error you're getting appears to come from some code that's trying to access the fields of your index pattern.

- Have you recreated the index pattern(s) these visualizations and dashboards depend on prior to importing?
- If so, does the index pattern show all the fields these objects require?
- Also, what version specifically are you on? In the form of 4.x.x

---

<div class="post-metadata">

**Author:** ![Rajeev\_Gaurav](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@Rajeev\_Gaurav](https://discuss.elastic.co/u/Rajeev_Gaurav)\
**Post date:** [June 15, 2016, 4:36pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/7 "2016-06-15T16:36:21Z")

</div>

I am having Kibana 4.4.2.

---

<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:** [July 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/getting-error-in-importing-json-file-in-kibana4/50339/8 "2017-07-06T13:50:27Z")

</div>


