RodrigoSMarques / flutter_branch_sdk

Flutter Plugin for create deep link using Branch Metrics SDK. This plugin provides a cross-platform (iOS, Android, Web).
https://branch.io
MIT License
100 stars 91 forks source link

Branch modifying data inside deep link when +match_guaranteed is FALSE #379

Closed arthurgiani closed 1 month ago

arthurgiani commented 2 months ago

Describe the bug

When listening to FlutterBranchSdk.listSession().map((event) {}), if event[+match_guaranteed] is false, branch deep link is modifying data inside deep link.

To Reproduce The following flow is being made:

1) A deep link is created through the Branch API. 2) Through the API, I added a Map<dynamic,dynamic> 'params' attribute containing some important info for my business rule on this link. 3) This link is sent to a random user (that does not have the app installed). 4) The user clicks on the link and download the app. 5) The app listens to the deep link.

Now, imagine that this 'params' attribute that I described on 2) contains an integer as one of the values. In this scenario, when +match_guaranteed=false, this attribute is being sent through FlutterBranchSdk.listSession() as a DOUBLE, not an int.

Expected behavior Branch link should always show exactly the same information as when they are created.

Screenshots Screenshot 1: event response when +match_guaranteed is FALSE (when app opens for the first time after the install) On the deep link creation, eventId is 0 (int), and not 0.0 (double) Screenshot 2024-09-10 at 18 23 38

Screenshot 2: event response when +match_guaranteed is TRUE (when I click on the deep link with the app installed) On the deep link creation, eventId is 0 (int), exactly the way I settled on the backend. Screenshot 2024-09-10 at 18 28 13

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

RodrigoSMarques commented 2 months ago

@arthurgiani

This package calls Branch Native SDK functions on each platform.

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

The Branch SDK retrieves the link data and the plugin passes it to the Flutter application.

Please open an issue in the platform repository:

Or open a support ticket for Branch at the link

You can use Link Debuger to check the information stored in your link. Instructions here

In this link you have explanations about match_guaranteed.

arthurgiani commented 2 months ago

@arthurgiani

This package calls Branch Native SDK functions on each platform.

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

The Branch SDK retrieves the link data and the plugin passes it to the Flutter application.

Please open an issue in the platform repository:

Or open a support ticket for Branch at the link

You can use Link Debuger to check the information stored in your link. Instructions here

In this link you have explanations about match_guaranteed.

I'll open. Thank you very much.

iOS issue: https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/issues/1428 Android issue: https://github.com/BranchMetrics/android-branch-deep-linking-attribution/issues/1220