Push Notification: "Invalid grant: account not found" after restoring Firebase project

2,246 views
Skip to first unread message

Jessica Dao

unread,
Jul 13, 2021, 5:34:59 AM7/13/21
to Firebase Google Group
Hello,
Yesterday I accidentally deleted my production Firebase project (via GCP, I thought it was something else, I didn't know Firebase projects also showed in GCP).
Today I stored my project. But after that I was NOT able to send anymore Push Notification. I would get this error 
errorInfo: {
    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: "Error fetching access token: invalid_grant (Invalid grant: account not found)". 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.'
  },
  codePrefix: 'app'

After some digging, I noticed my "firebase admin service account" is disabled inside IAM of GCP. I tried to enabled it many times but it kept showing "Service account error" (attached photo). I was wondering if there is a way to fix this since this is currently affecting my users.
I tried another approached by creating another user-key access via the GCP but then I got the "third-party-auth-error"
  errorInfo: {
    code: 'messaging/third-party-auth-error',
    message: 'Auth error from APNS or Web Push Service'
  },
Please help me out.
Thank you
Jessica
GCP service account error.png
Reply all
Reply to author
Forward
0 new messages