🔥Invalid Dynamic Link
Issue
When opening Dynamic Links on a desktop device, they always take the user to 'Invalid Dynamic Link', like the attached screenshot. However, the links work as expected in all mobile devices. Is there any way to manually fix this?
Project Files
iOS
Click To Expand
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
pod 'Firebase/Core', '~> 5.15.0'
pod 'Firebase/Firestore', '~> 5.15.0'
pod 'Firebase/Storage', '~> 5.15.0'
pod 'Firebase/Functions', '~> 5.15.0'
pod 'Firebase/Messaging', '~> 5.15.0'
pod 'Firebase/Auth', '~> 5.15.0'
pod 'Firebase/Database', '~> 5.15.0'
pod 'Firebase/DynamicLinks', '~> 5.15.0'
AppDelegate.m:
#import "AppDelegate.h"
#import "RNFirebaseLinks.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <Firebase.h>
#import "RNFirebaseNotifications.h"
#import "RNFirebaseMessaging.h"
#import <React/RCTLinkingManager.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<NSString *, id> *)options {
return [[RNFirebaseLinks instance] application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler {
return [[RNFirebaseLinks instance] application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
[FIROptions defaultOptions].deepLinkURLScheme = @"MANGOES_LINK";
[RNFirebaseNotifications configure];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Mangoes"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
[[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}
@end
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->
Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [x] Both
react-native-firebaseversion you're using that has this issue:5.2.3
Firebasemodule(s) you're using that has the issue:Dynamic Links
- Are you using
TypeScript?N
Think react-native-firebase is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.
When opening this page in debug mode, I am met with these errors:

To fix the first error, maybe I am building the link wrong. Could somebody please advise whether this is the correct structure for the link param in firebase.links.DynamicLink()?
const link = new firebase.links.DynamicLink(
`https://example.page.link?screen=${screen}&id=${id}`,
'example.page.link',
);
// ...do IOS & Android specific things
return firebase
.links()
.createShortDynamicLink(link, 'SHORT')
.then(url => url);
An example in the documentation would definitely be helpful. https://rnfirebase.io/docs/v5.x.x/links/reference/DynamicLink
I wouldn't spend any time troubleshooting anything on firebase ios sdk version 5.whatever. They are on 6.8 now and links are something they specifically changed. Get current (RN60.5 + RNFB5.5.6 + Pods 6.8) and retry
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
I'm having the same issue. RN61.2, + RNFB 6.1.0 + Pods 6.13
@24dev did you find a solution?
@ammichael Unfortunately not, but we didn't investigate much further. Since you are experiencing this with the new versions, it should probably be reopened.
Hello.
I'm have the same issue. This happend from iOS and Android. RN 61.5 + RNFB 5.6.0
@ammichael did you find a solution?
Thanks
@24dev did you found any solution?
@elwla any solution ??
Never found a solution. Please open a new bug with the new v6 if it's happening to you @thilinawarnakula
@24dev i was receiving the same error with my custom domain and after i setup equals of https://firebase.google.com/docs/dynamic-links/custom-domains was solved