'Dynamic link returning empty JSON string from Firebase

I'm setting up my Android app to support email authentication and as part of the task I need to create a dynamic link, which I did in the Firebase console. However, when I tested the link (https://chiaramail.page.link/.well-known/assetlinks.json, I just got back empty data ("[]"). Is there something else that needs to happen?



Solution 1:[1]

I had the same issue. Actually it is because, you need to provide SHA256 instead of SAH1 to implement dynamic link to your project. I tried to add it with my existing project through project settings. But it didn't work for me.

Then I created a new project and in the sdk configuration I skipped SHA1 input and after completing sdk setup, I went to the project setting and added SHA256. then I tried link <your dynamic link>/.well-known/assetlinks.json .It worked.

Thanks Mate.

Solution 2:[2]

You don't have to create a new project for fixing this issue.

if the /.well-known/assetlinks.json return [], the empty array you need to add SHA256 Key to your firebase project. Follow this video for more info

solution:

  1. Delete the existing deeplink URL prefix
  2. Add SHA256
  3. Create a new deeplink

finally check the new deeplink <NEW_LINK>/.well-known/assetlinks.json It will give something like this

[{"relation":["delegate_permission/common.handle_all_urls"],"target":{"namespace":"android_app","package_name":"com.test.app","sha256_cert_fingerprints":["sha"]}}]

that means it works properly.

Solution 3:[3]

For me, no need to create a new project. Just go to Project Setting, add SHA-256, and wait about 15-20 minute to it can up-to-date on assetlinks.json site.

  • Another faster option without waiting:
  1. Add SHA256 on Project Settings
  2. Click on Add URL prefix from menu dropdown on Dynamic Links page
  3. Setup new link

Solution 4:[4]

If you have already set up the dynamic link, no need to create a new dynamic link to fix this. Just add the SHA256 in the project settings.

Note: If your releases are signed by Google Play, then go to the play console, open the app. On the left side menu, go to Setup -> App integrity -> App signing. Under App signing key certificate, copy SHA-256 certificate fingerprint and paste it in the firebase console -> project settings for Android.

For more details or any other issue, go to the link https://<your dynamic link>?d=1. (?d=1 is important, it is to debug the flow of your dynamic link) If there is an issue, it will show you a warning like The dynamic link has a warning.

Expand the warning and it shall show you what is wrong and how to fix it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 d-feverx
Solution 3 Huy Nguyen
Solution 4