Skip to content

Crash during destroy in fastboot #20984

@ef4

Description

@ef4

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 #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions