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

Timestamp and Failed to Resolve Name Error #1

Open
chintooflutter opened this issue Mar 1, 2019 · 0 comments
Open

Timestamp and Failed to Resolve Name Error #1

chintooflutter opened this issue Mar 1, 2019 · 0 comments

Comments

@chintooflutter
Copy link

When i try to run above project then following error are coming.
In pubspec.yml using "cloud_firestore: " latest version.

W/Firestore(16466): (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(16466): 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(16466): 
W/Firestore(16466): FirebaseFirestore firestore = FirebaseFirestore.getInstance();
W/Firestore(16466): FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
W/Firestore(16466):     .setTimestampsInSnapshotsEnabled(true)
W/Firestore(16466):     .build();
W/Firestore(16466): firestore.setFirestoreSettings(settings);
W/Firestore(16466): 
W/Firestore(16466): 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(16466): 
W/Firestore(16466): // Old:
W/Firestore(16466): java.util.Date date = snapshot.getDate("created_at");
W/Firestore(16466): // New:
W/Firestore(16466): Timestamp timestamp = snapshot.getTimestamp("created_at");
W/Firestore(16466): java.util.Date date = timestamp.toDate();
W/Firestore(16466): 
W/Firestore(16466): 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(16466): 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(16466): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 287 native methods...
D/NetworkSecurityConfig(16466): No Network Security Config specified, using platform default
I/ProviderInstaller(16466): Installed default security provider GmsCore_OpenSSL
W/art     (16466): 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     (16466): 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     (16466): 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(16466): [{0}] Failed to resolve name. status={1}
W/Firestore(16466): (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(16466): 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
W/Firestore(16466): 	at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
W/Firestore(16466): 	at java.net.InetAddress.getAllByName(InetAddress.java:752)
W/Firestore(16466): 	at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497)
W/Firestore(16466): 	at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200)
W/Firestore(16466): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
W/Firestore(16466): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
W/Firestore(16466): 	at java.lang.Thread.run(Thread.java:760)
W/Firestore(16466): Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
W/Firestore(16466): 	at libcore.io.Posix.android_getaddrinfo(Native Method)
W/Firestore(16466): 	at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
W/Firestore(16466): 	at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:106)
W/Firestore(16466): 	... 7 more
W/Firestore(16466): }
W/Firestore(16466): 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(16466): [{0}] Failed to resolve name. status={1}
W/ManagedChannelImpl(16466): [{0}] Failed to resolve name. status={1}
W/ManagedChannelImpl(16466): [{0}] Failed to resolve name. status={1}
W/ManagedChannelImpl(16466): [{0}] Failed to resolve name. status={1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant