You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using flutter_branch_sdk in a Flutter app with routers like GoRouter, the SDK provides deep link data only via an asynchronous stream (initSession()).
This causes integration issues where the Flutter router processes the system deep link URI immediately (on cold start or resume from background), before the Branch SDK has provided the actual deep link data.
If the URI does not match any defined route, the app navigates to a fallback/error route or logs a "no route found" warning.
This is not a crash, but a routing behavior issue caused by the lack of a synchronous (or Future) API in the SDK.
GoRouter sees URI: /promo-123 before app logic runs
If route doesn't exist, fallback/error route is triggered
Expected behavior
The app should be able to await deep link data from the Branch SDK before passing it to the router. This requires a Future<Uri?> getInitialDeepLink() or similar synchronous method.
That would allow developers to delay MaterialApp.router or GoRouter initialization until the deep link is available and validated.
Mobile:
Flutter: version: 3.29.3
flutter_branch_sdk version: 8.4.0
OS: Android 14
Device: Pixel 6 Pro
Additional context
This is not a bug in GoRouter. GoRouter works as intended — it routes based on the app’s initial URI or resumed URI. The issue is that flutter_branch_sdk provides deep link data only via a stream, too late for router configuration. Firebase Dynamic Links supports this via a getInitialLink() method — a similar API in Branch would greatly improve compatibility with Flutter routing frameworks.
The text was updated successfully, but these errors were encountered:
Thanks for the update. I checked it, and the issue still persists.
The problem seems to happen when the app is in background mode. When a dynamic link is clicked, the navigation system receives the URL first and tries to load the corresponding named route immediately. Only after that, the listenDynamicLinks logic kicks in and processes the data, which causes a mismatch or delay in navigation.
Describe the bug
When using flutter_branch_sdk in a Flutter app with routers like GoRouter, the SDK provides deep link data only via an asynchronous stream (initSession()).
This causes integration issues where the Flutter router processes the system deep link URI immediately (on cold start or resume from background), before the Branch SDK has provided the actual deep link data.
If the URI does not match any defined route, the app navigates to a fallback/error route or logs a "no route found" warning.
This is not a crash, but a routing behavior issue caused by the lack of a synchronous (or Future) API in the SDK.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The app should be able to await deep link data from the Branch SDK before passing it to the router. This requires a Future<Uri?> getInitialDeepLink() or similar synchronous method.
That would allow developers to delay MaterialApp.router or GoRouter initialization until the deep link is available and validated.
Mobile:
Additional context
This is not a bug in GoRouter. GoRouter works as intended — it routes based on the app’s initial URI or resumed URI. The issue is that flutter_branch_sdk provides deep link data only via a stream, too late for router configuration. Firebase Dynamic Links supports this via a getInitialLink() method — a similar API in Branch would greatly improve compatibility with Flutter routing frameworks.
The text was updated successfully, but these errors were encountered: