garyjlin/flutter_tutorial_baby_names

Timestamps and Failed to resolve name Error

Opened this issue · 0 comments

Following error are coming when run this project.

dependencies using as follows.
cloud_firestore: ^0.8.2

W/Firestore(  823): (0.6.6-dev) [Firestore]: The behavior for java.util.Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.
W/Firestore(  823): To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
W/Firestore(  823): 
W/Firestore(  823): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
W/Firestore(  823): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
W/Firestore(  823):     .setTimestampsInSnapshotsEnabled(true)
W/Firestore(  823):     .build();
W/Firestore(  823): firestore.setFirestoreSettings(settings);
W/Firestore(  823): 
W/Firestore(  823): With this change, timestamps stored in Cloud Firestore will be read back as com.google.firebase.Timestamp objects instead of as system java.util.Date objects. So you will also need to update code expecting a java.util.Date to instead expect a Timestamp. For example:
W/Firestore(  823): 
W/Firestore(  823): // Old:
W/Firestore(  823): java.util.Date date = snapshot.getDate("created_at");
W/Firestore(  823): // New:
W/Firestore(  823): Timestamp timestamp = snapshot.getTimestamp("created_at");
W/Firestore(  823): java.util.Date date = timestamp.toDate();
W/Firestore(  823): 
W/Firestore(  823): Please audit all existing usages of java.util.Date when you enable the new behavior. In a future release, the behavior will be changed to the new behavior, so if you do not follow these steps, YOUR APP MAY BREAK.
D/ApplicationLoaders(  823): ignored Vulkan layer search path /data/app/com.google.android.gms-1/lib/arm64:/data/app/com.google.android.gms-1/base.apk!/lib/arm64-v8a for namespace 0x7f77aab160
V/NativeCrypto(  823): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
D/NetworkSecurityConfig(  823): No Network Security Config specified, using platform default
I/ProviderInstaller(  823): Installed default security provider GmsCore_OpenSSL
W/art     (  823): Before Android 4.1, method double java.util.concurrent.ThreadLocalRandom.internalNextDouble(double, double) would have incorrectly overridden the package-private method in java.util.Random
W/art     (  823): Before Android 4.1, method int java.util.concurrent.ThreadLocalRandom.internalNextInt(int, int) would have incorrectly overridden the package-private method in java.util.Random
W/art     (  823): Before Android 4.1, method long java.util.concurrent.ThreadLocalRandom.internalNextLong(long, long) would have incorrectly overridden the package-private method in java.util.Random
W/ManagedChannelImpl(  823): [{0}] Failed to resolve name. status={1}
W/Firestore(  823): (0.6.6-dev) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: Status{code=UNAVAILABLE, description=Unable to resolve host firestore.googleapis.com, cause=java.net.UnknownHostException: Unable to resolve host "firestore.googleapis.com": No address associated with hostname
W/Firestore(  823): 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
W/Firestore(  823): 	at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
W/Firestore(  823): 	at java.net.InetAddress.getAllByName(InetAddress.java:752)
W/Firestore(  823): 	at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497)
W/Firestore(  823): 	at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200)
W/Firestore(  823): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
W/Firestore(  823): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
W/Firestore(  823): 	at java.lang.Thread.run(Thread.java:760)
W/Firestore(  823): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore(  823): 	at libcore.io.Posix.android_getaddrinfo(Native Method)
W/Firestore(  823): 	at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
W/Firestore(  823): 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:106)
W/Firestore(  823): 	... 7 more
W/Firestore(  823): }
W/Firestore(  823): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
W/ManagedChannelImpl(  823): [{0}] Failed to resolve name. status={1}
W/ManagedChannelImpl(  823): [{0}] Failed to resolve name. status={1}
W/ManagedChannelImpl(  823): [{0}] Failed to resolve name. status={1}