You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been experiencing temporary outages which only occur on prod after starting a new container, or MFE revalidation where loadRemote is unable to fetch a remote MFE, even though the remote is published and no changes since the last deploy. The root cause of the loadRemote failures is a separate topic - this issue deals with the fact that our retry logic is currently unable to mitigate the issue - instead once loadRemote fails, it will continue to fail no matter how many times you call it.
IMPORTANT DISCLAIMER: Our setup uses nextjs-mf plugin and we rely on SSR for our MFEs. We're aware that it's deprecated. This is particularly relevant to this bug because the server side MFE imports (loadRemote) will fail until the node process is restarted.
After investigating, I found that the same promise is returned from loadRemote, and after diving into the code identified the handle function in @module-federation/node's runtimePlugin. I am opening a PR to address, however I'm not sure the full implications of the change, and want to discuss if it's appropriate or a different solution would work.
*Note - I also tried out using the retry plugin available from the core package and had the same issue.
I have created one more PR related to this issue : #3729
... this one will tell you which file failed to load. In addition I created some unit tests for my first change.
Describe the bug
We have been experiencing temporary outages which only occur on prod after starting a new container, or MFE revalidation where
loadRemote
is unable to fetch a remote MFE, even though the remote is published and no changes since the last deploy. The root cause of theloadRemote
failures is a separate topic - this issue deals with the fact that our retry logic is currently unable to mitigate the issue - instead onceloadRemote
fails, it will continue to fail no matter how many times you call it.I have created a sample repository to demo the bug here :
https://github.com/nameofname/next-module-federation/tree/master/fix-chunk-retries
IMPORTANT DISCLAIMER: Our setup uses
nextjs-mf
plugin and we rely on SSR for our MFEs. We're aware that it's deprecated. This is particularly relevant to this bug because the server side MFE imports (loadRemote
) will fail until the node process is restarted.After investigating, I found that the same promise is returned from
loadRemote
, and after diving into the code identified the handle function in@module-federation/node
's runtimePlugin. I am opening a PR to address, however I'm not sure the full implications of the change, and want to discuss if it's appropriate or a different solution would work.*Note - I also tried out using the retry plugin available from the core package and had the same issue.
Reproduction
https://github.com/nameofname/next-module-federation/tree/master/fix-chunk-retries
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: