Skip to content

app/invalid-credential error when the clock is out of sync #1467

Open
@hiranya911

Description

@hiranya911

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:

  1. Logging a more detailed and actionable error message (specifically, mention the clock is possibly out of sync)
  2. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions