react-native-branch-deep-linking-attribution icon indicating copy to clipboard operation
react-native-branch-deep-linking-attribution copied to clipboard

getFirstReferringParams always returns empty objects on Android cold starts

Open wmcbain opened this issue 3 years ago • 3 comments

Hi there,

We're running into an issue with react-navigation deep linking and Branch integration on Android. Currently on Android cold starts we are unable to get params from getFirstReferringParams.

Expected:

  • User receives a deep link on Android with the app closed
  • In getInitialUrl we get the applinks url from Branch and get params from getFirstReferringParams as described here: https://reactnavigation.org/docs/deep-linking/#third-party-integrations

Actual:

  • User receives a deep link on Android with the app closed
  • In getInitialUrl we get the applinks url from Branch and get an empty object (no keys or values) from getFirstReferringParams.

Notes:

  • We have followed all integration steps outlined in the docs
  • We are calling branch.skipCachedEvents(); as events even after they are handled call the branch.subscribe function even if a deep link has already been handled
  • iOS works just fine

Environment:

react-native: 0.63.4 react-native-branch: 5.0.1

wmcbain avatar Apr 05 '21 20:04 wmcbain

getFirstReferringParams and getLatestReferringParams don't return anything useful until after a successful branch.subscribe, AFAIK that's just undocumented behavior

evelant avatar Jun 24 '21 15:06 evelant

this is exactly the issue I'm running right now, whenever I open my app, I'm receiving an URL that is basically attached to my app no matter how much I clean everything from the cache to internal memory, it keeps appearing at the start up

Vasault avatar Sep 03 '21 22:09 Vasault

Having the same issue, any update?

ashish3408 avatar Mar 04 '22 09:03 ashish3408