Warning: ChunkLoadError: Loading chunk (chunkname) failed.
Describe the bug
Hi all. I am trying to follow the Re.Pack guides and take the 'local-chunks' example project and make it so that AsyncBody can be loaded from a CDN server.
To accomplish this, I have created a new Re.Pack 5 project. All packages install appropriately, pods install, etc. When I build the release bundle for iOS, it builds async_body.chunk.bundle and places it in the build outputs folder. All as expected.
What I'm confused on is this: I upload the chunk bundle to my CDN storage and provide the base URL in my resolver. The URL that should be generated is accurate, and if I plug it into my browser, I see the text representation of the chunk bundle. However, when I run the app, I get the following unhelpful error:
Without any other additional information I'm not sure what to do here. The issue reproduces on iOS and Android.
If it helps, the URL for the chunk bundle is here: https://pub-c0b0ae684e604a9eb8d0d0e57bd14a4c.r2.dev/async_body.chunk.bundle
Is anything else supposed to be uploaded to the CDN server? Am I misconfiguring something locally? When I have the app point to local, it loads fine (although it's loading the local tsx instead of a bundle, which I think is expected).
Any help is appreciated- thank you!
System Info
System:
OS: macOS 15.4.1
CPU: (14) arm64 Apple M3 Max
Memory: 302.95 MB / 36.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.15.1
path: ~/.nvm/versions/node/v22.15.1/bin/node
Yarn:
version: 3.6.4
path: ~/.yarn/bin/yarn
npm:
version: 10.9.2
path: ~/.nvm/versions/node/v22.15.1/bin/npm
Watchman:
version: 2025.04.28.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11076708
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.14
path: /usr/bin/javac
Ruby:
version: 3.4.4
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Re.Pack Version
5.1.0
Reproduction
N/A
Steps to reproduce
Run yarn install Run yarn dlx pod-install
Open XCode Build release app Take generated chunk bundle and upload to CDN yarn start Run iOS app from XCode See error.
hi, can you link your resolver config?
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.