You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A component that throws on first render breaks every test after it #21767
I use assert() in my components to tell other developers when they've used a component wrongly, e.g. a required argument is missing. I test those asserts, so I know the guidance actually fires:
classAvatarextendsComponent {
constructor() {
super(...arguments);
assert('@size must be set', this.args.size);
}
}
test('it asserts @size is set', asyncfunction (assert) {
setupOnerror((error) => {
assert.strictEqual(error.message, 'Assertion Failed: @size must be set');
});
awaitrender(<template><Avatar /></template>);
});
This used to work. Since upgrading to ember-source 7.3, the test still passes, but every test that runs after it logs:
Attempted to rerender, but the Ember application has had an unrecoverable error occur during render. You should reload the application after fixing the cause of the error.
In our app, five tests like this produce about a million warnings across the suite, so for now I've had to skip them.
A fresh Ember CLI 7.3.0 app with one test file added. Run pnpm test.
The first test renders a component that throws on its first render and handles it with setupOnerror. It uses a plain throw to keep it minimal, which behaves the same as assert(). The second test renders something unrelated and checks that nothing was logged.
😕 Actual Behavior
The second test fails because the warning is logged while it runs. On its own, it passes.
🤔 Expected Behavior
I can test that a component asserts on wrong usage, without it affecting the tests that run after it.
🌍 Environment
Ember: 7.3.1 (@ember/test-helpers 5.7.0)
Ember-CLI: 7.3.0
Node.js/npm: Node 24.16.0, pnpm 12.11.2
OS: macOS
Browser: Chrome 155
➕ Additional Context
This looks like the "second, related leak" mentioned in #21681. That issue was closed by a fix for a different problem, so I've opened this one to track it.
I also started seeing Attempted to rerender in ember-intl's test app, which has a few tests that use setupOnerror and resetOnerror to check assert from @ember/debug. The message can also be seen in a browser's console when we visit /tests.
Based on the recent CI run, if the regression had occurred in ember-source, it might have occurred between 6.0 and 6.12. (Open Test to see the logs.)
Activity
ijlee2 commentedon Oct 23, 2026
I also started seeing
Attempted to rerenderinember-intl's test app, which has a few tests that usesetupOnerrorandresetOnerrorto checkassertfrom@ember/debug. The message can also be seen in a browser's console when we visit/tests.Based on the recent CI run, if the regression had occurred in
ember-source, it might have occurred between6.0and6.12. (OpenTestto see the logs.)[email protected](message doesn't appear):[email protected](message appears)ember-source@release(message appears)NullVoxPopuli commentedon Oct 23, 2026
Thanks for the issue report and reproduction! I'm not yet at a computer, but can you see if this also affects canary/alpha?
amk221 commentedon Oct 23, 2026
passes in canary, possibly an accidental fix, not a targeted one
ijlee2 commentedon Oct 23, 2026
Same here.
NullVoxPopuli commentedon Oct 23, 2026
Legit, so something needs backported perhaps
Test that the owner releases a root whose first render threw
Test that the owner releases a root whose first render threw
NullVoxPopuli commentedon Nov 30, 2026
@ijlee2 / @amk221 can you check latest beta/canary/release patches? I forget if we got this backported
ijlee2 commentedon Dec 1, 2026
Attempted to rerenderstill appears in 6.12 and release (7.4), but not in beta and canary.