opened
runspired
username_0
I bumped into this bug while working to update smoke-and-mirrors and have isolated it to a replication here: https://ember-twiddle.com/8919375a62be789878e0c5162a97da84?openFiles=components.parent-component.js%2Ctemplates.components.child-component.hbs

This is a bug in two parts.

The setup for **part 1** is roughly this:

- a parent has a child component
- the child registers itself to the parent during the child's `init`
- the parent updates a property that should reflected into the ui on the child during the parent's `didInsertElement`

At this point, the ui will silently fail to update.  The update failure is expected for glimmer2, I'm not sure the silent part is, but we're updating from the parent's `didInsertElement` hook not the child's.

**Part 2** is where this comes from occasional heisenbug to serious heisenbug for complex component setups.

- schedule the same property update via `run.next` in `didInsertElement`
- DO NOT remove the original property update.

While this is a contrived example (the dev can see that they've set the property and then attempt to set it again identically within the `run.next`, it also exposes a common complexity, and the dev may not be able to see this so clearly in practice.

Using `run.next`, the UI state will still silently fail to update.  Remove the initial (non `run.next`) set to see the state be correctly reflected into the ui.
Glimmer2 render no-op heisenbug (with certainty)
issue
created
Serabe
username_1
Thank you for the really well documented report!
comment
created
runspired
username_0
Per @krisselden this tracks to [this change](https://github.com/emberjs/ember.js/commit/1a5e9c4e4710da71ab6f283c04fc2b3dfb7b2b1b#diff-81a6bd748241dc482155a442e12bc32eR195) by @rwjblue to add support for multiple roots. There is a new plan in place for multiple roots so we should be able to both have multiple roots and not error silently here.
comment
closed
chancancode
username_2
issue
created
chancancode
username_2
Fixed in #14427
comment