New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic links sometimes don't trigger the listener #1589
Comments
Hello, same issue here, Edit -- |
I have similar issue here, but it happened if the app has already opened on the background. Dynamic links only works if the app is not open prior to receiving the link on iOS, but Android works as expected. Anyone knows how to solve it? |
Same here. |
I have same problem here! |
Same problem... no idea how to debug this. getInitialLink works every time, but onLink often doesn't get triggered correctly the first time I click a link. If it doesn't get triggered the first time, I will re-click the link and it gets triggered the second time. It only gets triggered every other time (2, 4, 6...). Happening on a real device using iOS version 12.0. |
Any updates on this? I can't even get it to trigger on every other click. Trying on emulator and physical devices on iOS 12.0. |
Did some exploring inside the FirebaseDynamicLinks pod and on line 63 of For some reason, getInitialLink works just fine. |
Yeah we still don't have a solution either and it's a really big problem for us right now. |
@SimonErich I finally solved the problem today. Change this Only other thing I can say is to upgrade to what they released today https://rnfirebase.io/docs/v5.x.x/release-notes#5.1.0 Thanks to this post |
@jackcbrown89 thank you for coming back to share your solution. I updated react-native-firebase to 5.1.0 and also changed the url deepLinkingScheme + url types to my app identifier instead of the url, but I still have the same problem. This is my AppDelegate.m file:
Under XCode -> Capabilities -> Associated domains I have: And I've added a URL type with Identifier |
@SimonErich Could you share your info.plist, entitlements file, and link details (from firebase console)? Also, the old scheme should be fine. |
@jackcbrown89 thanks for sharing your solutions, for me doesn't work too. Thanks. |
I just checked everything again and in my AppDelegate.m file I get the following warning from XCode:
Maybe this has something to do with the problem? Here are the files: |
Hmmm this is weird. But it seems like it has the same behavior. I have only tried it using the firebase short links (xxx.app.goo.g/yyyy) and most of the time it worked, but sometimes the listener of Linking was not called. Can any of you confirm this behavior with react-natives Linking. |
I think I have found the issue. I was debugging the native RNfirebase code. Although I don't know objective C I have found that every second time the app is brought to foreground by link it fails right here with the following error: I have no idea how to solve this issue but maybe this info could help someone who knows how to solve it.... |
Anyone managed to solve this yet? |
@SimonErich could you share a gif of this happening with the same dynamic link? |
I think @kaladivo has stumbled onto one of the causes, if you're on iOS 12 then it's most likely that that is the issue, it's a bug in iOS it seems and it's not just this lib that has the issue; see https://github.com/AFNetworking/AFNetworking/issues/4279 There are some suggestions on there on how to work around it / temporarily patch it (e.g. https://github.com/AFNetworking/AFNetworking/issues/4279#issuecomment-427830725). If anyone can get it working with one of those and send a PR over that'd be great 👌 |
Hello !
my conf : How do you deal with it ? |
Having exactly the same problem but only for iOS.
|
Also same issue on iOS. Although |
Have landed @benschell PR which should solve this issue. It'll be in the next release. Let me know if I can go ahead and close this. |
@Salakar Thanks, man :) |
v5.2.1 is up. Thanks all 👍 Loving
|
We still seem to be experiencing this issue on |
Hey, 5.2.1 didn't help me on iOS 12. It works on initial url open, but not when app is already in the background. Update: nope, seems to be fixed. My problem was that I subscribed to url event with RN's native |
@OzzieOrca have you solved it? I'm still getting the same issue |
I still have the same issue. When opening the link from browser, This works fine but when this link is inside another app I get the following error |
@FrankGoortani did you solved it? |
I have found a workaround: Now, edit the next line after } else if (error != nil && (([NSPOSIXErrorDomain isEqualToString:error.domain] && error.code == 53) || [NSURLErrorDomain isEqualToString:error.domain])) { The issue as per me is that most of the time in iOS while waking up from background firebase tries to resolve the URL too quick and iOS throws |
@Salakar check out that tidbit from @mehuleo - looks very interesting - does the reasoning appear sound to you? Maybe @mehuleo could propose a PR? @mehuleo - just to make sure - you saw errors before, and then after adding the extra boolean test for NSURLErrorDomain to trigger retry in that case, you see more success? |
Hello 👋, to help manage issues we automatically close stale issues.
|
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 have the same problem.When the app is running in background on iOS and I open the link twice or open 2 links one after the other, always the second moment firebase.links().onLink does not trigger. If I open a link and then open the second link after say 2-3 minutes, then it opens. |
Same problem happening with me too. getInitialLink works every time, but onLink often doesn't get triggered correctly. It triggered the first time. In the second time it is not triggering. It only gets triggered every other time (1, 3, 5...). Happening on a real device using iOS version 13.3.1.
|
Can you try with 5.5.6 and tell me if you have the same problem ? |
@IcebergRage Downgrading the version did the trick! Thanks a ton. |
Hey @IcebergRage / @getumangon that's very interesting but not the intended effect. Can someone post a PR that fixes that regression and I can get another 5.x build out. There are not many commits between v5.5.6 tag and tip of v5.x.x branch v5.5.6...v5.x.x - it has to be in there somewhere and I'd welcome a PR |
Honestly - going through that diff - all I see SDK update from 6.8.0 to 6.13.0. I wonder if you could use v5.6.0 with SDK 6.8.0 and it would work? Or if you updated all the way to 6.24.0 if it would work - in other words if this is/was just an upstream SDK issue in those versions. Note that the point of the v5.x.x maintenance is to allow use of modern SDKs so you should be able to compile and use iOS SDK 6.24.0 without problems (I do in my project) |
I have the same issue on Android. I'm using dynamic links 6.7.1, getInitialLink() works very well, but onLink works only with a second time click. |
Why is this issue closed? Seems like the problem isn't fixed. I'm also experiencing this issue - here's my config:
When I launch the app from closed state, Whenever
|
@jkim430 because it was opened almost 2 years ago? Open a new issue with full details. The amount of change in upstream SDKs and this module in 2 years is difficult to imagine |
Issue
We have integrated rnfirebase dynamic links in our app and it usually works well. But sometimes we have a quirk, where dynamic links open the app, but don't trigger the listener.
I can usually reproduce it by following these instructions:
my app maximizes again correctly, but there is no dynamic link change or anything passed and so the app stays on the homescreen.
I tried to debug it, but couldn't find a way.
Here is my Podfile
Environment
iOS
macOS Sierra
Xcode
React Native
version:0.54.1 - 0.57.0 (I've tried with multiple versions in between, but same result everywhere)
React Native Firebase
Version:4.3.0 - 5.0.0 (I've tried with different versions, but same result)
Firebase
Module:dynamic links
typescript
?no
The text was updated successfully, but these errors were encountered: