question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deeplink fails, inconsistent cross-platform

See original GitHub issue

Opening deep links across platform inconsistent, throws error on iOS.

Versions

Package version: botbuilder ^4.10.4, Nodejs version: 4.12.0 iOS version: 3.4.1 Build 3.4.77.2021042303/48 What os: iOS 3.4.1 Build 3.4.77.2021042303/48

Describe the bug

The deeplink experience across platforms is inconsistent and will terminate in an iOS error.

Only shows up on iOS when deeplinking. Error can be invoked from bot and tab.

image

image

To Reproduce

Steps to reproduce the behavior:

  1. Create deeplink with appId, entityId and data in Bot or Tab
  2. See bot and tab code examples below
  3. Observe error on iOS (see above)
  4. Observe that deeplinks will open tab extensions on all other devices, except iOS (see table)
Device Deeplink works
Windows Desktop Yes
Mac Desktop Yes
Android Device Yes
iOS Device No ** 👎

Expected behavior

Deep linking should work across platforms and devices, including iOS. This would help ensure the experience stays inside Teams. Additionally, it would make our application code cleaner.

Code to generate deep link in bot


// switch to your AppId and EntityID 

const createDeepLink = (appId: string, entityId: string, data: string) => {
            const context = `{"subEntityId": ${data}}`
            return `https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodeURI(context)}`;
        }

        this.onMessage(async (context, next) => {
            TurnContext.removeRecipientMention(context.activity);
            if (context.activity.text) {
                const link = createDeepLink("aedfa1bc-7ffc-48a1-9e46-bae559e541c6", "Tab", "myKey---myValue");
                await context.sendActivity({
                    attachments: [CardFactory.heroCard(
                        "Deeplink iOS issue",
                        null,
                        CardFactory.actions([
                            {
                                type: "openUrl",
                                title: "Click deeplink to open in tab",
                                value: link
                            }
                        ])
                    )]
                });
            }
            await next();
        });

Code to generate deep link in tab


// switch to your AppId and EntityID 

const createDeepLink = (appId: string, entityId: string, data: string) => {
    const context = `{"subEntityId": ${data}}`
    return `https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodeURI(context)}`;
}

export const Repro = () => {
    const link = createDeepLink("aedfa1bc-7ffc-48a1-9e46-bae559e541c6", "Tab", "myKey---myValue");
    return (
        <div>
            <h2>Deeplink iOS issue for MSFT</h2>     
            <Button onClick={()=>{
                microsoftTeams.executeDeepLink(link);
            }}>Click this deeplink</Button>
        </div>
    )
};

export const Tab = () => {
    return (<h2>Repro case landing page!</h2>)
};

Additional context

The iOS inconsistency has been brought to our attention by the Microsoft App submission team and internally in our own organization. However, I am unsure on what to do differently.

Is this just a temporary iOS inconsistency? Apologies, in advance if I may be logging this issue in the wrong place.

Since deep linking throws error on iOS, we have included special iOS conditional logic in our code. The workaround involves opening iOS deeplinks in the browser which strays from our intended design to keep the experience in Teams.

Any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
phpmapscommented, Jul 29, 2021

Sorry notifications were not coming through. Yes all is fixed thank you. I noticed the iOS update mid June.

On Thu, Jul 29, 2021 at 10:58 AM Andrew Clear @.***> wrote:

Closing for now, please reopen if you’re still facing the issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/botbuilder-js/issues/3664#issuecomment-889347043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQPHDXIJQ6OQWGQ7JT65B3T2GJF7ANCNFSM44MBPSQA .

0reactions
phpmapscommented, Jul 29, 2021

@Meghana-MSFT @clearab Yep. Fix looks good. Noticed it mid June. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notice: Inconsistent Universal Link Behavior on iOS 11.2
Starting with iOS 11.2, you might notice some inconsistent behavior when deep linking into your app with Universal Links.
Read more >
Deep Links Crash Course : Part 3 Troubleshooting ... - Medium
Symptom 1: The Links Never Work ... If users are clicking on links and they aren't opening in your application, then there might...
Read more >
Android app link not working in android 12 always opening in ...
Go to your App Info -> Open by default -> Links to open in this app , and confirm that your app has...
Read more >
OneLink troubleshooting and FAQ - Support - AppsFlyer
Why doesn't the OneLink URL open the app or deep link existing users? · Host applications: Apps in which your attribution links are...
Read more >
Xamarin Forms Android Deep Linking · Issue #64 - GitHub
I am trying to do deep linking in the app for push notifications. ... http://developer.xamarin.com/guides/cross-platform/xamarin-forms/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found