Skip to content

Node/SSR remote-entry load failures do not trigger loadEntryError #4963

Description

@dmchoi77

Describe the bug

With @module-federation/runtime@2.8.1, a Node/SSR host that cannot fetch a remote entry receives a generic Federation error instead of RUNTIME-008, and the loadEntryError lifecycle hook is not emitted.

In the Node path, loadEntryNode catches the failed remote-entry download and rethrows a generic error. The outer loader only emits loadEntryError when the error contains RUNTIME_008 (formatted as RUNTIME-008).

As a result, retry logic relying on this lifecycle hook—including retry attempts, domain failover, and cache-busting URL rewrites—cannot start for SSR transport failures.

The reproduction intentionally isolates error classification and lifecycle dispatch. It does not depend on a framework or assert framework rendering behavior.

Observed output:

{
  "loadSucceeded": false,
  "hasRuntime008": false,
  "loadEntryErrorHookCalls": 0
}

Expected behavior:

  • A remote-entry download/transport failure should be classified through the standard retryable remote-entry error path.
  • loadEntryError should be emitted so retry plugins can handle the failure.
  • Remote-entry execution errors should remain distinguishable and should not be retried automatically.

Affected versions/configuration:

  • @module-federation/runtime@2.8.1
  • @module-federation/runtime-core@2.8.1
  • Node/SSR runtime
  • Node.js 24.19.0
  • pnpm 10.28.0

Reproduction

https://github.com/dmchoi77/ssr-remote-entry-load-error-repro

Used Package Manager

pnpm

System Info

OS: macOS
Node.js: v24.19.0
pnpm: 10.28.0
Package: @module-federation/runtime-core@2.8.1

Validations

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