google / google/bundletool

Resources from dynamic feature modules are not available immediately after install

Open
#365 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.