This error means your app cannot obtain a push token from Firebase Cloud Messaging (FCM). It is almost always an incorrect Firebase configuration in the Android project.
1. Verify google-services.json
- Location: put the file in your app module directory —
app/in a native Android project, orandroid/app/in a Flutter / React Native project. - Content: make sure the file comes from the correct Firebase project and that
package_nameinside it matches your application's applicationId exactly.
2. Apply the Google Services Gradle plugin
Use the syntax that matches your build scripts. The current plugin version is 4.5.0; use the latest available rather than pinning an old one.
Kotlin DSL (build.gradle.kts) — recommended:
Project-level
build.gradle.kts:plugins { // ... other plugins id("com.google.gms.google-services") version "4.5.0" apply false }App-level
app/build.gradle.kts:plugins { // ... other plugins id("com.google.gms.google-services") }
Groovy (build.gradle):
Project-level
build.gradle:buildscript { dependencies { // ... other dependencies classpath 'com.google.gms:google-services:4.5.0' } }App-level
app/build.gradle:apply plugin: 'com.android.application' // ... other plugins apply plugin: 'com.google.gms.google-services'
3. Check the Pushwoosh side
Make sure the Android platform in your Pushwoosh project is configured with the FCM v1 service account JSON exported from the same Firebase project (legacy Server Key / Sender ID configuration was discontinued by Google in June 2024).
Then clean and rebuild the project. This resolves the token retrieval error in the majority of cases.
Comments
0 comments
Please sign in to leave a comment.