Firebase Authentication does not work in ipv6

1,227 views
Skip to first unread message

Clement Yat Hin Chan

unread,
Aug 16, 2016, 11:37:17 AM8/16/16
to Firebase Google Group
Hi All, 

I had an issue while submitting my app to Apple due to the IPv6 compatibility. I am using Firebase as my backend and accessing google geocoding api. I have set up the testing environment as indicated in the following link:

https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1

However, my app does not respond / create new users in firebase while connected to ipv6 network but works fine while connected to ipv4.

Here is how i create using swift:

    override func viewDidLoad() {



       
super.viewDidLoad()

       
// Do any additional setup after loading the view, typically from a nib.

       
FIRAuth.auth()?.createUserWithEmail("xxxxx", password: "xxxxx") { (user, error) in

       
}

     
}




When my device is connected to an ipv4 router, i see the account registered in dashboard. 


However, when I connect my device to ipv6 through my Mac, as guided by the link above: 


I receive the following error:



FirebaseMapipv6[521:87594] <Firebase/Network/ERROR> Encounter network error. Error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x1365a44a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSErrorFailingURLKey=https://play.googleapis.com/log, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}

I am not sure if there is a solution to solve this issue as apple's review will require my app to function on an ipv6 network connection only.


Thanks a lot for your help!


Clement


Kato Richardson

unread,
Aug 16, 2016, 12:56:15 PM8/16/16
to Firebase Google Group
Hi Clement,

This has been discussed at length:


In summary, Firebase doesn't need to use IPv6 for your app to work in the app store and in general the warnings about IPv6 appear to be misleading and the actual errors tend to be things like security rules issues or coding problems.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/01e70811-3916-4321-b55b-2f2011f5f2af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Paul Beusterien

unread,
Aug 17, 2016, 1:29:40 PM8/17/16
to Firebase Google Group
Hi Clement,

Thanks for your report. I've done additional investigation based on the data you provided and unable to reproduce the issue.

Here are the details:

The error you are seeing should have nothing to do with Firebase Authentication. It is a non-fatal error from FIRapp.configure(). I'm unable to reproduce it when I set up an IPv6 network following the instructions on the Apple link you referenced. I also reviewed the code that generates the "Encounter network error." message that you're seeing and verified that it uses the Cocoa URL loading system.

I suspect that something went wrong with your networking set up. Did you verify that you could still connect to other sites from your device? What version of Firebase are you using? Let us know any other details that could be helpful in reproducing the issue you're seeing.

Best regards,
Paul

Clement Yat Hin Chan

unread,
Aug 27, 2016, 12:57:48 AM8/27/16
to Firebase Google Group


Hi Paul, thanks for the reply. I might have issues on the router when i connect the device to my router, I only see the results above. I am not sure if that affects the login. The authentication is very unstable, sometimes it worked, sometimes it does't. I don't seem to be able to figure out the reason. Apple rejected my app a few times saying that there was an issue with the credential using FIRAuth logging in in an ipv6 network. But when I tried to login through the above settings, sometimes i managed to log in, sometimes i don't. Seems like the router finds the hostname/domain sometime but sometimes it doesn't.

Do you think it is the network issue?

Thanks

Clement

Paul Beusterien

unread,
Aug 27, 2016, 5:11:44 PM8/27/16
to Firebase Google Group
Hi Clement,

Your network setting screen shot is comparable to mine when I set up ipv6 on my laptop.  

What xcode (or console) log messages are you seeing when authentication succeeds and when it fails?
Reply all
Reply to author
Forward
0 new messages