# Plugin startup fails in V7.9 but works in 7.3

**URL:** https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800
**Category:** Kibana
**Created:** [August 28, 2020, 5:45pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800 "2020-08-28T17:45:43Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)
#### Post date: [August 28, 2020, 5:45pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/1 "2020-08-28T17:45:44Z")

</div>

My cbsa plugin fails on startup. It fails at xpackMainPlugin.registerFeature in init.js with the following message " FATAL Error: Feature cbsa specifies app entries which are not granted to any privileges: cbsa,kibana". I tried a number of combinations as shown in:

> <https://github.com/elastic/kibana/blob/a20469f038e04e3c5fb821ed0b38360fb9698fe2/docs/developer/architecture/security/feature-registration.asciidoc#example-1-canvas>

What exactly is this error trying to tell me?  
Why does it work in 7.3 and not in 7.9? (Checked the docs. Nothing obvious in Change Log).  
My code is shown below. What changes are required?

```auto
      const xpackMainPlugin = server.plugins.xpack_main;
      if (xpackMainPlugin) {
        const featureId = 'cbsa';

        xpackMainPlugin.registerFeature({
          id: featureId,
          name: i18n.translate('cbsa.featureRegistry.featureName', {
            defaultMessage: 'cbsa',
          }),
          navLinkId: featureId,
          icon: 'questionInCircle',
          app: [featureId, 'kibana'],
          catalogue: [],
          privileges: {
            all: {
              api: [],
              savedObject: {
                all: [],
                read: [],
              },
              ui: ['show'],
            },
            read: {
              api: [],
              savedObject: {
                all: [],
                read: [],
              },
              ui: ['show'],
            },
          },
        });
      }

```

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [August 28, 2020, 7:35pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/2 "2020-08-28T19:35:36Z")

</div>

Kibana internals have changed a lot from 7.3 to 7.9. Plugins that work in 7.3 may not work in 7.9. Does cbsa plugin support 7.9?

---

<div class="post-metadata">

### Author: ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)
#### Post date: [August 29, 2020, 7:52pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/3 "2020-08-29T19:52:24Z")

</div>

Nathan,  
I have used Eui Framework all the way through. From what i read , major changes will happen in 8.0. Given what i have provided, where is the best place to look?'m trying to get cbsa plugin to work under 7.9. Thats the point.

---

<div class="post-metadata">

### Author: ![AndreaTosti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreatosti/32/75172_2.png) [@AndreaTosti](https://discuss.elastic.co/u/AndreaTosti)
#### Post date: [August 30, 2020, 4:26pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/4 "2020-08-30T16:26:57Z")

</div>

Try adding the line `app: [featureId, 'kibana'],`

below the line ` all: {`

and

below the line` read: {`

---

<div class="post-metadata">

### Author: ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)
#### Post date: [August 31, 2020, 12:50am UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/5 "2020-08-31T00:50:38Z")

</div>

Andrea,  
Thanks for taking the time to respond. Well, one more step forward. Adding these line now allows the plugin to start up without the previous error message. However , when the plugin is invoked , it simplu loos. When i look at the console, i get the following error message:

\*_refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution._

_ **bootstrap.js:11 ^ A single error about an inline script not firing due to content security policy is expected!** _

So it pretty obvious that the ```  
xpackMainPlugin.registerFeature({

```auto

```

---

<div class="post-metadata">

### Author: ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)
#### Post date: [August 31, 2020, 12:52am UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/6 "2020-08-31T00:52:34Z")

</div>

needs to be setup properly. I'm running teh free or public domain version at this time. Will be getting licensed in the near future.

---

<div class="post-metadata">

### Author: ![AndreaTosti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreatosti/32/75172_2.png) [@AndreaTosti](https://discuss.elastic.co/u/AndreaTosti)
#### Post date: [September 3, 2020, 4:10pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/7 "2020-09-03T16:10:25Z")

</div>

> [@pgervais](#):
>
> `server.plugins.xpack_main`

sorry for the late reply, you have to use `plugins.features.registerFeature` instead of `server.plugins.xpack_main.registerFeature` as written here [https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#plugin-services](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#plugin-services)

---

<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: [October 1, 2020, 4:11pm UTC](https://discuss.elastic.co/t/plugin-startup-fails-in-v7-9-but-works-in-7-3/246800/8 "2020-10-01T16:11:00Z")

</div>

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