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

lib: Fix DynamicListForm's 'Maximum update depth exceeded' flake #19495

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

skobyda
Copy link
Contributor

@skobyda skobyda commented Oct 17, 2023

Fixes a flake, which is present at cockpit-project/cockpit-podman#1354 . It happens in about 10-20% of test runs:

Traceback (most recent call last):
  File "/work/bots/make-checkout-workdir/test/check-application", line 1645, in testRunImageSystem
    self._testRunImage(True)
  File "/work/bots/make-checkout-workdir/test/check-application", line 1797, in _testRunImage
    b.click('#run-image-dialog-volume-1-btn-close')
  File "/work/bots/make-checkout-workdir/test/common/testlib.py", line 385, in click
    self.mouse(selector + ":not([disabled]):not([aria-disabled=true])", "click", 0, 0, 0)
  File "/work/bots/make-checkout-workdir/test/common/testlib.py", line 378, in mouse
    self.call_js_func('ph_mouse', selector, event, x, y, btn, ctrlKey, shiftKey, altKey, metaKey)
  File "/work/bots/make-checkout-workdir/test/common/testlib.py", line 331, in call_js_func
    return self.eval_js("%s(%s)" % (func, ','.join(map(jsquote, args))))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/bots/make-checkout-workdir/test/common/testlib.py", line 309, in eval_js
    result = self.cdp.invoke("Runtime.evaluate", expression=code, trace=code,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/bots/make-checkout-workdir/test/common/cdp.py", line 204, in invoke
    res = self.command(cmd)
          ^^^^^^^^^^^^^^^^^
  File "/work/bots/make-checkout-workdir/test/common/cdp.py", line 231, in command
    raise RuntimeError(res["error"])
RuntimeError: Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

The minified react error is:

Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch! thanks for fixing!

@martinpitt martinpitt merged commit 01ae4cb into cockpit-project:main Oct 17, 2023
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants