Android App Links not working after comprenhensive debugging

29 Views Asked by At

I'm trying to implement deep links for an Android app. The problem is that whenever an user presses one of the links under the domains associated with the app, the web browser opens instead.

The app was developed with React Native and bundled via Expo.

This is the relevant bit of the app.config.js file of the Expo app:

intentFilters: [
      {
        action: 'VIEW',
        autoVerify: true,
        data: [
          {
            scheme: 'https',
            host: 'centrito.co',
            pathPrefix: '/products',
          },
        ],
        category: ['BROWSABLE', 'DEFAULT'],
      },
      {
        action: 'VIEW',
        autoVerify: true,
        data: [
          {
            scheme: 'https',
            host: 'www.centrito.co',
            pathPrefix: '/products',
          },
        ],
        category: ['BROWSABLE', 'DEFAULT'],
      },
      {
        action: 'VIEW',
        autoVerify: true,
        data: [
          {
            scheme: 'https',
            host: 'centrito.co',
            pathPrefix: '/account/orders',
          },
        ],
        category: ['BROWSABLE', 'DEFAULT'],
      },
      {
        action: 'VIEW',
        autoVerify: true,
        data: [
          {
            scheme: 'https',
            host: 'www.centrito.co',
            pathPrefix: '/account/orders',
          },
        ],
        category: ['BROWSABLE', 'DEFAULT'],
      },
],

And this is the content of assetlinks.json:

[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.centrito.app",
      "sha256_cert_fingerprints":
        ["4F:7A:AD:EC:06:9C:BA:A3:FD:A6:96:77:7B:8C:6C:C8:17:95:09:C0:59:8D:83:A3:F4:1A:B9:5E:C9:6F:CA:FD"]
    }
  }
]

Some relevant facts:

  1. The deep links actually did work previously but stopped working altogether at an unknown date.
  2. The links can be manually associated with my app in Android settings. This is not optimal for end users.
  3. This tool indicates that the app and the domain are indeed linked via those deep-links.
  4. Executing curl -I to the supported domains to request the /.well-known/assetlinks.json and responses with status code 200 are returned so server configurations and redirections are not the culprits, most likely.

While debugging, I extracted the following information:

  1. Executing adb logcat while installing the app doesn't yield any information about the auto verification process.
  2. Whenever I try to manually re-verify and check with the commands adb shell pm verify-app-links --re-verify com.centrito.app and adb shell pm get-app-links com.centrito.app nothing gets printed in the console.

Given all those previous data points, I'm thinking that the auto verification process is not happening at all. What other reasons could possibly expain this weird behaviour? Could Google be at fault for this?

0

There are 0 best solutions below