'App with firebase authentication keeps stopping

I have three activities. Login,Create Account activity and PostAccountActivity in my app. When Click Create account button I get a crash with the following output on the logcat window

2021-02-03 11:31:47.430 4954-4989/com.example.fauth E/AndroidRuntime: FATAL EXCEPTION: grpc-default-executor-0 Process: com.example.fauth, PID: 4954 java.lang.AssertionError at io.grpc.internal.DnsNameResolver.getResourceResolver(DnsNameResolver.java:536) at io.grpc.internal.DnsNameResolver.access$500(DnsNameResolver.java:60) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:211) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)



Solution 1:[1]

Go to Firebase console > click your project > cloud firestore > rules.....Edit the timestamp date to a date that you want, probably a future date. Because for me the timestamp date had already passed so I had to adjust to a more future date. Dont forget to change the version of your rules too.

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {

    // This rule allows anyone with your database reference to view, edit,
    // and delete all data in your Firestore database. It is useful for getting
    // started, but it is configured to expire after 30 days because it
    // leaves your app open to attackers. At that time, all client
    // requests to your Firestore database will be denied.
    //
    // Make sure to write security rules for your app before that time, or else
    // all client requests to your Firestore database will be denied until you Update
    // your rules
    match /{document=**} {
      allow read, write: if true;
      allow read, write: if request.time < timestamp.date(2022, 12, 30);
    }
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1