# Strange Error when loading Kibana Visualizations

**URL:** <https://discuss.elastic.co/t/strange-error-when-loading-kibana-visualizations/91487>\
**Category:** Kibana\
**Created:** [June 30, 2017, 8:18pm UTC](https://discuss.elastic.co/t/strange-error-when-loading-kibana-visualizations/91487 "2017-06-30T20:18:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xwang1](https://avatars.discourse-cdn.com/v4/letter/x/ed8c4c/32.png) [@xwang1](https://discuss.elastic.co/u/xwang1)\
**Post date:** [June 30, 2017, 8:18pm UTC](https://discuss.elastic.co/t/strange-error-when-loading-kibana-visualizations/91487/1 "2017-06-30T20:18:45Z")

</div>

I am using a shell script to put visualizations and dashboards into kibana. This is the script I am using, I'm pretty confident that it works:

```auto
#!/bin/sh

# This script populates ElasticSearch .kibana index with pre-defined
# visualizations and dashboard.
#
# Note that the json file name (e.g. 5.0.0-alpha5.json) under config/ directory
# needs to match up with kibana version

ES=$1

TYPES="config index-pattern visualization dashboard"

for _type in ${TYPES}; do
    for _item in ${_type}/*.json; do
        _id=`basename ${_item} .json`
        echo curl -d @"${_item}" "http://${ES}:9200/.kibana/${_type}/${_id}"
        curl -d @"${_item}" "http://${ES}:9200/.kibana/${_type}/${_id}"
    done
done

```

When I run this script it does not give me any errors, but when I open Kibana and go to the visualizations tab, I get redirected to the Management tab and get the following error:

"Saved Visualization Service: Visualization type is missing. Please add a type to this visualization."

I would appreciate any help with resolving this error. (I am using version 5.2) Thx.

---

<div class="post-metadata">

**Author:** ![dsnider](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dsnider/32/44068_2.png) [@dsnider](https://discuss.elastic.co/u/dsnider)\
**Post date:** [June 30, 2017, 8:26pm UTC](https://discuss.elastic.co/t/strange-error-when-loading-kibana-visualizations/91487/2 "2017-06-30T20:26:17Z")

</div>

Usually this is due to the json being mangled in some way. A good way to troubleshoot this might be to create the visualization manually through the UI, export that JSON through the management / saved objects area, and then compare it against your script generated json.

---

<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 28, 2017, 8:26pm UTC](https://discuss.elastic.co/t/strange-error-when-loading-kibana-visualizations/91487/3 "2017-07-28T20:26:37Z")

</div>

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