-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kibana Plugins Cause Fatal Error #12707
Comments
Those plugins need to be updated to work with 5.5.0. It's not simply a version bump (though they'll need that as well), as they are trying to import functions from within Kibana that are no longer exposed in the same way. That plugins can break in this way is exactly why we say that plugins must specify an exact version of Kibana that they have been tested to be compatible with. I recommend reaching out to the plugin authors directly and seeing if/when they'll be able to update their plugin to be compatible with 5.5. |
@epixa |
@fbaligand Unfortunately we don't know exactly what change is causing this issue, so I can't provide exact guidelines. Based on the error message, I believe the issue might have something to do with the relatively recent change (an effort that started in 5.4.0 and continued into 5.5.0) in Kibana to move from default exports to named exports. e.g. export default function myFunction() {}
import myFunction from './mymodule';
// becomes:
export function myFunction() {}
import { myFunction } from './mymodule'; This was spread across a ton of pull requests, but here's one of them for a concrete example: #11165 This happened for all of the |
is this the syntax you mean? so the solution is to update import statements in the root
diff --git a/src/ui/public/vislib_vis_type/vislib_vis_type.js b/src/ui/public/vislib_vis_type/vislib_vis_type.js
index b042b2981..81813b028 100644
--- a/src/ui/public/vislib_vis_type/vislib_vis_type.js
+++ b/src/ui/public/vislib_vis_type/vislib_vis_type.js
@@ -5,51 +5,64 @@ import 'plugins/kbn_vislib_vis_types/controls/point_series_options';
import 'plugins/kbn_vislib_vis_types/controls/line_interpolation_option';
import 'plugins/kbn_vislib_vis_types/controls/heatmap_options';
import 'plugins/kbn_vislib_vis_types/controls/point_series';
-import VisVisTypeProvider from 'ui/vis/vis_type';
-import AggResponsePointSeriesPointSeriesProvider from 'ui/agg_response/point_series/point_series';
+import 'plugins/kbn_vislib_vis_types/controls/gauge_options';
+import { VisVisTypeProvider } from 'ui/vis/vis_type';
+import { AggResponsePointSeriesProvider } from 'ui/agg_response/point_series/point_series';
import VislibVisTypeVislibRenderbotProvider from 'ui/vislib_vis_type/vislib_renderbot';
-export default function VislibVisTypeFactory(Private) {
+
+export function VislibVisTypeVislibVisTypeProvider(Private) {
const VisType = Private(VisVisTypeProvider);
- const pointSeries = Private(AggResponsePointSeriesPointSeriesProvider);
+ const pointSeries = Private(AggResponsePointSeriesProvider);
const VislibRenderbot = Private(VislibVisTypeVislibRenderbotProvider);
|
Thanks @epixa for your answer. |
@seoa @RMKD |
Changes from default exports to named exports to support Kibana 5.5.0 (elastic/kibana#12707)
@fbaligand Thanks. I migrated my code accordingly and I have now a working traffic light visualizer for Kibana 5.5. https://github.com/snuids/TrafficLightVisKibana5.5 |
Kibana version: 5.5.0
Elasticsearch version: 5.5.0
Server OS version: macOS Sierra 10.12.5
Browser version: Safari 10.1.1
Browser OS version: macOS Sierra 10.12.5
Original install method (e.g. download page, yum, from source, etc.): homebrew
Description of the problem including expected versus actual behavior: I had plugins that were working fine in 5.4.x that now throw a fatal error in the updated 5.5.0 version of kibana/elasticsearch. I have tried installing various plugins and they all throw the same error. Changing the version element to "5.5.0" in package.json inside the plugins did not help.
Steps to reproduce:
Errors in browser console (if relevant):
Error: TypeError: undefined is not an object (evaluating '_modules2["default"].get') (http://localhost:5601/bundles/kibana.bundle.js?v=1:282)
onerror@http://localhost:5601/bundles/commons.bundle.js?v=1:90:20889
Provide logs and/or server output (if relevant):
The text was updated successfully, but these errors were encountered: