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

Branch initialization error for non logged-in users when disabling tracking

Open tinder-yisongwu opened this issue 5 years ago • 2 comments

Hey team,

We could consistently observing the following branch initialization error for non logged-in users when branch deepLinking into our app for non logged-in users.

Error logs is as below:

Trouble initializing Branch.  Tracking is disabled. Requested operation cannot be completed when tracking is disabled

Reproduce step (cold start):

  1. App is installed and user is not logged in yet.
  2. Clicks on a branch deepLink to deepLinking into the app.
  3. Disable tracking Branch.getAutoInstance(context).disableTracking(isDisabled)
  4. On onStart of the receiving activity, we initialize branch.Branch.sessionBuilder(this).withCallback(branchDeepLinkListener).withData(intentData).init()
  5. Waiting for branch callback.

Expected: Branch data comes back. Actual: Error shows: Tracking is disabled. Requested operation cannot be completed when tracking is disabled.

The logs are as below:

2020-11-03 16:16:12.810 8792-8792/?  disable branch tracking: true
2020-11-03 16:16:13.671 8792-8792/?  Activity started: MainActivity
2020-11-03 16:16:13.679 8792-8792/?  branch initialization
2020-11-03 16:16:16.047 8792-8792/?  branch error message Trouble initializing Branch.  Tracking is disabled. Requested operation cannot be completed when tracking is disabled.

However, after the user is logged in and we closed the app, and using the same branch link to deeplink into the app, the branch return the correct value.

Reproduce step (cold start):

  1. App is installed and user is logged in already.
  2. Clicks on a branch deepLink to deepLinking into the app.
  3. Disable tracking Branch.getAutoInstance(context).disableTracking(isDisabled)
  4. On onStart of the receiving activity, we initialize branch.Branch.sessionBuilder(this).withCallback(branchDeepLinkListener).withData(intentData).init()
  5. Waiting for branch callback.

Expected: Branch data comes back. Actual: Branch data comes back.

The logs are as below:

2020-11-03 17:29:30.664 21052-21052/disable branch tracking: true
2020-11-03 17:29:32.523 21052-21052/Activity started: MainActivity
2020-11-03 17:29:32.535 21052-21052/branch initialization
2020-11-03 17:29:35.087 21052-21052/valid branch info

Could help us with this issue for the unlogged in user case, as we don't receive the data?

tinder-yisongwu avatar Nov 04 '20 02:11 tinder-yisongwu

For more information, when disable tracking and check Charles.

For non logged in case, I didn't see any network traffic for https://cdn.branch.io, branch does not return data.

For logged in case, I see the network call for https://cdn.branch.io/sdk/uriskiplist_v2.json and it returns 200, branch return data.

tinder-yisongwu avatar Nov 04 '20 22:11 tinder-yisongwu

Hey @tinder-yisongwu

Wanted to follow up on this to see if this is still an issue for you?

jf-branch avatar Oct 17 '21 07:10 jf-branch