Skip to content

fix: symbolicate Module Federation remote stack frames - #1434

Open
MikitasK wants to merge 3 commits into
callstack:mainfrom
MikitasK:fix/federated-source-map-symbolication
Open

fix: symbolicate Module Federation remote stack frames#1434
MikitasK wants to merge 3 commits into
callstack:mainfrom
MikitasK:fix/federated-source-map-symbolication

Conversation

@MikitasK

@MikitasK MikitasK commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1433

Fixes development stack-trace symbolication for Module Federation bundles served by a separate Re.Pack dev server.

Previously, the host tried to find remote source maps in its own compiler assets, resulting in:

Source map for __federation_expose_MiniAppNavigator.chunk.bundle is missing

this change:

  • follows remote bundle’s declared sourceMappingURL
  • supports both Rspack & Webpack dev servers
  • symbolicates frames independently so one invalid frame doesn't discard complete stack
  • handles malformed generated webpack:// source URLs
  • uses matching source map’s sourcesContent for code frames
  • isolates source-map consumers between concurrent requests
  • logs first useful symbolicated runtime frame as a terminal fallback
  • affects development tooling only & doesn't modify production bundles

Recording

mf_error_symbolication_fix.mp4

Test Plan

  1. open apps/tester-federation-v2
  2. add an error inside mini app:
throw new Error('MINI APP ERROR');
  1. start both dev servers:
pnpm --filter tester-federation-v2 start:hostapp
pnpm --filter tester-federation-v2 start:miniapp
  1. run the application:
pnpm --filter tester-federation-v2 ios
pnpm --filter tester-federation-v2 android
  1. navigate to the mini app & verify that:
  • error overlay points to the original mini-app source file
  • correct source code frame is displayed
  • pressing stack frame opens correct source file
  • terminal logs symbolicated source location
  • no source map is missing error is reported for the remote chunk
  1. run automated checks:
pnpm --filter @callstack/repack test
pnpm --filter @callstack/repack typecheck
pnpm --filter @callstack/repack build
pnpm --filter @callstack/repack-dev-server test
pnpm --filter @callstack/repack-dev-server typecheck
pnpm --filter @callstack/repack-dev-server build

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

@MikitasK is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 29e9687

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Patch
@callstack/repack-dev-server Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module Federation remote errors aren't symbolicated by the host dev server

1 participant