18

Whenever I tried to upload my instant app apks to Play store, it gives the following error :

  • Your site 'www.mywebsitename.com' has not been linked through the Digital Assets Link protocol to your app. Please link your site through the Digital Assets Link protocol to your app.

However, whenever I execute https://developers.google.com/digital-asset-links/tools/generator, it gives success for associating with my app and web site. Any idea why am I getting this error? What may cause this?

Thanks for help in advance.

senaaltun
  • 309
  • 3
  • 11
  • 1
    its impossible, please check your json file and check your package name. – Berat Eyüboğlu Jun 23 '17 at 15:23
  • Everything is right, but still getting same error from Google Play Store. @BeratEyüboğlu – senaaltun Jul 05 '17 at 07:11
  • 1
    I have been seeing the same error intermittently on the Playstore, re-uploading the instant app package, or discarding the release draft and creating a new one generally fixes the issue in our case. – Jarrod Jul 12 '17 at 00:59
  • 1
    like what @BeratEyüboğlu said, check the package in the json. That's what got me. it generated the json file with the packagename of the base module. it should be changed to the applicationid of the apk/zip. – hepizoj Aug 29 '17 at 07:17
  • You will have to provide your manifests and json here for us to best help you. Otherwise, file a bug to https://issuetracker.google.com/issues/new?component=316045&template=1018787 and link to it back in here so it can help everyone. Google will be able to handle your information privately. – TWL Sep 01 '17 at 15:23
  • @hepizoj thank you! Checking the json file made me realized I used the wrong package – nilsi Aug 21 '18 at 16:58

4 Answers4

11

Please check whether Google Play App Signing is enable on Google Play Console. If Google Play App Signing is enable, Google Play Console will replace your app key with release key. And the key you set on Android Studio is treated as upload key. So, you need to modify your assetlinks.json with release key.

Miriam Farber
  • 18,986
  • 14
  • 61
  • 76
user3813078
  • 459
  • 3
  • 7
  • This was the key for me. Use your old keystore, before you switched to the Google app signing keystore. – mco Nov 29 '17 at 21:19
  • i have checked all the things and getting success but while uploading app it gives error Your site 'quickeselling.com' has not been linked through the Digital Assets Link protocol to your app. – Neal Dec 15 '18 at 06:00
10

This happened to me when I had generated an assetlinks.json file from my debug keys, rather than the release keys. It shows up as verified in Android Studio, then fails on the server. Double check that the signing config is correct for your asset links file, and that the fingerprint in the file matches the SHA256 fingerprint of your release key. You can get your release key's fingerprint by running

keytool -list -v -keystore ~/my_keystore.jks

Another cause can be if you've enabled Play signing. In that case, you have to use the fingerprint provided in your developer console, not the one for the key you signed the APK with locally (the local one is called your "upload key"). This isn't obvious in Android Studio at all, since its asset link file generator doesn't give you an option to put in a custom fingerprint.

Troy
  • 1,599
  • 14
  • 28
  • Thank you, the 2nd one fixed it. Copy and pasted the fingerprint provided in the developer console - to the webpage file - SHA256 key value – djsreeraj Jul 18 '18 at 06:21
  • You can get the SHA256 at the Play console at by going to Setup -> App Integrity (at the Release section on the left column menu). – Albert Vila Calvo Aug 25 '21 at 09:46
6

Please check if your website asset link file is not behind some form of authentication, internal IP, or blocked by firewall. Play Store Developer Console can not access the digital asset link file if it is not publicly accessible.

That said, please double check if https://www.mywebsitename.com/.well-known/assetlinks.json is accessible from external network (switch to a public wifi and verify the json file can load properly).

Jichao Li
  • 189
  • 4
  • Thanks for the answer, I double checked my file and it is accessible publicly. Still getting same error from Play Store. – senaaltun Jul 03 '17 at 07:06
  • I'm not exactly sure what actually happened without looking at your asset link file - please take a look at Google's [assetlink.json](https://www.google.com/.well-known/assetlinks.json) and see if yours look similar. Particularly, please note the relation and namespace field. – Jichao Li Jul 10 '17 at 23:19
  • Is it possible you generated your asset links against your debug keys? When I had this problem, that was the cause. – Troy Aug 16 '17 at 18:41
  • Yes! Oh gawd yes, yes, yes....! I've been cracking my brain on why this ain't working for so long. This is exactly what I was missing. Google should document this better and mention in the Apps Link Assistant that if app signing it enabled replace the SHA256 string in the asset file with the one in the play store console but they didn't and I wasted time on this! Thanks for this! – Saifur Rahman Mohsin Aug 20 '18 at 22:54
0

As Jarrod said in a comment, if all else fails then discard the staged release and re-upload the APK. Just now worked for me.

AbePralle
  • 942
  • 1
  • 11
  • 13