ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Crash during destroy in fastboot

Open ef4 opened this issue 3 months ago • 1 comments

In ember-auto-import's test suite, we have several tests that combine fastboot and ember-canary that crash during the destroy() phase after successfully rendering a fastboot response.

This seems to have started since https://github.com/emberjs/ember.js/pull/20974. I patched out that one change and it makes the bug go away.

The crash happens because @ember/component has willDestroy logic that looks up an injected renderer, and that logic is now running after the Container has already been destroyed, thus hitting the assertion against doing lookups on a destroyed container.

When the crash happens, the ApplicationInstance has isDestroying===true && isDestroyed==false, but the Container that backs the ApplicationInstance is already isDestroyed==true.

No crash happens in the browser tests. Those initialize destruction from a different place than fastboot does though, which may explain the difference.

ef4 avatar Sep 23 '25 18:09 ef4

@mansona and I are debugging this and found that the issue only happens with @ember/components

Repro: https://github.com/NullVoxPopuli/ember-6-8-fastboot-cleanup-reproduction

NullVoxPopuli avatar Nov 06 '25 17:11 NullVoxPopuli