If you initialize your app without a valid set of Firebase options, new users of
your application will experience serious issues.
Firebase options are a set of parameters required by services in order to
successfully communicate with Firebase server APIs and to associate client data
with your Firebase project and Firebase application. Firebase services rely on
valid Firebase options being available from the Firebase core/common library
created during Firebase initialization.
Different Firebase services require different Firebase options to function
properly, but all Firebase services require the following Firebase options:
- API key
- Note: this is
not
an FCM server key, see
FCM server keys
.
Example value:
AIzaSyDOCAbC123dEf456GhI789jKl012-MnO
- Project ID
- Example value:
myapp-project-123
.
- Application ID ("AppID")
- Unique identifier for your app whose format depends on platform:
- For Android:
mobilesdk_app_id
—Note:
this is not an Android package name
.
Example value:
1:1234567890:android:321abc456def7890
- For iOS+:
GOOGLE_APP_ID
—Note:
this is not an Apple Bundle ID
.
Example value:
1:1234567890:ios:321abc456def7890
Troubleshoot Android apps
To improve security, Firebase SDK updates
on February 27
and
afterwards replaced the Firebase Instance ID service with a dependency on the
Firebase Installations API
.
Firebase installations enforces the existence and validity of mandatory Firebase
options API key, Project ID, and Application ID in order to associate client
data with your Firebase project. See
FirebaseOptions
for more
information.
Firebase Cloud Messaging (FCM) with Firebase Instance ID (IID)
If new users of your app are experiencing issues with FCM, it's
possible that you are initializing Firebase without the required set of Firebase
options.
Your application may be using an incomplete or erroneous
google-services.json
configuration file; or your app is
programmatically initializing Firebase
without the full set of required
Firebase options.
As a result, Firebase services like Firebase Cloud Messaging will malfunction
for end users who installed your app after it was released with the updated
Firebase SDKs. Additionally, repeated failing requests to Firebase may slow down
the end-user experience of your app.
What do I need to do?
To fix malfunctioning Firebase services for your applications:
- Update your application by initializing Firebase with a valid API key of your project, a valid Project ID, and a valid Application ID (
mobilesdk_app_id
or "App Id").
- Release a new version of your app to the Play Store.
Troubleshoot Apple apps
To improve security, Firebase SDK updates
on January 14
and afterwards replaced the Firebase Instance ID service with a dependency on
the
Firebase Installations API
.
Firebase installations enforces the existence and validity of mandatory Firebase
options API key, Project ID, and Application ID in order to associate client
data with your Firebase project. See
FIROptions
for more
information.
Firebase Cloud Messaging (FCM) with Firebase Instance ID (IID)
If new users of your app are experiencing issues with FCM, it's
possible that you are initializing Firebase without the required set of Firebase
options.
Your application may be using an incomplete or invalid
GoogleService-Info.plist
configuration file; or your app is
programmatically initializing Firebase
without the full set of required Firebase options.
As a result, Firebase services like Firebase Cloud Messaging will malfunction for
end users who installed your app after it was released with the updated Firebase
SDKs. Additionally, repeated failing requests to Firebase may slow down the end-
user experience of your app.
What do I need to do?
To fix malfunctioning Firebase services for your applications:
- Update your application by initializing Firebase with a valid API key of your project, a valid Project ID, and a valid Application ID (
GOOGLE_APP_ID
or "App Id").
- Default initialization process using a Firebase config file
:
Download your GoogleService-Info.plist config file
from the Firebase console, then replace the existing file in your app.
- Programmatic initialization using a
FIROptions
object
:
Download your GoogleService-Info.plist config file
from the Firebase console to find your API key, Project ID, and Application ID, then update these values in the
FIROptions
object in your app.
- Release a new version of your app to the App Store.
FCM Server keys
If your app is using an
FCM Server key
rather than a
Cloud API key, this could cause a security vulnerability in case you are using
the same FCM Server key to send push notifications via FCM.
In this case, we strongly recommend that you revise how your server
authenticates send requests to FCM
.
Note that FCM Server Keys (which are not the same as the
Firebase/Cloud API keys) must not be included in applications, as they can be
abused to send push notifications in the name of your project.