2

I meet a very weird issue about installing dynamic feature module. It shows these error:

? W/Finsky: [1947] wiz.a(70): Split install requested but the app is not owned, package: xxx
? I/PlayCore: UID: [10165]  PID: [29261] SplitInstallService : onError(-5)
? W/DefaultProgressFragment: Installation failed with error -5

But If I upload the exactly the same *.aab to internal app sharing, everything works. Is there any possibility to cause this issue, and how could I resolve it?

Thanks!

Yu-Hsuan
  • 505
  • 4
  • 9
  • Where are you encountering this issue? In production? In local development? – Pierre Apr 24 '20 at 11:31
  • I upload to the internal test channel. If I grab the aab file to internal app sharing then it works – Yu-Hsuan Apr 24 '20 at 11:40
  • @Pierre Could I have the same feature package name within two different applicationId on the google play? e.g. com.applicationA & com.applicationB both have com.feature.C – Yu-Hsuan Apr 24 '20 at 14:46

1 Answers1

0

An app cannot request the installation of a dynamic feature on behalf of another app.

IIUC, you mentioned that you have two applications com.applicationA and com.applicationB both use a feature from another app com.feature.C. If you want to download a dynamic feature of app com.feature.C, then it has to be done from the process of that app.

Pierre
  • 15,865
  • 4
  • 36
  • 50
  • Sorry, we don't request on behalf of other app. I am wondering how Google Play recognize "feature"? Is it by feature name (module name in the Gradle) of by its package name? What happened if there are two apps both use the same feature name by coincidence? In our scenario, we want to publish multiple apps divided by different environment setting, which is like chrome beta/dev. Both of them may have the same feature name (but may have different implementation). – Yu-Hsuan Apr 24 '20 at 17:31
  • If I use this example https://github.com/googlecodelabs/android-dynamic-features/archive/master.zip and change the applicationId & signingConfig to be the same as mine. Upload to `internal test` will show the same error – Yu-Hsuan Apr 24 '20 at 20:33
  • To sum up: 1. How does Google play think the feature is not owned by an app? Use official sample has the same issue. 2. Why this issue only happened on `Internal Test` but `Internal app sharing` is worked? 3. What could I do at this point to make on-demand feature delivery work? – Yu-Hsuan Apr 25 '20 at 06:03
  • The name of the feature is the name of the module in Gradle, yes. Multiple apps can share the same module name since they're associated with the package name of the app. When you construct the SplitInstallManager instance via the factory, you have to pass a Context object. This Context must come from the app that owns the module (i.e. per `context.getPackageName()`). – Pierre Apr 25 '20 at 12:45
  • The restrictions on package name are loosened for internal app sharing, which explains the difference in behaviour. I'll try to find out why. – Pierre Apr 25 '20 at 12:49
  • Thanks! If you need more information, the issue of the applicationId is `com.ikala.shoplus`. – Yu-Hsuan Apr 25 '20 at 15:46
  • Nope, there is no action item I could do. I use official sample and it always failed. I've filed an issue at the same time https://issuetracker.google.com/issues/154960936. I think there are some bug on google play for my app (com.ikala.shoplus). Because I use official sample to another app always works, only failed for this app. Please help me. :bow: – Yu-Hsuan Apr 26 '20 at 16:53
  • Thank you. Filing the bug is probably the best way :) – Pierre Apr 27 '20 at 11:37