0

I am trying to upload an instant app to the production track in google play. I have an associated installed apk available in production, and an instant app in the pre-release track. When I try to release the instant app to production I get the error: "Non-upgradable to installed app" (same error as described in Google Play Console error - Non-upgradable to installed app)

I tried following the different pieces of advice in the linked thread but am getting nowhere. My target and min sdks (26 and 19 respectively) show up as the same between instant and installable when I run aapt dump badging, and aside from the the version code (I gave my instant app a version code of 1 while the installable has a version code of 99), the outputs from this command are the exact same for each apk. There is nothing that jumped out to me in terms of the permissions as was discussed in the linked thread. The only permissions I use are uses-permission: name='android.permission.INTERNET' and uses-permission: name='android.permission.ACCESS_NETWORK_STATE'.

When inspecting the manifests using Analyze APK, these are also the same with the exception of version codes and the addition of targetSandboxVersion=2. This is what the instant one looks like (I put in placeholders of example.com and "stuff" for some values)

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="7.7.7"
    android:targetSandboxVersion="2"
    package="com.android.example_app">

    <uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="26" />

    <uses-permission
        android:name="android.permission.INTERNET" />

    <uses-permission
        android:name="android.permission.ACCESS_NETWORK_STATE" />

    <supports-screens
        android:smallScreens="false"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:requiresSmallestWidthDp="200" />

    <application
        android:theme="stuff"
        android:label="stuff"
        android:icon="stuff"
        android:allowBackup="true"
        android:networkSecurityConfig="stuff">

        <activity
            android:label="stuff"
            android:name="com.android.example_app.MainActivity"
            android:launchMode="2"
            android:configChanges="0x4a0"
            android:allowTaskReparenting="false"
            android:windowSoftInputMode="0x22">

            <intent-filter
                android:autoVerify="true">

                <action
                    android:name="android.intent.action.VIEW" />

                <category
                    android:name="android.intent.category.DEFAULT" />

                <category
                    android:name="android.intent.category.BROWSABLE" />

                <data
                    android:scheme="http" />

                <data
                    android:scheme="https" />

                <data
                    android:host="www.example.com" />
            </intent-filter>

            <intent-filter
                android:autoVerify="true">

                <action
                    android:name="android.intent.action.VIEW" />

                <category
                    android:name="android.intent.category.DEFAULT" />

                <category
                    android:name="android.intent.category.BROWSABLE" />

                <data
                    android:scheme="http" />

                <data
                    android:scheme="https" />

                <data
                    android:host="www1.example.com" />
            </intent-filter>

            <meta-data
                android:name="default-url"
                android:value="https://www.example.com" />

            <intent-filter>

                <action
                    android:name="android.intent.action.MAIN" />

                <category
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="net.hockeyapp.android.UpdateActivity" />

        <activity
            android:label="WebviewActivity"
            android:name="com.android.example_app.architecture.Pages.CustomChromeTabs.WebviewActivity"
            android:parentActivityName="com.android.example_app.architecture.MainActivity">

            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".architecture.MainActivity" />
        </activity>

        <service
            android:name="org.openudid.OpenUDID_service">

            <intent-filter>

                <action
                    android:name="org.openudid.GETUDID" />
            </intent-filter>
        </service>

        <meta-data
            android:name="aia-compat-api-min-version"
            android:value="1" />
    </application>
</manifest>

Is there anything else I can look at to resolve this error, or a way I can get more info from the play console about what is going wrong? The error message seems to be covering a lot more than just the target sdk validation which it claims to be for. And to be clear, the instant app worked fine in pre-release and the installable worked fine in alpha all the way through to production.

Thanks for the help!

Edit:

Instant app aapt dump badging output

