Skip to content

native-federation:build-notifications SSE connections block new browser tabs in development mode #1102

@nlegncn

Description

@nlegncn

Repository: native-federation-core or native-federation runtime


Summary

When running a Shell + multiple MFE applications in development mode using Native Federation,
opening 3+ browser tabs causes subsequent tabs to hang indefinitely until a previous tab is closed.
After investigation, the root cause is the persistent SSE (Server-Sent Events) connections created
by native-federation:build-notifications for each tab, which exhausts the browser's HTTP/1.1
parallel connection limit (6 connections per origin).

Image

Environment

"@angular-architects/native-federation": "21.0.4",
"@angular-devkit/core": "21.2.6",
"@angular/animations": "21.2.6",

  • OS: Windows
  • Setup: Shell + 4 Web Component MFEs (each using createApplication)

Steps to Reproduce

  1. Set up a Shell application with Native Federation
  2. Configure 1 or more MFE remotes loaded as Web Components
  3. Open the shell in a browser tab — tab loads successfully
  4. Open a second tab — loads successfully
  5. Open a third tab — hangs indefinitely
  6. Close any existing tab — the hanging tab immediately loads

Root Cause

In Chrome DevTools Network tab, filtering by native-federation:build-notifications reveals:

  • Each browser tab opens a persistent SSE (EventSource) connection to
    native-federation:build-notifications
  • These connections remain open (status: pending) for the entire lifetime of the tab
  • Chrome allows a maximum of 6 parallel HTTP/1.1 connections per origin
  • With a Shell + MFEs, each tab consumes 1-2 SSE connections
  • After 3 tabs, the connection pool is exhausted
  • New tabs cannot make any network requests — even the initial HTML document fetch is blocked
  • Angular never bootstraps — the page remains blank
  • When a tab is closed, its SSE connection is released and the blocked tab immediately loads

Key observation: This issue only occurs in development mode. In production builds,
native-federation:build-notifications does not exist, so the problem does not affect end users.


Network Evidence

Each open tab shows these persistent connections:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions