WorryFree Computers   »   [go: up one dir, main page]

Skip to content
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

157240391: SDK attempts to connect to firebasedynamiclinks-ipv6.googleapis.com from IPv4 network. #5032

Closed
a-h opened this issue Mar 6, 2020 · 48 comments · Fixed by #6428
Closed
Assignees
Milestone

Comments

@a-h
Copy link
a-h commented Mar 6, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.3.1 (11C504)
  • Firebase SDK version: Firebase/Core 6.13.0
  • Firebase Component: DynamicLinks
  • Component version: 4.0.7
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Firebase Dynamic Links attempts to connect to an IPv6 domain that it's not capable of connecting to (firebasedynamiclinks-ipv6.googleapis.com).

Steps to reproduce:

Configure Dynamic Links in Firebase.
Open up a Dynamic Link within the iOS 12.2.2 simulator.
Check the logs, no Firebase attribution is made, the error is logged instead.

Task <6B76A91C-2DD5-4B8B-8B92-8FBAA08AEBAA>.<3> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x600000c95ad0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyA0dh9J7ITwtRjMAWiaY_ZvxM1AiHXBAKo, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyA0dh9J7ITwtRjMAWiaY_ZvxM1AiHXBAKo, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}

Relevant Code:

The invalid domain (firebasedynamiclinks-ipv6.googleapis.com) is present in this file:
https://github.com/firebase/firebase-ios-sdk/blob/c8625ec52eb076069efb87ca2e4819627e449efb/FirebaseDynamicLinks/Sources/FIRDynamicLinkNetworking.m

Executing the nslookup command shows that the domain doesn't exist:

$ nslookup firebasedynamiclinks-ipv6.googleapis.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
*** Can't find firebasedynamiclinks-ipv6.googleapis.com: No answer

You can compare this to the other domains in the same file:

nslookup firebasedynamiclinks-ipv4.googleapis.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   firebasedynamiclinks-ipv4.googleapis.com
Address: 216.58.206.138
nslookup firebasedynamiclinks.googleapis.com
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   firebasedynamiclinks.googleapis.com
Address: 172.217.169.74

It is possible to view the IP v6 address:

dig firebasedynamiclinks-ipv6.googleapis.com AAAA
; <<>> DiG 9.10.6 <<>> firebasedynamiclinks-ipv6.googleapis.com AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49237
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;firebasedynamiclinks-ipv6.googleapis.com. IN AAAA

;; ANSWER SECTION:
firebasedynamiclinks-ipv6.googleapis.com. 194 IN AAAA 2a00:1450:4009:806::200a

;; Query time: 45 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Mar 06 16:02:41 GMT 2020
;; MSG SIZE  rcvd: 97
@google-oss-bot

This comment has been minimized.

@a-h a-h changed the title firebasedynamiclinks-ipv6.googleapis.com referenced in code does not exist SDK attempts to connect to firebasedynamiclinks-ipv6.googleapis.com from IPv4 network. Mar 6, 2020
@a-h
Copy link
Author
a-h commented Mar 6, 2020

I've also reproduced the issue in the iOS 13.3 simulator.
I've also reproduced the issue in SDK version 6.15.0.

@a-h
Copy link
Author
a-h commented Mar 6, 2020

Screenshot 2020-03-06 at 17 04 50

@a-h
Copy link
Author
a-h commented Mar 10, 2020

A similar issue was filed in the .NET SDK in 2018 and was resolved by updating the domain to firebasedynamiclinks.googleapis.com, see googleapis/google-api-dotnet-client#1186 for more details.

@dmandar
Copy link
Contributor
dmandar commented Mar 11, 2020

Thanks for reporting. We will investigate this and report back.

@amaurydavid
Copy link
amaurydavid commented Mar 19, 2020

I also have this error when launching the app.

Firebase/DynamicLinks (4.13.0)
Xcode 11.3.1 (11C505)
iOS 13.3.1

Task <04001BC8-E31D-4A9A-BD48-36D5A1FC289C>.<3> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "Aucun serveur ayant le nom d'hôte précisé n'a été détecté." UserInfo={NSUnderlyingError=0x2805e0540 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyBEGzjiP42Y_cc6t_ISG1xYLQmoACh7JIA, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyBEGzjiP42Y_cc6t_ISG1xYLQmoACh7JIA, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=Aucun serveur ayant le nom d'hôte précisé n'a été détecté.}

edit: wait, now that I posted I can't reproduce. Damn.

@fetching
Copy link

Hi, in case its helpful I also see this issue.

2020-03-20 21:53:30.115019-0400 [22075:10757038] Task <5562A0D9-05C7-4593-960F-C09CBE08188C>.<2> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x600001670810 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyAS6sGtB1V55M-g8c4Z3rzZaM5DTCnaDZM, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyAS6sGtB1V55M-g8c4Z3rzZaM5DTCnaDZM, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}

I'm running:

Xcode Version 11.2.1 (11B53)
iPad running iOS 13.3.1

