0

I am facing a wired issue when ill create a release build firebase installation is working properly and firebase authentication token generating but after uploading same apk to play store its not working please help me out. here is error returned by firebase.

2022-04-05 15:19:11.865 9614-9649/? W/Firebase-Installations: Error when communicating with the Firebase Installations server API. HTTP response: [403 Forbidden: {
  "error": {
    "code": 403,
    "message": "Requests from this Android client application com.wrms.secu.trak are blocked.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "API_KEY_ANDROID_APP_BLOCKED",
        "domain": "googleapis.com",
        "metadata": {
          "service": "firebaseinstallations.googleapis.com",
          "consumer": "projects/28778611780"
        }
      }
    ]
  }
}
]

2022-04-05 15:19:11.865 9614-9649/? E/Firebase-Installations: Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.

D.Mishra
  • 1
  • 2
  • 1
    Check your google-service.json file is correct and make sure you have added your signed apk SHA-1. This may help you https://stackoverflow.com/a/64081837/10248593 @D.Mishra – Jinal Patel Apr 05 '22 at 09:58

1 Answers1

1

That is because you must config your Google Cloud API access.

STEP 1:

On https://console.cloud.google.com/

Credentials
Under API Credentials > Android Key (right menu) > Edit API key
Under Android Restrictions:
Add the SHA1 certificate (fingerprint)
(you can add here your android debug version, and your release SHA1 certificate)

If you add the debug, all data is autofilled by Firebase, but compare that all match.

STEP 2: Check on Firebase console your fingerprints.

On https://console.firebase.google.com/

Under Proyect Configuration> General (menu) scroll down..under Your APPS.
"Digital fingerprints SHA certificate"
Check that all is correct, your fingerprints from android debug (if you want test it)

STEP 3: Check on Google Play Console, your release fingerprint.

That is on your App
Configurations> App integrity> Aplications Sign (menu)

Check there that you could have a Sign for your Google Play Release App, and another (or the same certificate) for your UPLOAD <(this is your fingerprint of your keystore/Signed Bundle/ etc)

Final STEP: if all fingerprints match and is registered on Google Cloud API, and is added your google-services.json under ProjectFiles/APP/.. Must work.

Sorry my english if the tittles don't match because I have this options in Spanish.

  • You can too on console.cloud.google.com disable API restrictions... but is less secure. Anyway add it manually your fingerprints. – Angel Sierra Apr 06 '23 at 05:39