package: name='com.android.example_app' versionCode='1' versionName='7.7.7' platformBuildVersionName=''
sdkVersion:'19'
targetSdkVersion:'26'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
application-label:'example'
application-label-af:'example'
application-label-am:'example'
application-label-ar:'example'
application-label-az-AZ:'example'
application-label-be-BY:'example'
application-label-bg:'example'
application-label-bn-BD:'example'
application-label-bs-BA:'example'
application-label-ca:'example'
application-label-cs:'example'
application-label-da:'example'
application-label-de:'example'
application-label-el:'example'
application-label-en-AU:'example'
application-label-en-GB:'example'
application-label-en-IN:'example'
application-label-es:'example'
application-label-es-US:'example'
application-label-et-EE:'example'
application-label-eu-ES:'example'
application-label-fa:'example'
application-label-fi:'example'
application-label-fr:'example'
application-label-fr-CA:'example'
application-label-gl-ES:'example'
application-label-gu-IN:'example'
application-label-hi:'example'
application-label-hr:'example'
application-label-hu:'example'
application-label-hy-AM:'example'
application-label-in:'example'
application-label-is-IS:'example'
application-label-it:'example'
application-label-iw:'example'
application-label-ja:'example'
application-label-ka-GE:'example'
application-label-kk-KZ:'example'
application-label-km-KH:'example'
application-label-kn-IN:'example'
application-label-ko:'example'
application-label-ky-KG:'example'
application-label-lo-LA:'example'
application-label-lt:'example'
application-label-lv:'example'
application-label-mk-MK:'example'
application-label-ml-IN:'example'
application-label-mn-MN:'example'
application-label-mr-IN:'example'
application-label-ms-MY:'example'
application-label-my-MM:'example'
application-label-nb:'example'
application-label-ne-NP:'example'
application-label-nl:'example'
application-label-pa-IN:'example'
application-label-pl:'example'
application-label-pt:'example'
application-label-pt-BR:'example'
application-label-pt-PT:'example'
application-label-ro:'example'
application-label-ru:'example'
application-label-si-LK:'example'
application-label-sk:'example'
application-label-sl:'example'
application-label-sq-AL:'example'
application-label-sr:'example'
application-label-sr-Latn:'example'
application-label-sv:'example'
application-label-sw:'example'
application-label-ta-IN:'example'
application-label-te-IN:'example'
application-label-th:'example'
application-label-tl:'example'
application-label-tr:'example'
application-label-uk:'example'
application-label-ur-PK:'example'
application-label-uz-UZ:'example'
application-label-vi:'example'
application-label-zh-CN:'example'
application-label-zh-HK:'example'
application-label-zh-TW:'example'
application-label-zu:'example'
application-icon-120:'res/drawable-ldpi-v4/ic_launcher.png'
application-icon-160:'res/drawable-mdpi-v4/ic_launcher.png'
application-icon-240:'res/drawable-hdpi-v4/ic_launcher.png'
application-icon-320:'res/drawable-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/drawable-xhdpi-v4/ic_launcher.png'
application-icon-640:'res/drawable-xhdpi-v4/ic_launcher.png'
application: label='example' icon='res/drawable-mdpi-v4/ic_launcher.png'
launchable-activity: name='com.android.example_app.architecture.MainActivity'  label='example' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.faketouch'
  uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
other-services
supports-screens: 'normal' 'large' 'xlarge'
supports-any-density: 'true'
requires-smallest-width:'200'
locales: '--_--' 'af' 'am' 'ar' 'az-AZ' 'be-BY' 'bg' 'bn-BD' 'bs-BA' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-US' 'et-EE' 'eu-ES' 'fa' 'fi' 'fr' 'fr-CA' 'gl-ES' 'gu-IN' 'hi' 'hr' 'hu' 'hy-AM' 'in' 'is-IS' 'it
' 'iw' 'ja' 'ka-GE' 'kk-KZ' 'km-KH' 'kn-IN' 'ko' 'ky-KG' 'lo-LA' 'lt' 'lv' 'mk-MK' 'ml-IN' 'mn-MN' 'mr-IN' 'ms-MY' 'my-MM' 'nb' 'ne-NP' 'nl' 'pa-IN' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si-LK' 'sk' 'sl' 'sq-AL' 'sr' 'sr-Latn'
 'sv' 'sw' 'ta-IN' 'te-IN' 'th' 'tl' 'tr' 'uk' 'ur-PK' 'uz-UZ' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640'

Installable aapt dump badging output

package: name='com.android.example_app' versionCode='99' versionName='7.7.7' platformBuildVersionName=''
sdkVersion:'19'
targetSdkVersion:'26'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
application-label:'example'
application-label-af:'example'
application-label-am:'example'
application-label-ar:'example'
application-label-az-AZ:'example'
application-label-be-BY:'example'
application-label-bg:'example'
application-label-bn-BD:'example'
application-label-bs-BA:'example'
application-label-ca:'example'
application-label-cs:'example'
application-label-da:'example'
application-label-de:'example'
application-label-el:'example'
application-label-en-AU:'example'
application-label-en-GB:'example'
application-label-en-IN:'example'
application-label-es:'example'
application-label-es-US:'example'
application-label-et-EE:'example'
application-label-eu-ES:'example'
application-label-fa:'example'
application-label-fi:'example'
application-label-fr:'example'
application-label-fr-CA:'example'
application-label-gl-ES:'example'
application-label-gu-IN:'example'
application-label-hi:'example'
application-label-hr:'example'
application-label-hu:'example'
application-label-hy-AM:'example'
application-label-in:'example'
application-label-is-IS:'example'
application-label-it:'example'
application-label-iw:'example'
application-label-ja:'example'
application-label-ka-GE:'example'
application-label-kk-KZ:'example'
application-label-km-KH:'example'
application-label-kn-IN:'example'
application-label-ko:'example'
application-label-ky-KG:'example'
application-label-lo-LA:'example'
application-label-lt:'example'
application-label-lv:'example'
application-label-mk-MK:'example'
application-label-ml-IN:'example'
application-label-mn-MN:'example'
application-label-mr-IN:'example'
application-label-ms-MY:'example'
application-label-my-MM:'example'
application-label-nb:'example'
application-label-ne-NP:'example'
application-label-nl:'example'
application-label-pa-IN:'example'
application-label-pl:'example'
application-label-pt:'example'
application-label-pt-BR:'example'
application-label-pt-PT:'example'
application-label-ro:'example'
application-label-ru:'example'
application-label-si-LK:'example'
application-label-sk:'example'
application-label-sl:'example'
application-label-sq-AL:'example'
application-label-sr:'example'
application-label-sr-Latn:'example'
application-label-sv:'example'
application-label-sw:'example'
application-label-ta-IN:'example'
application-label-te-IN:'example'
application-label-th:'example'
application-label-tl:'example'
application-label-tr:'example'
application-label-uk:'example'
application-label-ur-PK:'example'
application-label-uz-UZ:'example'
application-label-vi:'example'
application-label-zh-CN:'example'
application-label-zh-HK:'example'
application-label-zh-TW:'example'
application-label-zu:'example'
application-icon-120:'res/drawable-ldpi-v4/ic_launcher.png'
application-icon-160:'res/drawable-mdpi-v4/ic_launcher.png'
application-icon-240:'res/drawable-hdpi-v4/ic_launcher.png'
application-icon-320:'res/drawable-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/drawable-xhdpi-v4/ic_launcher.png'
application-icon-640:'res/drawable-xhdpi-v4/ic_launcher.png'
application: label='example' icon='res/drawable-mdpi-v4/ic_launcher.png'
launchable-activity: name='com.android.example_app.architecture.MainActivity'  label='example' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.faketouch'
  uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