Here are the Firebase pod versions that I'm using. I've run 'pod update' to get the latest:

  - Firebase/Analytics (6.20.0):
    - Firebase/Core
  - Firebase/Core (6.20.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.3.1)
  - Firebase/CoreOnly (6.20.0):
    - FirebaseCore (= 6.6.4)
  - Firebase/Database (6.20.0):
    - Firebase/CoreOnly
    - FirebaseDatabase (~> 6.1.4)
  - Firebase/DynamicLinks (6.20.0):
    - Firebase/CoreOnly
    - FirebaseDynamicLinks (~> 4.0.7)
  - FirebaseAnalytics (6.3.1):
    - FirebaseCore (~> 6.6)
    - FirebaseInstallations (~> 1.1)
  - FirebaseAnalyticsInterop (1.5.0)
  - FirebaseAuthInterop (1.1.0)
  - FirebaseCore (6.6.4):
    - FirebaseCoreDiagnostics (~> 1.2)
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
  - FirebaseCoreDiagnostics (1.2.2):
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
  - FirebaseCoreDiagnosticsInterop (1.2.0)
  - FirebaseDatabase (6.1.4):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 6.0)
  - FirebaseDynamicLinks (4.0.7):
    - FirebaseAnalyticsInterop (~> 1.3)
    - FirebaseCore (~> 6.2)
  - FirebaseInstallations (1.1.0):
    - FirebaseCore (~> 6.6)

@GRiMe2D
Copy link
GRiMe2D commented Mar 27, 2020

Hello, I've tested my IPv6 using https://test-ipv6.com and it says I (my ISP) don't have any IPv6 compatibility.

And this causes my app freeze on the first launch. Relaunching helps. I'm also getting the same error messages
Screen Shot 2020-03-27 at 8 25 39 PM

@aceontech
Copy link

I can also definitely reproduce. And if this occurs in your app's startup sequence, it will hang the app, with iOS killing it after 20-odd seconds...

@tapizquent
Copy link

Is there a fix for this? Dynamic links don't open the app and I am sure this might be the issue. If the attribution does not install, then the app will not open. Please help

@aceontech
Copy link

Is there a fix for this? Dynamic links don't open the app and I am sure this might be the issue. If the attribution does not install, then the app will not open. Please help

I was able to work around this by moving Firebase initialization out of the app's startup sequence, i.e. delaying it much as possible, and not having it in AppDelegate.init or AppDelegate.appDidFinishLaunching. This fix hasn't gone into production for our app yet, so we'll still need to see if it actually works. It's a hard one to reproduce, but when you do, you can't get out of it, unless you reinstall the app.

@tapizquent
Copy link

Is there a fix for this? Dynamic links don't open the app and I am sure this might be the issue. If the attribution does not install, then the app will not open. Please help

I was able to work around this by moving Firebase initialization out of the app's startup sequence, i.e. delaying it much as possible, and not having it in AppDelegate.init or AppDelegate.appDidFinishLaunching. This fix hasn't gone into production for our app yet, so we'll still need to see if it actually works. It's a hard one to reproduce, but when you do, you can't get out of it, unless you reinstall the app.

This is kind of an issue for me as I’m working with a Flutter app and barely have to touch the actual iOS code, but I will try and take a look at that to see what’s going on. I did realize that the links work on the simulator but not on a real device, which is weird

@airwavetechio-gh
Copy link
airwavetechio-gh commented Apr 29, 2020

I ran into this myself today. Firebase 6.23.0, using Flutter. Happy to provide any data but basically I'm getting the same errors that others have listed. Works fine on Android. It was working once upon a time on IOS 13.3 and 13.4, but after a pod update (I think), I have not been able to fix it.

@jgersindemir
Copy link

