Clicking a link created after init after clicking a link resolves old data
See original GitHub issue- Click a deeplink (A) on the web
- You’ll be redirected
branch.init
- Get data of A
branch.link
(B)- Click the created link B
- You’ll be redirected
branch.init
- Get data of … A (expected B)
Refresh keeping the ?_branch_match_id=XXX
keeps resolving A
- Remove
?_branch_match_id=XXX
and press enter branch.init
- Get data of B
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Clicking a link — What happens next? | by Matt Bidewell
But that's just an overview, to resolve the URL it will first check the local browser cache to see if it's resolved recently,...
Read more >Changing href on website but clicking still links to old website
When I hover over the home button, it shows the new link, yet when I click on it the webpage refreshes and goes...
Read more >Create Deep Links to App Content
Without it, clicking a link in a browser cannot resolve to your app. Also include the DEFAULT category. This allows your app to...
Read more >Everything a developer needs to know about deep linking
This guide will help a technically savvy audience to get attribution and deep linking right and help to leverage some of the more...
Read more >Angular: Refetch data on same URL navigation
For example by clicking on a refresh button or a route navigation item while that particular route is already displayed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve tracked down what I think is the issue. When the SDK is deciding to cache or refetch init data there is a check which is resolving to true when (presumably) it should not.
link_identifier === sessionData[‘click_id’]
sessionData[‘click_id’] is the cached identifier of the last visited link - that part is correct. link_identifier gets initialized from the ‘r’ hash, i.e. http://127.0.0.1:5000/linkage-c/#r:172663601188894407
The problem seems to be all links created through branch.link (that look like https://bnc.lt/l/95Kcs0EAY7) redirect to different urls, but with the hash.
The reason
?_branch_match_id=XXX
resolves the issue is because it trumps the value of the ‘r’ hash.(utils.getParamValue(‘_branch_match_id’) || utils.hashValue(‘r’))
My conclusion is that the error lives in the redirect logic on bnc.lt. It should generate a unique hash per url.
The code has been merged and made live for a long time, closing this one out. Thanks team!