Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Enable Streaming SSR in mf modernjs app crashs on subscribe other mf module #6511

Open
yusa-imit opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@yusa-imit
Copy link

Version

System:
OS: Windows 11 10.0.22631
CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
Memory: 7.46 GB / 31.62 GB
Browsers:
Edge: Chromium (129.0.2792.89)
Internet Explorer: 11.0.22621.3527
npmPackages:
@modern-js/app-tools: 2.61.0 => 2.61.0
@modern-js/runtime: 2.61.0 => 2.61.0
@modern-js/tsconfig: 2.61.0 => 2.61.0

Details

What happend

Using Host app as Modern.js with module federation and ssr mode enabled as stream
Using remote app as React app build with rsbuild module federation

If modern.js ssr mode is enabled, modern.js's Module federation system will find something like globalSnapshot with function snapshotHandler.loadRemoteSnapshotInfo
What modernjs's Module Federation Plugin is looking for is looks like this (I got this from official double modern js module federation enhanced example)

{
"ssrRemoteEntry": {
      "name": "module.js",
      "path": "bundles",
      "type": "commonjs-module"
    }
}

which is not defined in mf-manifest.json generated by rsbuild's Module Federation Plugin

Expected behavior

Module federation module with not having ssr capability will act as csr component

Full Error Log when crash

Full Error log is listed below


[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Federation Runtime ] Warn [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
error   Server Error - Internal server error, error = Error: [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1), req.url = http://localhost:9000/, req.headers = {
  accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
  'accept-encoding': 'gzip, deflate, br, zstd',
  'accept-language': 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7',
  connection: 'keep-alive',
  host: 'localhost:9000',
  'sec-ch-ua': '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
  'sec-ch-ua-mobile': '?0',
  'sec-ch-ua-platform': '"Windows"',
  'sec-fetch-dest': 'document',
  'sec-fetch-mode': 'navigate',
  'sec-fetch-site': 'none',
  'sec-fetch-user': '?1',
  'upgrade-insecure-requests': '1',
  'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36'
}
error   Error: [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Module Federation Dev Server ] Error [ Federation Runtime ]: [ Federation Runtime ]: The attribute remoteEntry of remote must not be undefined.
    at Object.error (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\share.cjs.js:25:1)
    at assignRemoteInfo (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:727:1)
    at Array.afterResolve (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:746:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at RemoteHandler.getRemoteModuleAndOptions (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1697:1)
    at initRemoteModule (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1352:1)
    at async Promise.all (index 0)
    at D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1225:1
    at async Promise.all (index 0)
    at SharedHandler.loadShare (D:\codespace\ssrmodernjs-rsbuild-error-reproduction\node_modules\.pnpm\@[email protected]\node_modules\@module-federation\runtime\dist\index.cjs.js:1224:1)
[ Module Federation Dev Server ] Error Process(43248) unhandledRejection, mf server will exit...

Process finished with exit code 1


Reproduce link

https://github.com/yusa-imit/ssr-modern-js-rsbuild-error-reproduction

Reproduce Steps

  1. execute pnpm dev in apps/rsbuild
  2. execute pnpm dev in apps/modernjs
  3. then open http://localhost:9000 for modernjs app's index page
@yusa-imit yusa-imit added the bug Something isn't working label Nov 7, 2024
@yusa-imit yusa-imit changed the title [Bug]: Enable Streaming SSR in modernjs app crashs on subscribe rsbuild module [Bug]: Enable Streaming SSR in mf modernjs app crashs on subscribe other mf module Nov 7, 2024
@zllkjc
Copy link
Member

zllkjc commented Nov 7, 2024

Great issue! @2heal1 help~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants