flutter_branch_sdk icon indicating copy to clipboard operation
flutter_branch_sdk copied to clipboard

Issue in Web, when used along side of any third party routing package

Open tejHackerDEV opened this issue 1 year ago • 3 comments

I am using QlevarRouter as a routing package to support nested navigations with navigator 2.0 support. Combining it the branch sdk works fine in mobile devices but there is some problem with web version i.e., Lets say i have a deeplink which will redirect to my domain xyz.com/something. Clicking on the deeplink is taking me to xyz.com/?_branch_match_id=someRandomId&utm_medium=someThing&_branch_referrer=someRandomBigString. And my router catching that link & trying to look for that route under my app routes & redirecting to PageNotFound (which is obvious because a route with that link won't present in my app routes). So i can't able to take the user to a particular deeply nested page on web.

I am not sure about other routing packages but as per my knowledge i think this issue will happen in every routing package, because all routers do the same ie., take the url appearing in the browers url address & redirect user to the page that matches the url path defined in their app routes.

tejHackerDEV avatar May 05 '23 16:05 tejHackerDEV

About the url: xyz.com/?_branch_match_id=someRandomId&utm_medium=someThing&_branch_referrer=someRandomBigString.

It's not a problem. It's how the Branch SDK for Javascript and consequently for Flutter Web works.

I don't know how QlevarRouter works, but it will be necessary to handle this route in the code.

RodrigoSMarques avatar May 06 '23 03:05 RodrigoSMarques

But the problem here is Branch is not catching the url in initSession, so I can't able to handle it via code

tejHackerDEV avatar May 06 '23 05:05 tejHackerDEV

I am facing the same issue in android app as well; I'm using onGenerateRoute and it's redirecting to 404 page, but I'm able handle redirect in initSession due to which double redirect is happening.

idipak avatar Oct 05 '23 12:10 idipak

Closed due to inactivity. If necessary open again.

RodrigoSMarques avatar May 20 '24 22:05 RodrigoSMarques