Kibana custom plugin 7.13.3 installation fails

Hello,

I am upgrading my elasticstack from version 7.9.2 to 7.13.3. I checked my plugin with the development environment I created for kibana 7.13.3. it works fine. now I need to add that plugin to my windows elasticstack and I think I found a way to Install that plugin.

According to this link above, first I need to run the following.

$ bin/kibana-plugin install file:///local/path/to/custom_plugin.zip

But when I run this it gives following errors.

Attempting to transfer from file:///C:/ELK7.13.3/kibana-7.13.3/plugins/myplugin.zip
Transferring 37053422 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Plugin installation was unsuccessful due to error "No kibana plugins found in archive"

Has anyone seen this error before?

Thanks in advance!

Hey there! So I was looking through the code for the kibana-plugin CLI tool and it looks like it's trying to find a kibana.json file within the archive. Can you confirm that that exists within the root directory of the archive?

Hello @poff ,

yes, there is a kibana.json file within the root directory of the archive.

And following are the contents of the kibana.json file.

{
  "id": "myplugin",
  "version": "1.0.0",
  "kibanaVersion": "kibana",
  "server": true,
  "ui": true,
  "requiredPlugins": ["navigation"],
  "optionalPlugins": []
}

Thanks for helping me!

Any thoughts? anyone?

Hello,

How are you current building your plugin for production? You should be able to run yarn build from your plugin's directory if it was generated with our tooling. This will produce a fully built plugin that looks like:

image

I do see that you do not have a package.json file so this may not work for you. I'd recommend either generating a new plugin (node scripts/generate_plugin from the Kibana repository) and copying your code into it or adding a package.json file with these contents:

{
  "name": "my-plugin",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "yarn plugin-helpers build",
    "plugin-helpers": "node ../../scripts/plugin_helpers",
    "kbn": "node ../../scripts/kbn"
  }
}

Hello @joshdover,

Thanks for replying. So I have created development environment for kibana 7.13.3 using development guide. then I created a plugin called myplugin with following command.

node scripts/generate_plugin my_plugin_name # replaced "my_plugin_name" with my custom plugin name that I was already using with version 7.9.2.

Then I ran elasticsearch and Kibana dev. Everything worked alright. so I changed the plugin with my original plugin and It still works. so, that means my plugin is compatible with version 7.13.3.
The structure of plugin created by generate_plugin script is same as my custom plugin that I already have.

Then I downloaded ELK 7.13.3 for windows and ran the script to install the plugin.

Now, what I added package.json to my plugin as you said but now it gives following error.

C:\ELK7.13.3\kibana-7.13.3\bin>kibana-plugin install file:///C:/TEMP/myplugin.zip
Found previous install attempt. Deleting...
Attempting to transfer from file:///C:/TEMP/myplugin.zip
Transferring 27055 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation was unsuccessful due to error "Plugin myplugin[kibana] is incompatible with Kibana [7.13.3]"

This is not supposed to happend. because the same plugin is compatible with the development environment. why not compatible with regular environment?

Thanks.

Try updating the version in your kibana.json file to 7.13.3. I believe that should help.

Hi @joshdover,

I generated the plugin again, added data from my old plugin and changed the version to 7.13.3 in kibana.json. checked with development version and it is compatible and the new structure is like following.

but it still gives me the same errors

Found previous install attempt. Deleting...
Attempting to transfer from file:///C:/TEMP/myplugin.zip
Transferring 36888369 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation was unsuccessful due to error "Plugin myplugin[kibana] is incompatible with Kibana [7.13.3]"

Is there any way to get more information on what is happening or what is incompatible?

Thanks,