Skip to content

[Bug] Dynamic Links iOS error: "Deep Link does not contain valid required params" #1214

Closed
@davidmfinol

Description

@davidmfinol

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.22f1
  • Firebase Unity SDK version: 8.7.0
  • Source you installed the SDK: Unity Package Manager
  • Problematic Firebase Component: Dynamic Links
  • Other Firebase Components in use: None
  • Additional SDKs you are using: N / A
  • Platform you are using the Unity editor on: Windows, Linux, and Mac (I have CI using all 3 daily)
  • Platform you are targeting: iOS, Android, and Desktop
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

I'm using Firebase Dynamic Links for Unity, and I've got it working well with Android. I've even got a solution for Desktop, where the fallback link takes users to a webpage where I can provide instructions to the user for how to get their link content on Desktop.

On iOS, however, I always get errors showing up in the Xcode logs whenever I test dynamic links on iOS, saying "Deep Link does not contain valid required params".
I also don't get any log that should immediately happen whenever a dynamic link is received.
I'll put the error and code below.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? N / A
What's the issue repro rate? 100%

This is the full error that appears when an iOS user clicks on https://cgs.link/zu_tiles_hime:

[Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    "_cpb" = 1;
    "_cpt" = cpit;
    "_fpb" = "CIAIEIAGGgVlbi11cw==";
    "_iipp" = 1;
    "_iumchkactval" = 1;
    "_iumenbl" = 1;
    "_osl" = "https://cgs.link/zu_tiles_hime?_iipp=1";
    "_plt" = 260;
    "_uit" = 1064;
    apn = "com.finoldigital.cardgamesim";
    cid = 8062347334713659136;
    ibi = "com.finoldigital.CardGameSim";
    isi = 1392877362;
    link = "https://www.cardgamesimulator.com/link%%3Furl%%3Dhttps://www.cardgamesimulator.com/games/zu_tiles_hime/zu_tiles_hime.json";
    sd = "Play Zu Tile: Hime on CGS!";
    si = "https://www.cardgamesimulator.com/games/zu_tiles_hime/Banner.png";
    st = "Card Game Simulator - Zu Tiles: Hime";
}

Relevant Code:

        private void Start()
        {
            FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
            {
                var dependencyStatus = task.Result;
                if (dependencyStatus != DependencyStatus.Available)
                {
                    Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus);
                    return;
                }
                DynamicLinks.DynamicLinkReceived += OnDynamicLinkReceived;
            });
        }
        private void OnDynamicLinkReceived(object sender, EventArgs args)
        {
            Debug.Log("Dynamic Link Received!");
...

EDIT:

Additional Context:

I've actually been able to get it somewhat working on iOS by replacing DynamicLinks.DynamicLinkReceived += OnDynamicLinkReceived with Application.deepLinkActivated += OnDeepLinkActivated, but then that only works with long links since only the long link would provide the requisite information to Application.absoluteUrl. I really want to be able to keep shorts links like https://cgs.link/zu_tiles_hime without having to give long links to users. Luckily, if an iOS user types this short link into a web browser, they get sent to a preview page, and that preview page has a button that uses the long link, which works. Ideally, though, that iOS user should be able to just click on the short link without having to type it into a web browser. I'd really appreciate any help with figuring this out!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions