Resources from dynamic feature modules are not available immediately after install
- Dominant language
- Java
- Stars
- 4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using --local-testing flag, accessing a dynamic feature modules just after install crashes the app with FileNotFoundException.
The same flow works in the release variant of the app.
**Bundletool version(s) affected**
Version: [1.16.0]
**Stacktrace**
Unable to load Texture registryId='android.resource://com.microsoft.skype.teams.dev/drawable/com.microsoft.skype.teams.dev.remoteassist%3Asceneform_plane'
java.util.concurrent.CompletionException: java.lang.IllegalStateException: java.io.FileNotFoundException: No resource found for: android.resource://com.microsoft.skype.teams.dev/drawable/com.microsoft.skype.teams.dev.remoteassist%3Asceneform_plane
**To Reproduce**
1. Build a bundle.
2. Generate APKs using --local-testing.
3. Download a DFM on-demand and launch on install.
4. App crashes with FileNotFoundException. The resource file is present in the DFM installed.
One unique setup is that we attach a Fragment from DFM in an existing Activity (present in base APK). Is this setup supported by local-testing?
**Expected behavior**
The launch of on-demand installed DFM locally should be successful without crash.
**Known workaround**
Ignore the crash and launch the second time.
Contributor guide
Assessment
This issue has not been assessed yet.