Yeah , same problem.
`2020-05-03 20:05:48.492994+0300 [839:408719] Task <4D1203B1-9569-4E97-84BB-5929DF9C4FD5>.<2> HTTP load failed, 0/0 bytes (error code: -1003 [12:8])

2020-05-03 n20:05:48.494219+0300 [839:408719] Task <4D1203B1-9569-4E97-84BB-5929DF9C4FD5>.<2> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x283d02c70 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}

@taduyde
Copy link
taduyde commented May 13, 2020

I got the same issue, Is there any update?

@MattiaConfalonieri
Copy link

Same issue here

@paulb777 paulb777 assigned eldhosembabu and unassigned dmandar May 18, 2020
@NigamAnkit
Copy link

same issue here

@JasonAHeron JasonAHeron changed the title SDK attempts to connect to firebasedynamiclinks-ipv6.googleapis.com from IPv4 network. 157240391: SDK attempts to connect to firebasedynamiclinks-ipv6.googleapis.com from IPv4 network. May 21, 2020
@ritenv
Copy link
ritenv commented May 24, 2020

Same issue here, too.

@techyrajeev
Copy link

Any solution for this?

@rikivesa
Copy link

Same here...

@rikivesa
Copy link

It is working by uploading to hardware device.

@proh0r
Copy link
proh0r commented Jun 11, 2020

@harrygt @fbuland pls verify - Is this issue reproduced for your projects on real equipment and in a real environment or not?

@fbuland
Copy link
fbuland commented Jun 11, 2020

I reproduced this issue on a physical iPhone 5s with iOS 12.4.6 and a physical iPhone 6s with iOS 13.4.1. Both are using Wifi connection.
I don't have the opportunity yet to test on mobile network.

@fbuland
Copy link
fbuland commented Jun 11, 2020

In my Podfile.lock : FirebaseDynamicLinks (~> 4.0.8). How to upgrade to v.4.1.0 ?

@alex-mironov
Copy link

same here
facing this issue in RN

  - Firebase/DynamicLinks (6.25.0):
    - Firebase/CoreOnly
    - FirebaseDynamicLinks (~> 4.0.8)

@alif1993

This comment has been minimized.

@rikivesa

This comment has been minimized.

@mikehardy
Copy link
Contributor

@alif1993 that is abusive. 1) these are humans on the other side of your keyboard 2) this SDK is marvellous but also marvellously complicated, how's your migration to IPv6 going for instance? To imply low quality based on this issue, and to infer some kind of lack of care is so insulting.

@mikehardy
Copy link
Contributor
mikehardy commented Jun 19, 2020

Hello, Folks! I have same issue here. Seems that this merge request didn't help.

The pull request (in review comments) actually mentioned it was a separate issue, but the developer who proposed it was aware it wouldn't be fixed

I quote @eldhosembabu from #5665 (comment)

Its not actually, for fixing #5032 we need to optimize the calls i guess for that. Currently we are doing ipv4 and ipv6 calls parallel and consolidate the results which needs to be serialized. In this current fix, I'm just making sure we don't repeat checkforpending calls when there is an error in the previous one.

and one could assume from "this current fix" that's this one is probably on an issue board somewhere pending attention

worth a mention that the SDK is open source, and anyone can propose a PR...you can also hack out the ipv6 code directly perhaps, or do anything you like to get your project moving

@alif1993
Copy link

@mikehardy I agree that I went too far, but when our team has a deadline and the product was supposed to be delivered two weeks ago and coz of this bug which is so weird since everything is okay on Android and it happens on IOS. You are right, it's my fault, I should have checked all our product feature in pre-production. I APOLOGIZE to the team, I left that comment after four consecutive days of searching:) which was completely a wrong move:(

@paulb777
Copy link
Member

@a-h Thanks for the terrific bug report.

And everyone: I'm sorry that we're having trouble making progress on this issue. We'll continue to try to work with the team to get some focus here. In the meantime, we'd be happy to evaluate any PRs.

@tedcurrent
Copy link
tedcurrent commented Jun 30, 2020

Hehey! Any progress on this? Also, if someone has a workaround, I would gladly like to try it out!

@kondratk
Copy link
kondratk commented Jul 1, 2020

Hey! Same problem at my end. I'm inside IPV4 network at my local ISP and firebase tries to connect to ipv6 domain which cannot be resolved from ipv4 network.

@andre991
Copy link
andre991 commented Jul 9, 2020

Same issue here...

- Firebase/DynamicLinks (6.27.1): - Firebase/CoreOnly - FirebaseDynamicLinks (~> 4.1.0)

Screen Shot 2020-07-09 at 12 02 24

Screen Shot 2020-07-09 at 12 02 24

@paulb777 paulb777 removed this from the 6.28.0 - M75 milestone Jul 9, 2020
@IsaiahJTurner
Copy link

It's been months there's still nothing on this?

@mikehardy
Copy link
Contributor

@IsaiahJTurner you have to dig a bit but there is activity, it is just a mix of different issues and internal conversations. Specifically examine discussion here: #5966 - a rejected PR that might have fixed this but had some unacceptable backend consequence - from 9 days ago, so I'd infer it's an active topic, just without messaging here for status

@rnikitin1
Copy link

Does this issue still active? Maybe someone has something like workaround/hack or we still need to find a solution?

@garyhooper
Copy link

Any solution to this? It's been at least 6 months without a fix.

@hechukwu
Copy link
hechukwu commented Sep 5, 2020

Any solution to this? would gladly get one

@paulb777 paulb777 added this to the 6.33.0 - М80 milestone Sep 10, 2020
eldhosembabu added a commit that referenced this issue Sep 14, 2020
Recreating PR #5966

Instead of using firebasedynamiclinks-ipv4.googleapis.com and firebasedynamiclinks-ipv6.googleapis.com for doing attribution calls, we are moving towards using firebasedynamiclinks.googleapis.com.

Fixes #5032

-changed ipv4 and ipv6 attribution calls with a single direct url.
-Removed and refactored code to get rid of code to handle consolidated results from ipv4 and ipv6 result.
-Made changes to Test app to show alert dialog when universal linking when app is not in background case and also for fresh start case.
@eldhosembabu
Copy link
Contributor

Hi everyone,

Sorry for the delays and lack of communication here, but this issue is now resolved. We were originally worried that by switching to the base API that doesn't specify ipv4 vs ipv6 would lose accuracy based on attribution, but have determined that it's a small corner case and an acceptable tradeoff from a performance and confusion standpoint (printing error logs when it may be working as intended).

Thanks for your patience as we worked through this, this change will be available in the next release expected sometime next week.

@firebase firebase locked and limited conversation to collaborators Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.