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

Duplicate network request for chunk from multiple entryfiles #2644

Closed
satheesh66 opened this issue Jun 24, 2024 · 7 comments
Closed

Duplicate network request for chunk from multiple entryfiles #2644

satheesh66 opened this issue Jun 24, 2024 · 7 comments

Comments

@satheesh66
Copy link

satheesh66 commented Jun 24, 2024

Thanks for the fix #2569 @zhoushaw @2heal1.

But the issue is not fully resolved still I am facing a duplicate request issue even after updating @module-federation/[email protected]

image image image

In the above screenshots, you can see the same chunk requested by multiple times (check the initiator chain in those requests)

the first request from the initial host's entry.js file and further requests from other services entry.js they have also used that chunk.

let me know if miss any thing! Thanks

@ScriptedAlchemy @2heal1 @zhoushaw

Originally posted by @satheesh66 in #2569 (comment)

@ScriptedAlchemy
Copy link
Member

Do you have a repo we can debug?

Are you using the runtime directly or using the federation plugin.

Need to know use and consumption

Copy link
Contributor

Hello @satheesh66. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 5 days.

@satheesh66
Copy link
Author

Do you have a repo we can debug?

Are you using the runtime directly or using the federation plugin.

Need to know use and consumption

We are using hybrid mode some services are loaded from build time and some services are loaded from runtime. this is our prod setup I can't recreate this issue in a small setup, will try to add minimal reproduction code.

@ScriptedAlchemy

@satheesh66
Copy link
Author

satheesh66 commented Jun 26, 2024

The total number of network requests is 220 while loading the home page with module federation V1 but in V2 the requests number goes to 370, we don't know the root cause and I can't reproduce this issue in the small snippet everything works in the small setup but not in our product code.

let me know how can I debug and recreate this issue.

I have tried to recreate the issue with this code https://github.com/satheesh66/module-federation-v2 but I can't.

@ScriptedAlchemy @zhoushaw

Copy link
Contributor

github-actions bot commented Jul 2, 2024

As the issue was labelled with need reproduction, but no response in 5 days. This issue will be closed. Feel free to comment and reopen it if you have any further questions. For background, see Why reproductions are required.

由于该 issue 被标记为 "需要重现",但在 5 天内没有回应,因此该 issue 将被关闭。如果你有任何进一步的问题,请随时发表评论并重新打开该 issue。背景请参考 为什么需要最小重现

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
@WeetA34
Copy link

WeetA34 commented Jul 4, 2024

Hello,
i have a similar issue with an internal vue3 project using module federation runtime.
1 of 3 tools consumed on a host site through runtime and getPublicPath has this issue.
vendors js and css files are fetched from the proper consumed tool url first but for some reason a second request is done on host url.
I'll try to create a smaller repro project.

@WeetA34
Copy link

WeetA34 commented Jul 27, 2024

Hello @ScriptedAlchemy,

here is a repro project following my previous post: https://github.com/WeetA34/mf-double-calls-repro.
As you can see in README screenshots, the exposed component css is fetched twice:

  • once from provider url (OK)
  • once from consumer url (KO, home page is returned by rsbuild dev)

It's probably not the exact same issue as @satheesh66 but it doesn't seem to be an expected behavior.
It does the same with vendors js when presents which generates a real issue.

Thank you

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

No branches or pull requests

3 participants