Frequently Asked Questions
It's still early for Firebase and we'd love your feedback to help make it the best app platform for your development needs. Below are the current known issues and answers to common questions. If you encounter other challenges or have ideas for better functionality, please report a bug or request a feature and join the discussion on Stack Overflow.Upgrading to Firebase
How do I add Firebase to an existing Google project?
You may have existing projects managed through the Google Cloud console or the Google APIs console. By default, these projects are visible in the Firebase console, but are not considered to be Firebase projects.
To add Firebase to your existing project, click "Import Google Project" on the Firebase console landing page.
How do I use the new Firebase features with my existing firebase.com apps?
If you have an existing Firebase project, registered on firebase.com, you can upgrade your app from the Firebase console.
Check out our iOS, Android, and web upgrade guides for firebase.com apps.
Projects and the Firebase console
What is a Firebase project?
A project is a container for apps across iOS, Android and web. It supports sharing of features such as Database, Config and Notifications between your cross-platform apps.
You should add iOS, Android and web app variants to a single project.
Do I need to provide a SHA-1 when adding an Android app?
A SHA-1 is only required if you are using either Firebase Invites or Firebase Dynamic Links. Adding a SHA-1 to your project simplifies the Google Sign-In configuration with Firebase Authentication.
If you're not using these features, you don't have to provide a SHA-1.
How do I resolve this error: "An OAuth2 client already exists for this package name and SHA-1 in another project"?
This error occurs if we detect that another Firebase or Google Cloud project contains an OAuth 2.0 client ID with the package name and SHA-1 that you specified. You can resolve this by following the instructions here.
I currently have both an existing firebase.com app as well as an existing Google project. How do I import both of them into a single Firebase project?
You should upgrade your firebase.com app into a Firebase project. If you want to use Google Sign In with Firebase Authentication or Firebase Invites in your Firebase project, and you have your OAuth Client registered with another Google project, you can add the OAuth client ID of your Google project to the Auth > Sign in method > Google > Whitelist client IDs from external projects list.
How is my Firebase console language determined?
The language setting for the Firebase console is based on the language selected in your Google account settings under "Account Preferences" > "Language and Input Tools".
The Firebase console is available in the following languages:
- English
- Brazillian Portuguese
- French
- German
- Indonesian
- Japanese
- Korean
- Russian
- Simplified Chinese
- Spanish
- Traditional Chinese
What roles and permissions does the Firebase console support?
The Firebase console and Google Cloud console use the same underlying roles and permissions. At a high-level, these are owner, editor, and viewer.
- A project owner can add other members to the project, link other Google services such as Play/AdMob/AdWords/BigQuery and has full edit access on the project.
- A project editor has full edit access on the project.
- A project viewer has only read access on the project. Note that our UI currently does not hide/disable edit UI controls for project viewers, but these operations will fail for users with viewer role.
What are the prerequisites for linking Play/AdMob/AdWords/BigQuery to my Firebase project?
- For linking your Play account, you need to be both a Firebase project owner and a Play account owner.
- For linking your AdMob app, you need to be both a Firebase project owner and an AdMob administrator.
- For linking your AdWords account, you need to be both a Firebase project owner and an AdWords administrator.
- For linking your BigQuery project, you need to be the Firebase project owner.
What are the supported browsers for accessing Firebase console?
The Firebase console be accessed from recent versions of popular desktop browsers such as Chrome, Firefox, Safari and IE. Mobile browsers are currently not fully supported.
What open source notices should I include in my app?
On Android use, the getOpenSourceSoftwareLicenseInfo method to retrieve the text of licenses to display in your application.
On iOS, the Firebase pod contains a NOTICES file which includes the relevant entries.
Analytics
Analytics: How do I segment users who have have not met some criterion?
You can reframe the problem by "negatively targeting" these users. For example, reframe the problem as "Don't show ads to people who have bought something", and form an audience of those users to target.
Analytics: How do I control how my Analytics data is shared with rest of Firebase?
By default, your Firebase Analytics data is used to enhance other Firebase and Google features. You can control how your Firebase Analytics data is shared in your project settings anytime. Learn more about Data sharing settings.
Analytics: How do I create closed funnels?
In Firebase Analytics, the Funnels page only shows open funnels. To create closed funnels, the events that the developers create have to enforce this. For example, if the following flows are possible:
- Flow 1: Screen A, Screen B, Screen C, Screen D
- Flow 2: Screen X, Screen Y, Screen C, Screen D
You could log the following events :
- Flow 1 →
A, B, C_1, D_1
- Flow 2 →
X, Y, C_2, D_2
Each set of these creates a closed funnel in Firebase Analytics. You can then create an audience of users who log all events in each Flow.
Develop
Crash Reporting: Why are there fewer crash reports in Analytics than Crash Reporting?
Crash Reporting creates a separate background process to upload crash info. If your app extends the Android Application class, you must ensure it is multi-process safe. Otherwise, it may cause concurrency issues. When an app extends an Application object, this object gets instantiated for each process in a multi-process app. Consider the following when adding Crash Reporting to your app:
- If the implementation of this object accesses any out-of-process state (a database, the file system, shared preferences, etc), or performs other actions not safe for a multi-process environment, concurrency issues might arise. This is because multiple instances of the Application object may run simultaneously.
- Many third-party libraries keep out-of-process state (e.g. in a local database) and are subject to the same concurrency issues if they are initialized from the Application object. If your app fits this description and you plan to use Crash Reporting in your app, we strongly encourage you to consider moving the Application logic to Content Providers, or to Android Activities. Any Application logic that is not safe for a multi-process environment can have unintended effects on your app.
Crash Reporting automatically exports captured errors to Firebase Analytics as app_exception events. Currently on Android, you may see a significant discrepancy between the number of Crash Reporting errors and Analytics app_exception events.
Cloud Messaging: What's the difference between Notifications and Cloud Messaging?
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
Here's a comparison of the messaging capabilities provided by Firebase Cloud Messaging and Firebase Notifications:
Capabilities | Notifications | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (i. e. weather) | |||
Clients in predefined user segment (app, version, language) | |||
Clients in specified analytics audiences | |||
Clients in device groups | |||
Upstream from client to server | |||
Message Type | Notifications up to 2kb | ||
Data messages up to 4kb | |||
Delivery | Immediate | ||
Future client device local time | |||
Analytics | Built-in Notifications analytics collection and funnel analytics |
Cloud Messaging: Do I need to use other Firebase services in order to use FCM?
You can use Firebase Cloud Messaging as a standalone component, in the same manner as you did with GCM, without using other Firebase services.
Cloud Messaging: I am an existing Google Cloud Messaging (GCM) developer. Should I move to Firebase Cloud Messaging?
FCM is the new version of GCM under the Firebase brand. It inherits GCM’s core infrastructure, with new SDKs to make Cloud Messaging development easier.
Benefits of upgrading to FCM SDK include:
- Simpler client development. You no longer have to write your own registration or subscription retry logic.
- An out-of-the-box notification solution. You can use Firebase Notifications, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on Firebase Analytics insights.
To upgrade from GCM SDKs to FCM SDKs, see the guides for migrating Android and iOS apps.
Cloud Messaging: Why do my targeted devices apparently fail to receive messages?
When it looks like devices haven't successfully received messages, check first for these two potential causes:
Foreground message handling for notification messages. Client apps need to add message handling logic to handle notification messages when the app is in the foreground on the device. See the details for iOS and Android.
Network firewall restrictions. If your organization has a firewall that restricts the traffic to or from the Internet, you need to configure it to allow connectivity with FCM in order for your Firebase Cloud Messaging client apps to receive messages. The ports to open are:
- 5228
- 5229
- 5230
FCM usually uses 5228, but it sometimes uses 5229 and 5230. FCM does not provide specific IPs, so you should allow your firewall to accept outgoing connections to all IP addresses contained in the IP blocks listed in Google's ASN of 15169.
Cloud Messaging: I have
implemented onMessageReceived
in my Android app, but it
is not being called.
When your app is in the background,
notification messages are displayed
in the system tray, and onMessageReceived
is not called.
For notification messages with a data payload, the notification message
is displayed in the system tray, and the
data that was included with the notification message can be retrieved from the
intent launched when the user taps on the notification.
For more information, see Receive and handle messages.
Realtime Database: What are the scaling limitations of the Realtime Database?
Each Realtime Database instance has limits on the number of write operations per second. For small writes, this limit is approximately 1000 write operations per second. In addition, each database instance has a cap on the number of simultaneous database connections.
Our default limits are large enough for most applications. If you are building an app that requires additional scale, we recommend tracking your usage over time and contacting us if you get near these limits. In some cases, we may need to shard your application across multiple database instances for added scale.
Storage: Why can't I use Firebase Storage?
Firebase Storage creates a default bucket in the Google App Engine free tier. This allows you to quickly get up and running with Firebase and Firebase Storage, without having to put in a credit card or enable a billing account. It also allows you to easily share data between Firebase and a Google Cloud Platform project.
There are, however, two known cases where this bucket cannot be created and you will be unable to use Firebase Storage:
- A project imported from Google Cloud Platform which had a Google App Engine Master/Slave Datastore application.
-
A project imported from Google Cloud Platform which has domain
prefixed projects. For example:
domain.com:project-1234
.
There are currently no workarounds to these issues, and we recommend that you create a new project in the Firebase console and enable Firebase Storage in that project.
Grow
Dynamic Links: Why does my Android app access each Dynamic Link twice?
The getInvitation
API clears the saved Dynamic Link
to prevent it from being accessed twice. Be sure to call this API
with the autoLaunchDeepLink
parameter set to
false
in each of the deep link activities to clear it
for the case when the activity is triggered outside the main
activity.
Notifications: What's the difference between Notifications and Cloud Messaging?
Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
Here's a comparison of the messaging capabilities provided by Firebase Cloud Messaging and Firebase Notifications:
Capabilities | Notifications | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (i. e. weather) | |||
Clients in predefined user segment (app, version, language) | |||
Clients in specified analytics audiences | |||
Clients in device groups | |||
Upstream from client to server | |||
Message Type | Notifications up to 2kb | ||
Data messages up to 4kb | |||
Delivery | Immediate | ||
Future client device local time | |||
Analytics | Built-in Notifications analytics collection and funnel analytics |
Notifications: I am an existing Google Cloud Messaging (GCM) developer, and I want to use Firebase Notifications. What should I do?
Firebase Notifications is an out-of-the-box solution that lets anyone send notifications to target specific audiences based on Firebase Analytics insights. Also, Firebase Notifications provides funnel analysis for every message, allowing easy evaluation of notification effectiveness.
If you are an existing GCM developer, to use Firebase Notifications you have to upgrade from GCM SDKs to FCM SDKs. See the guides for migrating Android and iOS apps.
App Indexing: Can Google Search index multiple languages for a single app?
Google Search supports the following multi-language cases:
- The associated website has unique URLs for each language, and there is one corresponding app HTTP URL for each web URL.
- The associated website has unique URLs for each language, but there is only one app HTTP URL. The app uses system language settings to display the correct language content.
- The associated website has one URL for all languages (or it supports only one language), and there is one corresponding app URL. The website and the application must display the content in the same language when the user has set no preference.
App Indexing: Can App Indexing support multiple websites for an app?
Yes. Make sure that each associated website is verified for the Android app via Google Play Developer console. Learn how to verify your app.
App Indexing: Do sitemaps need to be added via Search Console?
iOS does not require sitemaps, and Android does not require them as long as your app supports HTTP URLs. For custom URLs, you do not need to add sitemaps via Search Console. You can reference sitemaps in your robots.txt file and Google Search will use them. Learn more about Managing sitemaps. However, submitting a sitemap through Search Console lets you see statistics on submitted and indexed HTTP URLs in Search Console.
Earn
AdMob: Will I be able to link my Windows apps to Firebase?
Windows apps are not currently supported in the Firebase console.
AdMob: Why can't I link my AdMob account from the Firebase console?
You can link an AdMob app to a Firebase app via the AdMob console. In order to link the account you need to be both a Firebase project owner and an AdMob admin.
AdMob: Can multiple users link their AdMob account to a Firebase app?
No, every AdMob account will only have one primary user. The primary user is the first user to accept the Firebase terms of service.