firebase-ios-sdk: Firebase Dynamic Links sometimes got error NSPOSIXErrorDomain Code=53 "Software caused connection abort"
- Xcode version: 10.1
- Firebase SDK version: 5.14
- Firebase Component: FirebaseDynamicLinks
- Component version: 3.3.0
- IOS 12
I created dynamic links from firebase console. Then I clicked that link to open my app.
Sometimes I got success, but sometimes I got error from DynamicLinks.dynamicLinks().handleUniversalLink
in AppDelegate
Error Domain=NSPOSIXErrorDomain Code=53 “Software caused connection abort” UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}
Steps to reproduce:
- click dynamic link to open my app.
- switch back and click dynamic link again
- loop 1-2
Relevant Code:
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if let incomingURL = userActivity.webpageURL {
let handleLink = DynamicLinks.dynamicLinks().handleUniversalLink(incomingURL, completion: { (dynamicLink, error) in
guard error == nil else {
debugPrint(error)
}
if let dynamicLink = dynamicLink {
self.handleIncomingDynamicLink(dynamicLink)
} else {
// Check for errors
}
})
return handleLink
}
return false
}
I’ve read issue from react-native-firebase
And this issue was fixed in 5.2.1 yesterday(22/01/2019)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (7 by maintainers)
Links to this issue
Commits related to this issue
- [firebase_dynamic_links] sometimes got error NSPOSIXErrorDomain Code=53 As in link there is a case of nil at completion of handleUniversalLink. https://github.com/firebase/firebase-ios-sdk/issues/230... — committed to ko2ic/plugins by ko2ic 5 years ago
- [firebase_dynamic_links] sometimes got error NSPOSIXErrorDomain Code=53 As in link there is a case of nil at completion of handleUniversalLink. https://github.com/firebase/firebase-ios-sdk/issues/230... — committed to ko2ic/plugins by ko2ic 5 years ago
- [firebase_dynamic_links] sometimes got error NSPOSIXErrorDomain Code=53 As in link there is a case of nil at completion of handleUniversalLink. https://github.com/firebase/firebase-ios-sdk/issues/230... — committed to ko2ic/plugins by ko2ic 5 years ago
@bhadresh8141 I added delay 50ms before handleUniversalLink and it worked.
I was able to get around this using background tasks. So far, it seems to be working.
According to Apple’s docs the
UIApplication.shared.beginBackgroundTaskhandler is called shortly before the app’s remaining background time reaches 0. So as long ashandleUniversalLinkfinishes before the time allocated to the background task, it should be good.@morganchen12 This is now happening to me, exactly as reported here. Same link, it works once after tapping, second time doesn’t, then works again, then doesn’t… on and on.