Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android non branch deep link sometimes not available #308

Closed
vasa137 opened this issue Apr 9, 2024 · 12 comments
Closed

Android non branch deep link sometimes not available #308

vasa137 opened this issue Apr 9, 2024 · 12 comments
Labels
bug Something isn't working Waiting for Test Waiting for test results after release

Comments

@vasa137
Copy link

vasa137 commented Apr 9, 2024

Describe the bug
When I try to open the app with the non-branch deep link, non_branch_link field sometimes doesn't provide the url I've clicked on.

To Reproduce
Steps to reproduce the behavior:

  1. I've clicked on the link with the custom domain: dev-app.operi.rs/home/orders
  2. Branch SDK logged this D/FlutterBranchSDK( 3719): BranchReferralInitListener - params: {"+non_branch_link":"dev-operi-app://open?link_click_id=1304070486333205728","+clicked_branch_link":false,"+is_first_session":false}
  3. listSession method returned this value in the callback

Expected behavior
I've expected to get non_branch_link = dev-app.operi.rs/home/orders

Smartphone (Please complete the following information. remove session if not platform):

  • Flutter: version: 3.19.2

  • Package version: 7.3.0

  • OS: Android 14

  • Device: Samsung Galaxy S21 FE

  • Additional context

In some periods of the day - the expect behavior is happening, but mostly it returns dev-operi-app://open?link_click_id=XXX. Also, on Xiaomi I've never received this type of the response - it's always the original link.

@vasa137 vasa137 added the bug Something isn't working label Apr 9, 2024
@RodrigoSMarques
Copy link
Owner

Hi @vasa137 .

This package calls Branch Native SDK functions on each platform.

The problem reported is not in the Flutter plugin, but in the Native SDK.

Please open an issue in the platform repository:

Or open a support ticket for Branch at the link

@kalismeras61
Copy link

kalismeras61 commented Apr 23, 2024

@RodrigoSMarques i am also having same issue, it is returning open?link_click_id=1304070486333205728. instead of returning non branch uri

How we can handle this?

@vasa137
Copy link
Author

vasa137 commented Apr 23, 2024

I think the only option is to Generate the link on the Branch portal - since nonBranch links which are using the same domain you registered on Branch Portal will return this thing....

I reached support - but no luck.

@kalismeras61
Copy link

I think the only option is to Generate the link on the Branch portal - since nonBranch links which are using the same domain you registered on Branch Portal will return this thing....

I reached support - but no luck.

But i believe it was working fine it is weird. If they are not going to show non branch links, why is there such a parameter...

@RodrigoSMarques
Copy link
Owner

I believe I have identified the problem. I'm already working on the next version. It will be made available in the next few days.

@kalismeras61
Copy link

@RodrigoSMarques any update ?

@RodrigoSMarques
Copy link
Owner

@RodrigoSMarques any update ?

Reviewing the documentation, as there will be changes to the init method and the way to activate the test key. It will no longer be possible to configure via code.

@RodrigoSMarques
Copy link
Owner

@kalismeras61 @vasa137

Version 8.0.0 released.

Take the tests and report the results.

@vasa137
Copy link
Author

vasa137 commented May 19, 2024

Looks like it's solved in version 8.0.1 - I will monitor it a little bit more - since it was working from time to time before - looks promising until now.

@RodrigoSMarques RodrigoSMarques added the Waiting for Test Waiting for test results after release label May 20, 2024
@vasa137
Copy link
Author

vasa137 commented Nov 10, 2024

Hello @RodrigoSMarques, it stopped working completely recently. I noticed issues in my app (using version 8.2.0).
So non_branch_link again shows some weird things (link_click_id) without path

I was testing with: https://app.operi.rs/home/profile and I get in the flutter app - operi-app://?link_click_id=...

Also, what I noticed recently (not sure if it's connected with this thing) - when app is brought from background - like after recaptcha check on Firebase - deep link listener is triggered with "/" value, causing my app to go to home screen, instead of staying on the current screen (before going to background). But this is definitely smaller problem (but maybe they are connected).

Can you please fix again?

@RodrigoSMarques
Copy link
Owner

@vasa137

I couldn't understand the scenarios you reported.

Remember that when clicking on a deeplink, Branch services (API) are responsible for returning the data.

The plugin only bridges the gap between the native code and Dart.

If the data returned for a deeplink is incorrect, it is due to the Branch API return, not the plugin.

Note: If the application was in the foreground, goes to the background and returns, the Branch SDK always "restarts" the return data.

@vasa137
Copy link
Author

vasa137 commented Nov 13, 2024

I believe I have identified the problem. I'm already working on the next version. It will be made available in the next few days.

But few months ago, you identified the issue an it was working fine, now the issue is happening again.

The problem is - when I click on deep link - path always get transformed to "/open?link_click_id=...".

@kalismeras61 had the same problem, and android branch sdk library developers cannot identify what's wrong.

Clicked link:
dev-app.operi.rs/home/profile

Flutter output:
non_branch_link: dev-operi://open?link_click_id=

So scheme transformed to my app scheme, and path transformed to /open which is totally strange.

I just tested it a lot - and I found out when I click on the link with https prefix:

https://dev-app.operi.rs/home/profile prefix it works well

If link is just dev-app.operi.rs/home/profile it doesnt work.

Wow. Maybe it's converted to http and fails to resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for Test Waiting for test results after release
Projects
None yet
Development

No branches or pull requests

3 participants