4

So, basically I'm at step 1 of implementing App Links, I stumbled upon this tool:

https://developers.google.com/digital-asset-links/tools/generator

I give it my domain name, my package name, and I copy paste my App package fingerprint from the play store console. it generate an assetlinks.json file for me, I put it as required at https://my-domain/.well-known/assetlinks.json I test downloads, it works, then I ask this tool to test it, it says

No app deep linking permission found for package_name at my_domain.

my logs indicate that GoogleAssociationService came and took the file (200 status response and the correct number of bytes).

So basically I put the good values, it generates it, and then fetch it and tells me it's wrong, what am I missing ? how can he not be happy with what he generated itself ?

beauchette
  • 1,046
  • 2
  • 13
  • 31

1 Answers1

2

When we came across this issue we have also investigated logs of our proxy and have seen that the "assetlinks.json" file had been successfully downloaded.

In our case, the problem was with Content-Type. In our case, it was the "application/octet-stream" type. According to the documentation, Content-Type should have the type "application/json". We have changed the content type and everything started working as expected.

Check the requirements using the link above and verify that all of them are met by crossing off all potential reasons one by one.


Update 2022-10-30: The provided link is not available anymore. I have used a cached version to fetch the information below:

You must publish your JSON verification file at the following location:

https://domain.name/.well-known/assetlinks.json

Be sure of the following:

  1. The assetlinks.json file is served with content-type application/json.
  2. The assetlinks.json file must be accessible over an HTTPS connection, regardless of whether your app's intent filters declare HTTPS as the data scheme.
  3. The assetlinks.json file must be accessible without any redirects (no 301 or 302 redirects).
  4. If your app links support multiple host domains, then you must publish the assetlinks.json file on each domain. See Supporting app linking for multiple hosts.
  5. Do not publish your app with dev/test URLs in the manifest file that may not be accessible to the public (such as any that are accessible only with a VPN). A work-around in such cases is to configure build variants to generate a different manifest file for dev builds.
  • My file already is `Content-Type application/json` and displays JSON when navigating to it. Provided link appears to have no valuable information whatsoever, the original page was updated/renamed. – Andrew West Oct 28 '22 at 11:13
  • Hi @AndrewWest, I have updated my answer using content from the cached page. In addition, I would recommend you look at the log files of your proxy server/load balancer to get a full view of how the client request is processed. – Arkadiy Shuvaev Oct 30 '22 at 21:56
  • 1
    Cheers. My file kicked itself into life after about 10-15 minutes, just in case anybody else has the same issue, whereby Google's own generated file cannot be read, simply wait a few minutes and try again. – Andrew West Oct 31 '22 at 15:14
  • 1
    Here is the verify-android-applinks link: https://developer.android.com/training/app-links/verify-android-applinks#publish-json – Shan Shafiq Jun 01 '23 at 05:41