3
votes

I'm trying to setup Firebase with React. I can make calls to the database (Firestore) without errors, however, anytime I try to make a call to the database after logging in I get two error messages. The errors only occur after a user has signed in. The ruleset for the database is:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

Error messages:

1) Firestore (7.15.0): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unknown]: Fetching auth token failed: getToken aborted due to token change.

2) FirebaseError: Failed to get document because the client is offline.

Picture of the error messages

Github Repo

1

1 Answers

2
votes

It sounds like you're describing an issue that was fixed in 7.15.1, so I suggest updating. According to the release notes:

Fixed an issue that prevented the client from connecting to the backend immediately after a user signed in. See GitHub issue #2923.