Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Digital Asset Link verification fails for site using LetsEncrypt SSL cert

I had just about started implementing support for App Links into my app, when I bumped into this unusual issue.

Following the steps in the Android Studio app links tool, I was quickly able to make the necessary changes. However, when I came to the step of verifying the Digital Asset Link files' association with my website, I got an error.

enter image description here

Initially, I thought there might be some error accessing the link. I tried accessing the link using multiple browsers, and there was no error.

When I looked around for anyone facing a similar issue, I came across this post. The site I was trying to associate with was also using a LetsEncrypt generated SSL cert. So, I tried another site I had that used LetsEncrypt SSL — same result. Then I used a site which used RapidSSL generated SSL, and bingo - it worked!

I'm not sure whether the App Links team has taken notice of this. But can anyone help get an answer on this?

Thanks!

like image 560
anirvan Avatar asked Sep 11 '17 15:09

anirvan


2 Answers

I have got the same issues of SSL certificate is not verified. This is because of the server where you host over there u have to verify SSL certificate

So the file is generate name assertlinks.json

This file you have to place over your server domain by creating folder .well-known/ inside this json file

https://sub.subdomain.example.com/.well-known/assetlinks.json

in mainfiest I have this code

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

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

        <data
            android:host="www.example.com"
            android:path="/aboutus"
            android:scheme="http" />

    </intent-filter>

Follow this steps to get it working my deep linking is working https://developer.android.com/studio/write/app-link-indexing.html

like image 156
Amjad Khan Avatar answered Nov 15 '22 14:11

Amjad Khan


Somewhat older already, but hopefully still relevant. I came across the same issue today and figured out that the problem is with the .well-known folder. Depending on how you set up the Let's Encrypt SSL certificate, it is very likely you have an alias now on your server that points .well-known to the folder /var/www/html/.well-known on your server. That's also where you will have to place you assetlinks.json file. Copying the file there fixed the issue for me.

Note however, this may well pose problems down the road if you have multiple domains on your server and if you have the need to link apps to different domains. I do not know if you can have different assetlinks.json files in this set up.

like image 27
ehusmann Avatar answered Nov 15 '22 14:11

ehusmann