Skip to content
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

JS error page after creating a extractor #5948

Closed
kmerz opened this issue May 16, 2019 · 0 comments · Fixed by #5954

Comments

@kmerz
Copy link
Member

commented May 16, 2019

Expected Behavior

After creating a extractor the user should be redirected to the overview of extractors.

Current Behavior

After clicking create of an extractor you will get shown an error page containing:

mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `input`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.

This sometimes also occurs when clicking on manage extractors on the inputs overview page.

Your Environment

  • Graylog Version: pre 3.1.0 (1067b23)
  • Browser version: Chrome 74.0

@florianvolle florianvolle added this to the 3.1.0 milestone May 20, 2019

dennisoelkers added a commit that referenced this issue May 21, 2019
Do not initialize `inputs` variable to prevent merging duplicate key.
This change is fixing an issue that is related to the introduction of
its supplied state even during first initialization, leading to an
attempt to merge a duplicate key when mounting the `ExtractorsPage`
component. Removing the `inputs` key in the initial state of that
component is fixing it.

Fixes #5948.

@kmerz kmerz closed this in #5954 May 21, 2019

kmerz added a commit that referenced this issue May 21, 2019
Do not initialize `inputs` variable to prevent merging duplicate key …
…in. (#5954)

* Do not initialize `inputs` variable to prevent merging duplicate key.

This change is fixing an issue that is related to the introduction of
its supplied state even during first initialization, leading to an
attempt to merge a duplicate key when mounting the `ExtractorsPage`
component. Removing the `inputs` key in the initial state of that
component is fixing it.

Fixes #5948.

* Fixing linter hint by simplifying node change handler.

* Replace connecting component to `InputsStore` with single action call.

Last commits were fixing the issue only partly. It turns out, that the
`InputsStore` relies on an internal state (calling `get` with an input
id) to return the correct input in the `input` key of its state.
Therefore the extractors page was returning the extractors of the last
opened input instead of the current one.

This change is replacing the `connect` call with a single call to the
`get` action and sets the current input in the callback of the promise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.