question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Branch links not working when app is first opened

See original GitHub issue

Environment

Environment: OS: Windows 10 Node: 8.4.0 Yarn: 1.9.2 npm: 5.3.0 Watchman: Not Found Xcode: N/A Android Studio: Version 1.2.0.0 AI-141.1980579

Packages: (wanted => installed) expo: ^29.0.0 => 29.0.0 react: 16.3.1 => 16.3.1 react-native: https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz => 0.55.4

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/tonicapp-95d0cd78-484d-4714-9bc2-e4a3454b8aec.tar.gz

iOS Standalone

Steps to Reproduce

  1. Setup Branch following the guide in the docs
  2. Branch.subscribe in componentDidMount of the root component
  3. Kill the standalone app completely (close it in iOS)
  4. Tap a branch deep link that’s been created (e.g. https://my-app.test-app.link/123456)

Expected Behavior

The app should start and branch.subscribe should be called correctly with the params from the link tapped.

Actual Behavior

branch.subscribe is never called on app start.

Reproducible Demo

Unfortunately, Branch is only supported in standalone apps and we can’t get a reproducible demo.

More Information

I’ve debugged this issue as far as I can without getting into the native code. Basically RNBranch.redeemInitSessionResult is called on first subscribe but it returns null. This suggests there is a bug in the initialization code of Branch. Expo appears to customise this considerably, so it may be a bug on the Expo side, or it may be a bug on the Branch iOS or Branch react-native side.

Either way, it renders the feature basically useless.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
idecommented, Oct 19, 2018

As mentioned in https://github.com/expo/expo/pull/2158 the fix was deployed for SDK 30. Make sure you’re using the latest SDK version to get the fix.

1reaction
miljantekiccommented, Aug 14, 2018

@AdamJNavarro Not sure how much of a similar issue it is but we have also had issues with Android standalone apps and Branch links opening the app.

If the Branch link is clicked when the application is closed only the initial link gets registered and called and all further links clicks are not registered by the subscribe function. But if the application wasn’t opened by a Branch link then the subscribe function works normally and gets called every time.

Strangely this happens only on Android, on iOS everything works as expected.

I was able to create a reproducible test app using CRNA. When built via Expo it will only register the initial link with which the app was opened but all other link clicks will not call the subscribe function. Here is the repo: https://github.com/CelsiusNetwork/branch-test

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep links do not open the app - Branch Help
Deep links do not open the app · Make sure you are not pasting a deep link in the address bar (in most...
Read more >
Branch Deep link not opening application - Stack Overflow
It appears that the application must be installed via App Store/Test Flight/Ad Hoc or the application will not be considered installed.
Read more >
Universal Links not working properly on iOS 13
Universal Links was working fine on iOS 12 but I ran into issues when I updated to iOS 13.1 yesterday. URLs that's supposed...
Read more >
A complete guide to mobile app deep linking | Adjust
Deep linking is a tricky topic, Adjust is here to help you. Take a look at our guide to learn about universal links,...
Read more >
Why is my Activation Link Not Working? - Branch Help Center
If you don't have the Branch app downloaded and the link won't open, try downloading the Branch app from your mobile device's app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found