FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
98 stars 17 forks source link

Deep Link Redirection Issue to Home Page Instead of Target Page #2872

Open fuzunist opened 1 week ago

fuzunist commented 1 week ago

Has your issue been reported?

Current Behavior

When attempting to navigate to specific pages via deep links (e.g.,

appname://appname.com/youAreAllSet?code=TESTCODE

), the application consistently redirects to the Home Page regardless of the target page specified in the URL. This occurs even after ensuring that no pages require authentication and following all recommended troubleshooting steps.

Expected Behavior

The application should navigate to the specified page in the URL when a deep link is used. For example, using the link

appname://appname.com/youAreAllSet?code=TESTCODE

should direct the user to the 'You Are All Set' page instead of defaulting to the Home Page.**

Steps to Reproduce

  1. Create a new FlutterFlow project.
  2. Add two new pages — for example, name them HomePage and TargetPage.
  3. Configure deep linking: Set up the app to handle custom URL schemes (e.g., appname://). Define routes for both pages.
  4. Modify the project settings: Ensure no pages require authentication. Set TargetPage to be accessible directly via deep link.
  5. Deploy the app and test the deep link: Use the URL appname://appname.com/TargetPage and observe that the app redirects to HomePage instead of TargetPage.

Reproducible from Blank

Bug Report Code (Required)

IT4szPHl3412obhb+Kr+bsBB/Co6NVM3ROYescsZbw4bB4zqPLJ/ZczeblpuOce/d2lhHE6jpFgdp9b7kYXtL/EDGzmcY7ZY+LlyUwzhTXq8RbXXCLWKPUdPI+FVJnav5qaF2hV+Xe9adF0t602qJN6uYA7cN5+/Zwh9f6PHaOI=

Context

This deep linking issue has severely delayed our app's deployment and impacted our release schedule. We need deep linking to direct users from external sources straight to specific app pages, essential for our OAuth mechanism because when an OAuth process succeeded from another app, user must be automatically redirected into the "You Are All Set" page. Despite extensive troubleshooting and testing, including using a beta version of FlutterFlow, all deep links still incorrectly redirect to the home page instead of the intended pages. This problem limits our app's functionality and affects our business goals, necessitating a prompt resolution.

Visual documentation

Ekran Resmi 2024-05-08 14 34 23

each time when i write a link to a target page and hit enter in Safari, i got this from XCode debug section.

Additional Info

No response

Environment

- FlutterFlow version: v4.1.48+
- Platform: iOS
- Browser name and version: Chrome
- Operating system and version affected: iOS

General

Relative to the time the changes were made, data was lost within

When following my steps to reproduce, data loss happens

ignalauret commented 1 week ago

Hey @fuzunist thanks for your report. Are you sure the Deep Links you are generating, match the path that is set on the Route Settings of the Page? For example, the steps to reproduce you provided would not work, given that if you create a page called TargetPage, the deep link for that will end with /targetPage, not /TargetPage.
If you could please provide me the Bug Report Code for a Blank Project where you can reproduce this issue it would be great. If you need help on setting the Deep Links, please contact out Customer Support team, they will be able to give you a better help than me.
If you still think there is a bug here, please let me know with the project with the steps reproduced.
Thanks and have a great day!

fuzunist commented 1 week ago

Dear @ignalauret,

First and foremost, thank you for your attention to this matter.

Despite extensive efforts with the Customer Support Team, we have been unable to resolve the ongoing issue. Consequently, I have escalated the matter by creating this ticket.

For a clearer understanding of the problem, I have prepared a brief Loom video demonstrating the specific issue. I would greatly appreciate it if you could take a moment to view the video at your earliest convenience.

Here is the video.

Thank you for your assistance.

Best regards.

zorgonred commented 6 days ago

Screenshot 2024-05-13 at 14 37 49 I believe this is the issue

zorgonred commented 6 days ago

@ignalauret

zorgonred commented 3 days ago

This has been fixed in latest V @ignalauret @fuzunist

zorgonred commented 3 days ago
  void _handleDynamicLink(PendingDynamicLinkData linkData) {
    final link = linkData.link.toString();
    final host = linkData.link.host;
    final location = link.split(host).last;
    if (widget.router.getCurrentLocation() != location) {
      widget.router.push(location);
    }
  }