repack
repack copied to clipboard
Production remote bundles fails to load without any error message
Environment
We are using ChunkManager APIs of module-federation to load remote bundles. We tried in both iOS and android platforms but faced same issue on both.
Description
We are using following command to create production bundles (container and chunk bundles). Then we load these bundles, as remote bundles, but they fails to load and we are stuck at loading state.
STANDALONE=1 react-native webpack-bundle --platform ios --dev false --entry-file index.js --bundle-output bundle/index.bundle
Where as if we run the same code, but with development bundles created using following command they are loaded properly. Note the difference in both commands is - --dev true/ false
STANDALONE=1 react-native webpack-bundle --platform ios --dev true --entry-file index.js --bundle-output bundle/index.bundle
Reproducible Demo
We are using following example to load remote bundles, using ChunkManager APIs of repack module-federation. https://github.com/zamotany/module-federation-repack
Any help will be highly appreciated.
Thank you!
Any errors in terminal, logcat or Console.app? Also are you trying to run host app or individual apps?
There is nothing in the logs. Please find below the logs from terminal (running host server webpack/repack) and logcat. Please note we have removed the actual s3 link and android package Id from the logs.
We are running host app on local machine, and widget apps bundles are created using the command mentioned in the above post and hosted in AWS S3 bucket. We also tried hosing the widget apps bundles in localhost, but same results.
Terminal log -
[02:53:26.481Z][DevServerProxy] response received
[02:53:33.939Z][Console] i18next::translator: missingKey en-US host route.NAVIGATION_HOME_KEY route.NAVIGATION_HOME_KEY
[02:53:33.944Z][Console] i18next::translator: missingKey en-US host route.NAVIGATION_FARMS_AND_FIELDS_KEY route.NAVIGATION_FARMS_AND_FIELDS_KEY
[02:53:34.668Z][Console] main | widget2 | <aws s3 link>/widget2.container.bundle
[02:53:37.169Z][Console] main | widget1 | <aws s3 link>/widget1.container.bundle
Logcat log -
ReactNativeJS: 'i18next::translator: missingKey', 'en-US', 'host', 'route.NAVIGATION_HOME_KEY', 'route.NAVIGATION_HOME_KEY'
ReactNativeJS: 'i18next::translator: missingKey', 'en-US', 'host', 'route.NAVIGATION_FARMS_AND_FIELDS_KEY', 'route.NAVIGATION_FARMS_AND_FIELDS_KEY'
ReactNativeJS: main | widget2 | <aws s3 link prefix>widget2.container.bundle
.mxp.host.stag: Background young concurrent copying GC freed 82288(3612KB) AllocSpace objects, 1(16KB) LOS objects, 0% free, 18MB/18MB, paused 7.081ms total 91.494ms
.mxp.host.stag: Background concurrent copying GC freed 9336(2495KB) AllocSpace objects, 4(9024KB) LOS objects, 33% free, 11MB/17MB, paused 594us total 116.229ms
ReactNativeJS: main | widget1 | <aws s3 link prefix>widget1.container.bundle
This complete setup works if we just change the --dev flag to true in the webpack-bundle
command. Also, when we build the bundle using with --dev true --minify true
they again works.
Can you post configuration for webpack.container.ModuleFederationPlugin
s and a config for ChunkManager.configure
?
Am also stuck on this, host app load containers properly in development mode but is stuck loading while fetching the container from a remote server. (for testing the remote container is hosted on Cloudinary). is there any configuration am missing???
This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.
This issue has been automatically closed because it has been inactive for more than 14 days. Please reopen if you want to add more context.
Hello, have you found a solution for this issue yet? I'm currently experiencing the same problem.
https://github.com/callstack/repack/issues/505
Environment
We are using ChunkManager APIs of module-federation to load remote bundles. We tried in both iOS and android platforms but faced same issue on both.
Description
We are using following command to create production bundles (container and chunk bundles). Then we load these bundles, as remote bundles, but they fails to load and we are stuck at loading state.
STANDALONE=1 react-native webpack-bundle --platform ios --dev false --entry-file index.js --bundle-output bundle/index.bundle
Where as if we run the same code, but with development bundles created using following command they are loaded properly. Note the difference in both commands is -
--dev true/ false
STANDALONE=1 react-native webpack-bundle --platform ios --dev true --entry-file index.js --bundle-output bundle/index.bundle
Reproducible Demo
We are using following example to load remote bundles, using ChunkManager APIs of repack module-federation. https://github.com/zamotany/module-federation-repack
Any help will be highly appreciated.
Thank you!
Hello, have you found a solution for this issue yet? I'm currently experiencing the same problem.
https://github.com/callstack/repack/issues/505