Getting Error in Importing json file in Kibana4

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)
at 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)
at new AggConfig (http://stciperf:5601/bundles/kibana.bundle.js?v=9732:89996:13)
at 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)
at VisFactory.Vis.setState (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)
But importing the same json file for second time works fine and I am able to see my dashboard. Kindly suggests few points.

Are you able to share the json file?

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

@Bargs

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

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

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

I am having Kibana 4.4.2.