-
Notifications
You must be signed in to change notification settings - Fork 614
Firestore exception - Unable to resolve host firestore.googleapis.com, #3302
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
Comments
I found a few problems with this issue:
|
Hi @itaishalom, thanks for your report. We'll try to investigate this and see what we can find. In the meantime, since this is a flutter app, may I ask if you've tried reporting at https://github.com/firebaseextended/flutterfire? You may get better help there. Also if you could provide us an MCVE, it'll help speed up our investigation as well. |
Thanks for reply! |
Sorry for the delayed response and thanks for the extra details, @itaishalom. However, I'm unable to repro the issue. Here's a code snippet of what I tried:
Am I missing anything? Could you help answer a few questions for me to narrow down the issue:
Also this looks like a duplicate of #2637, it could be a regression or the fix hasn't been applied to the latest version of Flutter. FWIW, I've also noticed that this issue was experienced by another dev, you could check out his alternative solution here, while we try and resolve this. |
Hi, thanks for reply. |
Hi all, When I get the problem and have a look at the logs, I see the error mentioned in this issue:
I was able to reproduce the behavior with the following code :
|
Hi @itaishalom & @cedricboidin, thanks for the extra details, I was now able to repro the issue. I used the same steps given in #2637. I'll notify an engineer and see what we can do here. |
So this is a grpc-java issue which has been reported here: grpc/grpc-java#8850 In the issue there is a link to a potential fix, we will be working with grpc team to get this released ASAP. Will update this issue when it is fixed. |
I have the same in simulator android
|
i have the same problem , in many users , but it may work if the user restart his getaway or change the network he use , |
I had a similar issue (Unable to resolve host "firestore.googleapis.com": No address associated with hostname) when using the android emulator. But using the real smartphone I don´t have this issue. Another tip is: Can it be related with firebase AppCheck? |
It seems that version 24.0.2 of firebase-firestore includes the GRPC fix and solves the issue. |
Hi all.
I'm using latest firebase_cloud release to flutter (3.1.6) but I think it's the sdk issue.
I have the following on my code:
result = await FirebaseFirestore.instance .collection( 'fields') .get(GetOptions(source: Source.server));
Which works fine.
But!
Sometime after the screen of my phone (Pixel 3a android 12, samsung galaxy a12 android 11) goes off, after a while i see the following exception:
W/ManagedChannelImpl( 7914): [{0}] Failed to resolve name. status={1}
W/Firestore( 7914): (24.0.0) [WatchStream]: (f8463fe) Stream closed with status: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: Unable to resolve host “firestore.googleapis.com”: No address associated with hostname
W/Firestore( 7914): at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:223)
W/Firestore( 7914): at io.grpc.internal.DnsNameResolver.doResolve(DnsNameResolver.java:282)
W/Firestore( 7914): at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:318)
W/Firestore( 7914): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/Firestore( 7914): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/Firestore( 7914): at java.lang.Thread.run(Thread.java:923)
W/Firestore( 7914): Caused by: java.net.UnknownHostException: Unable to resolve host “firestore.googleapis.com”: No address associated with hostname
W/Firestore( 7914): at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:156)
W/Firestore( 7914): at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
W/Firestore( 7914): at java.net.InetAddress.getAllByName(InetAddress.java:1152)
W/Firestore( 7914): at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:631)
W/Firestore( 7914): at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:219)
W/Firestore( 7914): ... 5 more
W/Firestore( 7914): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore( 7914): at libcore.io.Linux.android_getaddrinfo(Native Method)
W/Firestore( 7914): at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
W/Firestore( 7914): at libcore.io.BlockGuardOs.android_getaddrinfo(BlockGuardOs.java:202)
W/Firestore( 7914): at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:73)
W/Firestore( 7914): at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135)
W/Firestore( 7914): ... 9 more
W/Firestore( 7914): }.
When I resume my app, and the above code is called again i get exception:
ERROR: [cloud_firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
I/flutter ( 7914): #0 MethodChannelQuery.get (package:cloud_firestore_platform_interface/src/method_channel/method_channel_query.dart:110:7)
I/flutter ( 7914):
I/flutter ( 7914): #1 _JsonQuery.get (package:cloud_firestore/src/query.dart:390:9)
I/flutter ( 7914):
Any Idea what causes it?
I tried to call retries on the above get() but the same error occurred. The workaround is calling terminate on the firestore object and then recall the above get() and it seem to solve it.
The text was updated successfully, but these errors were encountered: