# Struggling with regionmapsConfig provider

**URL:** <https://discuss.elastic.co/t/struggling-with-regionmapsconfig-provider/136075>\
**Category:** Kibana\
**Created:** [June 15, 2018, 9:56am UTC](https://discuss.elastic.co/t/struggling-with-regionmapsconfig-provider/136075 "2018-06-15T09:56:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [June 15, 2018, 4:16pm UTC](https://discuss.elastic.co/t/struggling-with-regionmapsconfig-provider/136075/2 "2018-06-15T16:16:00Z")

</div>

Hi,

unfortunately that error message is not much saying, but a common mistake. We've changed the way you need to copy over injected UI vars in your plugin. Add to your plugin description (i.e. inside the object you pass to `new kibana.Plugin()`:

```auto
init(server) {
  server.injectUiAppVars('youAppId', async () => (
    await server.getInjectedUiAppVars('kibana')
  ));
}

```

Where `yourAppId` must match the `id` you gave your application in the `app` part of that file. ALso if your plugin was running earlier already, you might have the old `injectVars` key in your app definition, which you can remove.

Also see [`kibana_sample_plugin`](https://github.com/elastic/kibana_sample_plugin/commit/e4d3257973073a962a60e7cf2bc465797fb64173#diff-168726dbe96b3ce427e7fedce31bb0bc) for an example of how to migrate the `index.js`.

Cheers,  
Tim

---

_[View the full topic](https://discuss.elastic.co/t/struggling-with-regionmapsconfig-provider/136075)._
