Installing plugin

I have a plugin generated with the dev version, and I want to install it to kibana 7.8.0. I ran the scripts and it installed fine.

This is the error when opening Kibana after the installation.
I built the plugin with the generator, and when finished I "yarn build" and installed that zip.
This is the server log:

    >kibana.bat
      log   [14:11:54.809] [warning][plugins-discovery] Expect plugin "id" in camelCase, but found: triggers_actions_ui
      log   [14:11:54.816] [warning][plugins-discovery] Expect plugin "id" in camelCase, but found: apm_oss
      log   [14:12:18.863] [info][plugins-service] Plugin "endpoint" is disabled.
      log   [14:12:18.868] [info][plugins-service] Plugin "ingestManager" is disabled.
      log   [14:12:18.870] [info][plugins-service] Plugin "lists" is disabled.
      log   [14:12:18.876] [info][plugins-service] Plugin "visTypeXy" is disabled.
      log   [14:12:23.205] [warning][legacy-service] Some installed third party plugin(s) [xpack_main, monitoring, reporting, spaces, security, dashboard_mode, beats_management, maps, task_manager, encryptedSavedObjects, ingestManager, apm_oss, status_page, newsfeed, elasticsearch, ui_metric, console_legacy, timelion, tile_map, kibana, region_map] are using the legacy plugin format and will no longer work in a future Kibana release. Please refer to https://ela.st/kibana-breaking-changes-8-0 for a list of breaking changes and https://ela.st/kibana-platform-migration for documentation on how to migrate legacy plugins.
      log   [14:12:23.324] [info][plugins-system] Setting up [95] plugins: [usageCollection,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaLegacy,devTools,taskManager,ossTelemetry,licensing,observability,eventLog,encryptedSavedObjects,code,uiActions,statusPage,share,mapsLegacy,mapsLegacyLicensing,newsfeed,charts,kibanaReact,kibanaUtils,inspector,embeddable,advancedUiActions,embeddableEnhanced,drilldowns,indexPatternManagement,esUiShared,discover,bfetch,expressions,data,home,apm_oss,console,consoleExtensions,cloud,management,upgradeAssistant,reporting,licenseManagement,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,advancedSettings,telemetryManagementSection,watcher,searchprofiler,painlessLab,grokdebugger,visualizations,visTypeVega,visTypeVislib,visTypeTimelion,features,security,snapshotRestore,transform,ingestPipelines,canvas,visTypeTagcloud,visTypeMarkdown,visTypeTimeseries,rollup,visTypeMetric,visTypeTable,inputControlVis,savedObjects,navigation,lens,graph,visualize,dashboard,savedObjectsManagement,spaces,actions,case,alerting,alertingBuiltins,triggers_actions_ui,uptime,ml,apm,dashboardEnhanced,exportsearch,fileUpload,maps,siem,dataEnhanced,infra,monitoring,logstash,translations]
      log   [14:12:23.349] [warning][config][encryptedSavedObjects][plugins] Generating a random key for xpack.encryptedSavedObjects.encryptionKey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml
      log   [14:12:23.929] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
      log   [14:12:23.930] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
      log   [14:12:24.018] [warning][actions][actions][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.
      log   [14:12:24.037] [warning][alerting][alerting][plugins][plugins] APIs are disabled due to the Encrypted Saved Objects plugin using an ephemeral encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml.
      log   [14:12:24.186] [info][monitoring][monitoring][plugins] config sourced from: production cluster
      log   [14:12:24.188] [warning][monitoring][monitoring][plugins] X-Pack Monitoring Cluster Alerts will not be available: undefined
      log   [14:12:24.299] [info][crossClusterReplication][plugins] Your basic license does not support crossClusterReplication. Please upgrade your license.
      log   [14:12:24.301] [info][plugins][watcher] Your basic license does not support watcher. Please upgrade your license.
      log   [14:12:24.315] [info][kibana-monitoring][monitoring][monitoring][plugins] Starting monitoring stats collection
      log   [14:12:24.542] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
      log   [14:12:24.562] [info][savedobjects-service] Starting saved objects migrations
      log   [14:12:24.643] [info][plugins-system] Starting [73] plugins: [usageCollection,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaLegacy,taskManager,ossTelemetry,licensing,observability,eventLog,encryptedSavedObjects,code,share,discover,bfetch,expressions,data,home,apm_oss,console,consoleExtensions,cloud,management,upgradeAssistant,reporting,licenseManagement,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,advancedSettings,watcher,searchprofiler,painlessLab,grokdebugger,visualizations,visTypeVega,visTypeVislib,visTypeTimelion,features,security,snapshotRestore,transform,ingestPipelines,canvas,visTypeTagcloud,visTypeMarkdown,visTypeTimeseries,rollup,visTypeMetric,visTypeTable,inputControlVis,lens,graph,visualize,dashboard,savedObjectsManagement,spaces,actions,case,alerting,alertingBuiltins,uptime,ml,apm,exportsearch,fileUpload,siem,dataEnhanced,infra,monitoring,logstash,translations]
      log   [14:12:37.705] [info][status][plugin:kibana@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:47.820] [info][status][plugin:elasticsearch@7.8.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
      log   [14:12:47.903] [info][status][plugin:elasticsearch@7.8.0] Status changed from yellow to green - Ready
      log   [14:12:47.907] [info][status][plugin:xpack_main@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:47.927] [info][status][plugin:monitoring@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:47.933] [warning][plugins][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in kibana.yml
      log   [14:12:47.936] [info][plugins][reporting] Chromium sandbox provides an additional layer of protection, and is supported for Win32 OS. Automatically enabling Chromium sandbox.
      log   [14:12:48.941] [info][status][plugin:reporting@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:48.986] [info][status][plugin:spaces@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:48.989] [info][status][plugin:security@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:48.992] [info][status][plugin:dashboard_mode@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:48.996] [info][status][plugin:beats_management@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.053] [info][status][plugin:maps@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.076] [info][plugins][taskManager][taskManager] TaskManager is identified by the Kibana UUID: abd65e78-17fa-425f-a8d4-5cb15da52230
      log   [14:12:49.078] [info][status][plugin:task_manager@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.081] [info][status][plugin:encryptedSavedObjects@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.088] [info][status][plugin:apm_oss@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.093] [info][status][plugin:ui_metric@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.101] [info][status][plugin:console_legacy@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.107] [info][status][plugin:region_map@7.8.0] Status changed from uninitialized to green - Ready
      log   [14:12:49.111] [info][listening] Server running at http://localhost:5601
      log   [14:12:49.512] [info][server][Kibana][http] http server running at http://localhost:5601

This error message is telling you that your custom plugin is not providing the right type of initialization code. You might be missing a kibana.json manifest, or maybe your plugin doesn't have a default export.

Hi, I have the kibana.json:

{
  "id": "exportsearch",
  "version": "1.0.0",
  "kibanaVersion": "7.8.0",
  "server": true,
  "ui": true,
  "requiredPlugins": [
    "navigation",
    "data"
  ],
  "optionalPlugins": [ ]
}

What do you mean by the default export?
I've generated the plugin with the node plugin generator and the export using yarn build.

You have defined both a server and ui. Do you have a default function exported from your index.js file in exportsearch/public/index.js and exportsearch/server/index.js

Yes, I do.
Still getting the same problem, even though the plugin worked fine in the development

Hi, Omer. I'm afraid you will have to update Kibana to v7.10 to able to use plugin-helpers because optimizer is not shipped with Kibana anymore. Use it to build a distributable version of your plugin.

I built the plugin with the kibana Dev which is version 8.0.0 alpha I think,
Why doesn't it support the previous Kibana versions?
And what do you mean by the optimizer/ plugin helpers? Like the link attached, I built the plugin with the node generator script, and zipped with yarn build.

So I downloaded kibana dev 7.10, and created the plugin again, zipped and put in 7.8.0 but still get the error

Kibana plugin support has been added in v7.10 It's not compatible with the legacy plugin system used in v7.8

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