main
other-activities
other-services
supports-screens: 'normal' 'large' 'xlarge'
supports-any-density: 'true'
requires-smallest-width:'200'
locales: '--_--' 'af' 'am' 'ar' 'az-AZ' 'be-BY' 'bg' 'bn-BD' 'bs-BA' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-US' 'et-EE' 'eu-ES' 'fa' 'fi' 'fr' 'fr-CA' 'gl-ES' 'gu-IN' 'hi' 'hr' 'hu' 'hy-AM' 'in' 'is-IS' 'it
' 'iw' 'ja' 'ka-GE' 'kk-KZ' 'km-KH' 'kn-IN' 'ko' 'ky-KG' 'lo-LA' 'lt' 'lv' 'mk-MK' 'ml-IN' 'mn-MN' 'mr-IN' 'ms-MY' 'my-MM' 'nb' 'ne-NP' 'nl' 'pa-IN' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si-LK' 'sk' 'sl' 'sq-AL' 'sr' 'sr-Latn'
 'sv' 'sw' 'ta-IN' 'te-IN' 'th' 'tl' 'tr' 'uk' 'ur-PK' 'uz-UZ' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '120' '160' '240' '320' '480' '640'

Edit2: I also verified that the available countries for the instant app and installable app matched.

etrado
  • 121
  • 8
  • Don't let the "targeting" keyword in the error message mislead you, there is a lot more going on. As https://stackoverflow.com/a/46094767/6668797 suggests, use the aapt dump badging command to compare your installed and instant app. The error suggests that there is something in there that the instant app supports, but the installed does not. The plain manifest doesn't show enough of the entire picture to debug this. – TWL Mar 09 '18 at 18:48
  • @TWL Thanks for the response! I updated to include the aapt dump badging command for both the installable and instant apps. As I said before, they look the same to me outside of the version code. Am I missing something? – etrado Mar 09 '18 at 19:13
  • If it helps clarify, my project only has a base feature, instant, and installable modules. There are no other features in the project. – etrado Mar 09 '18 at 19:40
  • Hmm, these look exactly the same besides the version code... is this dump the dump of the installed-apk that's already published to prod? Make sure that version-99 is already published to prod before trying to publish the IA (vers-1) to prod. – TWL Mar 09 '18 at 23:51
  • Yes, the second dump is from the published prod app. It is fully rolled out to prod (it's version 99), and has been for a few days now. – etrado Mar 10 '18 at 00:26
  • The interesting thing is that if I extract the apk from the instant app zip file and put that into the play console as a draft and look at the apk details, it shows the exact same number of supported devices (9861) that the current prod installable does. – etrado Mar 10 '18 at 00:38
  • I suggest submitting your issue to Google @ https://issuetracker.google.com/issues/new?component=316045&template=1018787 privately share your app's packagename with them via the given instructions, and they can take a look at it internally. If the dump badging doesn't give any clear clues, then something else is going on. – TWL Mar 10 '18 at 00:42
  • I hope your problem has been resolve, if not can you file a bug to Google. https://issuetracker.google.com/issues/new?component=316045&template=1018787 – Prags Mar 21 '18 at 08:45
  • Thanks! Yes, I submitted a bug report there. They are working through it with me. https://issuetracker.google.com/issues/74385463 – etrado Mar 21 '18 at 19:25

1 Answers1

0

You can see this in the bug report link I posted, but the problem ended up being some bugs with the google play store validation. Having smallScreens set to false in the manifest was a problem (which apparently was fixed), and having a requiresSmallestWidthDp value defined in the manifest was also a problem (even though both of these values were the same across both instant and installable manifests). I'm not sure if the requiresSmallestWidthDp piece was fixed, but it isn't supported by the play store anymore so I just got rid of it.

etrado
  • 121
  • 8