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

Loading inputs page fails after loading outputs page #1789

Closed
edmundoa opened this Issue Feb 9, 2016 · 0 comments

Comments

Projects
None yet
4 participants
@edmundoa
Member

edmundoa commented Feb 9, 2016

On the current master, loading the System/Inputs page after loading System/Output causes an exception in the browser. Here is the output:

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of `InputForm`.

Unhandled rejection Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `InputForm`.
    at invariant (http://localhost:8080/build/vendor.js:47230:16)
    at instantiateReactComponent [as _instantiateReactComponent] (http://localhost:8080/build/vendor.js:11638:135)
    at ReactCompositeComponentMixin.mountComponent (http://localhost:8080/build/vendor.js:40333:37)
    at wrapper [as mountComponent] (http://localhost:8080/build/vendor.js:5007:22)
    at Object.ReactReconciler.mountComponent (http://localhost:8080/build/vendor.js:6191:36)
    at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (http://localhost:8080/build/vendor.js:43782:45)
    at ReactDOMComponent.Mixin._createContentMarkup (http://localhost:8080/build/vendor.js:41456:33)
    at ReactDOMComponent.Mixin.mountComponent (http://localhost:8080/build/vendor.js:41344:30)
    at Object.ReactReconciler.mountComponent (http://localhost:8080/build/vendor.js:6191:36)
    at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (http://localhost:8080/build/vendor.js:43782:45)
    at ReactDOMComponent.Mixin._createContentMarkup (http://localhost:8080/build/vendor.js:41456:33)
    at ReactDOMComponent.Mixin.mountComponent (http://localhost:8080/build/vendor.js:41344:30)
    at Object.ReactReconciler.mountComponent (http://localhost:8080/build/vendor.js:6191:36)
    at ReactCompositeComponentMixin.mountComponent (http://localhost:8080/build/vendor.js:40335:35)
    at wrapper [as mountComponent] (http://localhost:8080/build/vendor.js:5007:22)
    at Object.ReactReconciler.mountComponent (http://localhost:8080/build/vendor.js:6191:36)

Debugging the issue, I saw that Webpack is returning a different ConfigurationForm element on the render method of the InputForm component when a user visited the outputs page than when they didn't.

I also saw that changing the import as follows "fixes" the issue:

diff --git a/graylog2-web-interface/src/components/inputs/InputForm.jsx b/graylog2-web-interface/src/components/inputs/InputForm.jsx
index 1256762..65670ab 100644
--- a/graylog2-web-interface/src/components/inputs/InputForm.jsx
+++ b/graylog2-web-interface/src/components/inputs/InputForm.jsx
@@ -6,7 +6,7 @@ import NodesStore from 'stores/nodes/NodesStore';

 import { Spinner } from 'components/common';
 import { NodeOrGlobalSelect } from 'components/inputs';
-import { ConfigurationForm } from 'components/configurationforms';
+import ConfigurationForm from 'components/configurationforms/ConfigurationForm';

 const InputForm = React.createClass({
   propTypes: {

@bernd could also reproduce this error, so it shouldn't be related to any changes in my local workspace.

@edmundoa edmundoa added bug web labels Feb 9, 2016

@edmundoa edmundoa added this to the 2.0.0 milestone Feb 9, 2016

@dennisoelkers dennisoelkers self-assigned this Feb 10, 2016

@bernd bernd added S1 P1 labels Feb 11, 2016

@edmundoa edmundoa closed this in ab2e048 Feb 11, 2016

@kroepke kroepke added the triaged label Sep 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment