Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Expo Android push fails because google-services.json is missing

Error"google-services.json" is missing for firebase

Short answer

Android push in Expo goes through Firebase Cloud Messaging, which needs two separate things: the google-services.json file inside the app, pointed to by android.googleServicesFile, and a service account key uploaded to Expo for sending. If either is missing, the app never gets a push token or the send fails. Add both, then make a new build.

  • Applies to Expo SDK 53, EAS CLI, Firebase Cloud Messaging V1
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check whether your app config points at the file, and whether the file exists at that path.

    grep -n "googleServicesFile" app.json app.config.* 2>/dev/null
    ls -l google-services.json
  2. 2Match what you see, then jump to its fix

    1. 1No googleServicesFile in the android section, or the path does not existThe app config does not point to google-services.jsonFix
    2. 2The app gets a token but Expo's push service cannot deliver to AndroidThe FCM service account key was never uploaded to ExpoFix

What does the error look like?

  • "google-services.json" is missing for firebase

Cause 1 of 2

The app config does not point to google-services.json

1Check

Expo's guide says the file is required for the Android app to be registered with FCM. You download it from the Firebase console and place it in the project root.

grep -n "googleServicesFile" app.json app.config.* 2>/dev/null

2Fix

Download google-services.json from your Firebase project settings, put it in the project root, and set its path under android in app.json. The file only holds public identifiers, so Expo says you may commit it.

{
  "expo": {
    "android": {
      "googleServicesFile": "./google-services.json"
    }
  }
}

3Verify

Create a new build; a config change needs one.

eas build --platform android --profile development

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 2

The FCM service account key was never uploaded to Expo

1Check

Sending needs a Google service account key. In the Firebase console, open Settings > Service accounts and see whether you have generated a private key and uploaded it.

eas credentials

2Fix

Generate a new private key in Firebase, then upload it with EAS CLI: run eas credentials, choose Android, the build profile, and Google Service Account. You can also upload it on the Credentials page of expo.dev. Keep the JSON file out of version control.

eas credentials

3Verify

Send a test push to the Expo push token and check it arrives on the device.

# send a test push to the device and check it arrives

Confirmed by raw.githubusercontent.com

Did this fix it?

How do I stop it coming back?

  • Add the expo-notifications plugin to the plugins array of your app config.
  • Test on a development build or an emulator with Google Play services.
  • Never commit the service account JSON; the google-services.json file is the one that is safe to commit.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Flutter Android: Failed to load FirebaseOptions from resource

Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.

On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.