Open
Description
Whenever the SDK is deployed on a server where the clock happens to be out of sync, the RTDB client logs the following error and goes into a tight loop, from which it can never recover:
@firebase/database: FIREBASE WARNING: {\"code\":\"app/invalid-credential\",\"message\":\"Credential implementation provided to initializeApp() via the \\\"credential\\\" property failed to fetch a valid Google OAuth2 access token with the following error: \\\"Failed to parse access token response: Error: Server responded with status 400.\\\".\"}
To the developer it appears the SDK is stuck/hung. Can we improve this behavior by:
- Logging a more detailed and actionable error message (specifically, mention the clock is possibly out of sync)
- Not going into a tight retry loop when this happens, and instead fail fast.
Related bug reports:
firebase/firebase-admin-node#435
firebase/firebase-admin-node#436