android / codelab-android-dynamic-features

Apache License 2.0
121 stars 47 forks source link

Cannot start activity from DF module #4

Closed dlemures closed 5 years ago

dlemures commented 5 years ago

After completing the codelab, we are having issues when trying to fetch and start any of the activities from DF modules.

The repro steps are:

  1. Click on any of the Activity buttons.
  2. Loading module screen is really fast.
  3. We get redirected back to the initial screen.
  4. The next time you try to click on the same Activity button, it gets stuck on the loading module screen.

However, for the resource dialog works fine.

The debug information we can see on logcat is:

SplitInstallService : startInstall([com.google.android.samples.dynamicfeatures.ondemand.NativeSampleActivity],[])
SplitInstallService : Initiate binding to the service.
SplitInstallService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.splitinstallservice.SplitInstallService})
SplitInstallService : linkToDeath
SplitInstallService : Unbind from service.
SplitInstallService : onError(-2)

Our branch is this one: https://github.com/dlemures/android-dynamic-features/tree/dlemures/issues-starting-activities

dlemures commented 5 years ago

We reinstalled the app once more and sometimes it works fine, others we get error -9:

SplitInstallService : reportBinderDeath
SplitInstallService : calling onBinderDied
SplitInstallService : onBinderDied
D/DynamicFeatures: Error: -9 for module []
pfmaggi commented 5 years ago

Thanks for reporting this.

The error -9 is SERVICE_DIED

On which device are you testing this and with which version of the Play Store (from the Play app, you can go in Settings and scroll to the bottom)?

If you previously installed the App from Studio, can you be sure that you have uninstalled it (even from the work account if you have one on your phone) and then proceed to install the app from Play?

Let me know if you can test on a different device (or the emulator) to see if the issue is present across different devices.

dlemures commented 5 years ago

I tested on the emulator with the Play store version 13.3.17-all [0] [PR] 231012848.

I installed the app from the Play Store and uninstalled the previous version.