Search code examples
androidandroid-instant-appsandroid-12

Android instant app fails link verification on Android 12+ when using "*.mydomain.net"


looking for ideas to fix instant app on Android 12+

Tried everything could find in docs and on StackOverFlow

Manifest declaration is fine. .well-known/assetlinks.json is good, same as in Google Play Developer console. The instant app is working fine on Android <12.

When running: adb shell pm verify-app-links --re-verify mypackagename Logcat shows:

AppLinksIntentOperation com.google.android.gms               I  Verifying requested domains [CONTEXT service_id=244 ]
AppLinksRequestHandler  com.google.android.gms               I  Processing 1 input requests [CONTEXT service_id=244 ]
AppLinksUtilsV1         com.google.android.gms               I  Legacy cross-profile verification enabled [CONTEXT service_id=244 ]
AppLinksHostsVerifierV2 com.google.android.gms               E  Could not find package to verify: my.package.name [CONTEXT service_id=244 ]
                                                                                                android.content.pm.PackageManager$NameNotFoundException: my.package.name
                                                                                                    at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:293)
                                                                                                    at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:265)
                                                                                                    at bwkk.e(:com.google.android.gms@224814044@22.48.14 (190400-493411920):5)
                                                                                                    at bwkk.d(:com.google.android.gms@224814044@22.48.14 (190400-493411920):2)
                                                                                                    at bwke.c(:com.google.android.gms@224814044@22.48.14 (190400-493411920):2)
                                                                                                    at bwke.b(:com.google.android.gms@224814044@22.48.14 (190400-493411920):0)
                                                                                                    at com.google.android.gms.statementservice.DomainVerificationIntentOperation.onHandleIntent(:com.google.android.gms@224814044@22.48.14 (190400-493411920):12)
                                                                                                    at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms@224814044@22.48.14 (190400-493411920):2)
                                                                                                    at xsd.onHandleIntent(:com.google.android.gms@224814044@22.48.14 (190400-493411920):4)
                                                                                                    at gua.run(:com.google.android.gms@224814044@22.48.14 (190400-493411920):3)
                                                                                                    at gtz.run(:com.google.android.gms@224814044@22.48.14 (190400-493411920):11)
                                                                                                    at cwng.run(:com.google.android.gms@224814044@22.48.14 (190400-493411920):2)

Instant app is installed and can be located through the Settings -> Apps -> MyPackageName
Any ideas are welcome


Solution

  • I've reached out to google developers support and was informed that's expected behaviour.

    They mentioned they will update the docs.

    Such a use case (wildcard domain e.g. customer*.mydomain.com) is no longer supported :(