google / ground-platform

Ground hosted components: Web console, Cloud Functions, db config
http://groundplatform.org
Apache License 2.0
203 stars 83 forks source link

"Error fetching access token: invalid_grant (Bad Request)" on create/write triggers on local emu #1823

Open gino-m opened 3 months ago

gino-m commented 3 months ago

Filing as "code health" since this is not a user-visible issue; it was never observed in dev or prod environments.

function[us-central1-onWriteLoi]
Sending message to YD35zLKMkhNWtWCrx5gc
11:17:42
W
function[us-central1-onWriteLoi]
Error: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: invalid_grant (Bad Request)". There are two likely causes: (1) your server time is not properly synced or (2) your certificate key file has been revoked. To solve (1), re-sync the time on your server. To solve (2), make sure the key ID for your key file is still present at https://console.firebase.google.com/iam-admin/serviceaccounts/project. If not, generate a new key file at https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk.
    at /Users/gmiceli/Git/google/ground-platform/node_modules/firebase-admin/lib/app/firebase-app.js:85:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runFunction (/Users/gmiceli/Git/google/ground-platform/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:506:9)
    at async runBackground (/Users/gmiceli/Git/google/ground-platform/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:517:5)
    at async processBackground (/Users/gmiceli/Git/google/ground-platform/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:501:5)
    at async /Users/gmiceli/Git/google/ground-platform/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:690:21
11:17:42

@os-micmec I think you can safely ignore these errors.