ChunkLoadError on Android
See original GitHub issueEnvironment
Android 10. React Natvie 64.2
Description
So my build is finished successfully, the main bundle is generated but somehow the chunk is not getting copied to the APK resulting in ChunkLoadError.
When I run manually with this command, the chuck is in the correct assets folder.
npx react-native webpack-bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
So I suppose the problem is that the bundle is not getting copied by react-native Gradle because the APK doesn’t have any of the chunks that they are supposed to have.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Webpack chunks are unable to load on Android. Web and iOS ...
Webpack chunks are unable to load on Android. Web and iOS are fine ( ChunkLoadError: Loading chunk pages-home-home-module failed.).
Read more >ChunkLoadError: Loading chunk failed - Capacitor - Ionic Forum
My working project is working fine on the web, and on my 1 year old Android phone, but I get a “ChunkLoadError: Loading...
Read more >React Static Web Apps Manage ChunkLoadErrors on ...
The issue with this code is that there is no error handling, and promises can fail to download the chunk resulting on the...
Read more >How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >Why do I get a ChunkLoadError only on iOS? : r/reactjs - Reddit
... try to dynamically import them, resulting in a ChunkLoadError ("loading chunk 23 failed. ... It always succeeds on desktop and Android.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DanijelBojcic
localChunks
matches only chunkname
(orid
if can cannot be obtained), so/\.chunk\.(js)?bundle$/
won’t match anything. If you want to match everything you should provide/.*/
instead. If you want only specific chunks I suggest to:/* webpackChunkName: "myChunk" */
inimport()
localChunks: ['myChunk']
orlocalChunks: [/myChunk/]
Can you prepare a repro project? Something is wrong with the way your project is being built, because it should never load chunk with such URI -
noop://
.