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
My app allows users to share links to certain pages in my app to other users using Firebase's Dynamic Link. This feature works fine in my Android version, but iOS users reported app crashes when they click on the dynamic links. In addition, even if the app was in the background (Not dead) the app crashes when users click on the dynamic link.
This is how I initialize my dynamic link plugin:
void init(BuildContext context) async {
FirebaseDynamicLinks.instance.onLink(
onSuccess: (PendingDynamicLinkData dynamicLink) async {
final Uri deepLink = dynamicLink?.link;
final args = deepLink.path.split('/');
args.removeWhere((element) => element.isEmpty);
if (deepLink != null) {
Navigator.pushNamed(context, deepLink.path, arguments: args);
}
},
onError: (OnLinkErrorException e) async {
print('onLinkError');
print(e.message);
}
);
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
final Uri deepLink = data?.link;
if (deepLink != null && !linkOpened) {
linkOpened = true;
Navigator.pushNamed(context, deepLink.path).whenComplete(() => linkOpened = false);
}
}
I found out what the issue was. I analyzed the log file and I noticed that it's complaining about (document_reference.cc:64). This tells me that somewhere in my code, I'm trying to access a document that doesn't exist or the document Id is null which was the case.
Turned out I was trying to get a document with a null value for the document Id. 😅😅
Hello Everyone,
My app allows users to share links to certain pages in my app to other users using Firebase's Dynamic Link. This feature works fine in my Android version, but iOS users reported app crashes when they click on the dynamic links. In addition, even if the app was in the background (Not dead) the app crashes when users click on the dynamic link.
This is how I initialize my dynamic link plugin:
Here's the crash log file I got from testers:
Here's
flutter doctor -v
The text was updated successfully, but these errors were encountered: