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
If the remote is offline, a fetch error is thrown:
[ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: [ Federation Runtime ]: Failed to get manifestJson for remote1. The manifest URL is http://localhost:8081/mf-manifest.json. Please ensure that the manifestUrl is accessible.
Error message:
TypeError: Failed to fetch
Even if a errorLoadRemote hook is configured to catch the error, it still fails:
exportdefaultfunction(){constgetErrorMessage=(id,error)=>`remote ${id} is offline due to error: ${error}`;constgetModule=(pg,from)=>{if(from==='build'){return()=>({__esModule: true,default: pg,});}else{return{default: pg,};}};return{name: 'offline-remote-plugin',errorLoadRemote({id, error, from}){console.error(id,'offline');constpg=function(){console.error(id,'offline',error);returngetErrorMessage(id,error);};returngetModule(pg,from);},};}
If the error is catched when using the loadRemote function, it also fails:
awaitloadRemote("remote1/HelloWorld.jsx").then(mod=>{console.log("Loaded remote 1",mod);}).catch(()=>console.log("Failed to load remote 1"));
BUT, if I update the remote configuration to fetch a remoteEntry.js file instead of a manifest file, everything works as expected, the error is catched by either the errorLoadRemote hook or the catch handler:
Describe the bug
When trying to fetch the manifest file of a remote with the following configuration:
If the remote is offline, a fetch error is thrown:
Even if a
errorLoadRemote
hook is configured to catch the error, it still fails:If the error is catched when using the
loadRemote
function, it also fails:BUT, if I update the remote configuration to fetch a
remoteEntry.js
file instead of a manifest file, everything works as expected, the error is catched by either theerrorLoadRemote
hook or thecatch
handler:Reproduction
https://github.com/patricklafrance/mf-enhanced-manifest-bug
Used Package Manager
pnpm
System Info
Validations
The text was updated successfully, but these errors were encountered: