有其他挑戰或沒有看到您的問題概述如下?請報告錯誤或請求功能並加入Stack Overflow討論。
Firebase 項目和 Firebase 應用
什麼是 Firebase 項目?
項目是跨 Apple、Android 和 Web 平台的應用程序的容器。它支持跨平台應用程序之間共享數據庫、配置和通知等功能。
您應該將 Apple、Android 和 Web 應用變體添加到單個項目中。您可以使用多個項目來支持多種環境,例如開發、登台和生產。
什麼是 Google Cloud 組織?
Google Cloud 組織是 Google Cloud 項目(包括 Firebase 項目)的容器。這種層次結構可以更好地組織、訪問管理和審核您的 Google Cloud 和 Firebase 項目。有關詳細信息,請參閱創建和管理組織。
如何將 Firebase 添加到現有的 Google Cloud 項目?
您可能通過Google Cloud Console或Google APIs 控制台管理現有項目。默認情況下,這些項目在Firebase 控制台中可見,但不被視為 Firebase 項目。
要將 Firebase 添加到您現有的 Google Cloud 項目,請點擊Firebase 控制台登錄頁面上的添加項目,然後在項目名稱菜單中選擇您的項目。
每個帳戶我可以擁有多少個項目?
- Spark 定價計劃——您的項目配額僅限於少數項目(通常在 5-10 個左右)。
- Blaze 定價計劃 — 只要您的 Cloud Billing 帳號信譽良好,每個 Cloud Billing 帳號的項目配額就會大幅增加。
大多數開發者很少關心項目配額的限制,但如果需要,您可以請求增加項目配額。
請注意,項目的完全刪除需要 30 天,併計入您的配額,直到它被完全刪除。
我可以在一個 Firebase 項目中擁有多少個 Firebase 應用?
Firebase 項目是跨 Apple、Android 和 Web 的 Firebase 應用程序的容器。 Firebase 將 Firebase 項目中的 Firebase 應用總數限制為 30 個。
在這個數字之後,性能開始下降(尤其是對於谷歌分析),最終,在更多數量的應用程序中,一些產品功能停止工作。此外,將 Firebase 應用添加到項目會創建一個或多個底層 OAuth 2.0 客戶端 ID。在單個項目中最多可以創建大約 30 個客戶端 ID。
從最終用戶的角度來看,您應該確保單個 Firebase 項目中的所有 Firebase 應用程序都是同一應用程序的平台變體。例如,如果您開發一個白標應用程序,每個獨立標記的應用程序都應該有自己的 Firebase 項目,但該標籤的 Apple 和 Android 版本可以在同一個項目中。閱讀我們設置 Firebase 項目的一般最佳實踐中的更多詳細指南。
在極少數情況下,您的項目需要超過 30 個應用程序,您可以請求提高應用程序限制。您的項目必須在 Blaze 定價計劃中才能提出此請求。訪問 Google Cloud Console提出您的請求並對其進行評估。在 Google Cloud 文檔中詳細了解配額管理。
如果我將我的項目標記為“生產”環境會怎樣?
在 Firebase 控制台中,您可以將 Firebase 項目的環境類型標記為生產環境或未指定(非生產)環境。
將您的項目標記為環境類型不會影響您的 Firebase 項目的工作方式或其功能。但是,標記可以幫助您和您的團隊在應用生命週期內管理各種 Firebase 項目。
如果您將項目標記為生產環境,我們會在 Firebase 控制台中為項目添加一個顏色鮮豔的Prod標籤,提醒您任何更改都可能影響您關聯的生產應用程序。將來,我們可能會為標記為生產環境的 Firebase 項目添加更多功能和保護措施。
要更改 Firebase 項目的環境類型,請轉到settings Project settings > General ,然後在您的項目卡中Environment下,單擊edit以更改環境類型。
在哪裡可以找到我的 Firebase 應用的應用 ID?
在 Firebase 控制台中,轉到您的settings Project settings 。向下滾動到您的應用卡,然後單擊所需的 Firebase 應用以查看應用的信息,包括其App ID 。
以下是一些示例 App ID 值:
- Firebase iOS 應用程序:
1:1234567890:ios:321abc456def7890
- Firebase Android 應用程序:
1:1234567890:android:321abc456def7890
- Firebase 網絡應用程序:
1:1234567890:web:321abc456def7890
將 Play/AdMob/AdWords/BigQuery 關聯到我的 Firebase 項目或應用的先決條件是什麼?
- 要關聯您的Google Play 帳戶,您需要以下內容:
- 以下任一 Firebase 角色:所有者或 Firebase 管理員
和 - 以下任一 Google Play 訪問級別:帳戶所有者或管理員
- 以下任一 Firebase 角色:所有者或 Firebase 管理員
- 要關聯您的AdMob 應用,您需要同時是 Firebase 項目所有者和 AdMob 管理員。
- 要關聯您的AdWords 帳戶,您需要同時是 Firebase 項目所有者和 AdWords 管理員。
- 要關聯您的BigQuery 項目,您需要成為 Firebase 項目的所有者。
我應該在我的應用程序中包含哪些開源通知?
在 Apple 平台上,Firebase pod 包含一個包含相關條目的 NOTICES 文件。 Firebase Android SDK 包含一個用於顯示許可證信息的輔助Activity
。
Firebase 項目的權限和訪問權限
如何為項目成員分配角色,例如所有者角色?
要管理分配給每個項目成員的角色,您必須是 Firebase 項目的所有者(或被分配具有權限resourcemanager.projects.setIamPolicy
的角色)。
以下是您可以分配和管理角色的地方:
- Firebase 控制台提供了一種在settings >項目設置的用戶和權限選項卡中為項目成員分配角色的簡化方法。在 Firebase 控制台中,您可以分配任何基本角色(所有者、編輯者、查看者)、 Firebase 管理員/查看者角色或任何Firebase 預定義的產品類別角色。
- Google Cloud Console 提供了一套廣泛的工具,用於在IAM頁面中為項目成員分配角色。在 Cloud Console 中,您還可以創建和管理自定義角色,以及授予服務帳號訪問您項目的權限。
請注意,在 Google Cloud Console 中,項目成員稱為principals 。
如果您項目的所有者無法再執行所有者的任務(例如,該人離開了您的公司)並且您的項目不是通過 Google Cloud 組織管理的(請參閱下一段),您可以聯繫 Firebase 支持以分配的臨時所有者。
請注意,如果 Firebase 項目是 Google Cloud 組織的一部分,則它可能沒有所有者。如果您找不到 Firebase 項目的所有者,請與管理您的 Google Cloud 組織的人員聯繫,為該項目分配所有者。
如何找到 Firebase 項目的所有者?
您可以在以下位置查看項目成員及其角色:
- 如果您有權在 Firebase 控制台中訪問項目,則可以在 Firebase 控制台的“用戶和權限”頁面中查看項目成員列表,包括所有者。
- 如果您無權訪問 Firebase 控制台中的項目,請檢查您是否有權訪問 Google Cloud Console 中的項目。您可以在 Google Cloud Console 的IAM頁面中查看項目成員列表,包括所有者。
如果您項目的所有者無法再執行所有者的任務(例如,該人離開了您的公司)並且您的項目不是通過 Google Cloud 組織管理的(請參閱下一段),您可以聯繫 Firebase 支持以分配的臨時所有者。
請注意,如果 Firebase 項目是 Google Cloud 組織的一部分,則它可能沒有所有者。相反,管理您的 GCP 組織的人可以執行所有者可以執行的許多任務。但是,要執行多項特定於所有者的任務(例如分配角色或管理 Google Analytics 屬性),管理員可能需要為自己分配實際的所有者角色才能執行這些任務。如果您找不到 Firebase 項目的所有者,請與管理您的 Google Cloud 組織的人員聯繫,為該項目分配所有者。
為什麼或何時應該為項目成員分配所有者角色?
為確保對 Firebase 項目進行適當管理,它必須具有Owner 。項目的所有者是可以執行多項重要管理操作(例如分配角色和管理 Google Analytics(分析)屬性)的人,而 Firebase 支持人員只能滿足已證明的項目所有者的管理請求。
為 Firebase 項目設置所有者後,保持這些分配是最新的很重要。
請注意,如果 Firebase 項目是 Google Cloud 組織的一部分,則管理您的 Google Cloud 組織的人可以執行所有者可以執行的許多任務。但是,對於一些特定於所有者的任務(例如分配角色或管理 Google Analytics 屬性),管理員可能需要為自己分配實際的所有者角色才能執行這些任務。
我認為我沒有 Firebase 項目,但我收到了一封關於其中的電子郵件。我如何訪問這個項目?
您收到的電子郵件應該包含一個打開 Firebase 項目的鏈接。單擊電子郵件中的鏈接應該會在 Firebase 控制台中打開該項目。
如果您無法在鏈接中打開該項目,請確保您使用收到有關該項目的電子郵件的同一 Google 帳戶登錄 Firebase。您可以通過控制台右上角的帳戶頭像登錄和退出 Firebase 控制台。
請注意,如果您是 Google Cloud 組織的管理員,您可能會收到有關組織內 Firebase 項目更改的通知。但是,您可能沒有足夠的權限來打開 Firebase 項目。在這些情況下,最簡單的解決方案是為自己分配實際的所有者角色以打開項目並執行所需的操作。詳細了解分配所有者角色的原因和時間。
平台和框架
訪問特定於平台的故障排除和常見問題頁面,獲取有用的提示和更多常見問題解答。
Firebase 控制台
訪問 Firebase 控制台支持哪些瀏覽器?
Firebase 控制台可以從最新版本的流行桌面瀏覽器訪問,例如 Chrome、Firefox、Safari 和 Edge。目前不完全支持移動瀏覽器。
為什麼我無法在 Firebase 控制台中訪問我的 Firebase 項目?
如果您無法在 Firebase 控制台中訪問您的 Firebase 項目,請通過訪問項目的 URL 檢查您是否可以訪問該項目。使用以下格式:
https://console.firebase.google.com/project/ PROJECT-ID /overview
如果您仍然無法訪問該項目,請檢查以下內容:
- 確保您使用有權訪問該項目的同一 Google 帳戶登錄 Firebase。您可以通過控制台右上角的帳戶頭像登錄和退出 Firebase 控制台。
- 確保已為項目啟用 Firebase Management API 。
- 確保為您分配了基本 IAM 角色之一(所有者、編輯者、查看者)或其中具有 Firebase 相關權限的角色,例如Firebase 預定義角色。您可以在 Google Cloud Console 的IAM頁面中查看您的角色。
- 如果您的項目屬於 Google Cloud 組織,您可能需要額外的權限才能查看 Firebase 控制台中列出的項目。聯繫管理您的 Google Cloud 組織的人員,為您提供查看項目的適當角色,例如瀏覽器角色。
如果 Firebase 控制台沒有為您加載,請查看此常見問題解答。
為什麼沒有為我加載 Firebase 控制台?
如果您在加載 Firebase 控制台時遇到問題,可以嘗試以下一些故障排除步驟:
- 檢查Firebase 狀態儀表板的控制台行是否存在任何可能的服務中斷。
- 確保您使用的是受支持的瀏覽器。
- 嘗試在隱身或私人窗口中加載 Firebase 控制台。
- 禁用所有瀏覽器擴展。
- 檢查是否有任何東西阻止您的連接,例如防病毒軟件、網絡代理或防火牆。如果是這樣,請嘗試禁用它們。
- 嘗試使用其他網絡或設備加載 Firebase 控制台。
如果上述故障排除步驟均無法解決問題,請聯繫支持部門。
我的 Firebase 控制台語言是如何確定的?
Firebase 控制台的語言設置基於您在Google 帳戶設置中選擇的語言。
要更改您的語言首選項,請參閱更改語言。
Firebase 控制台支持以下語言:
- 英語
- 巴西葡萄牙語
- 法語
- 德語
- 印度尼西亞
- 日本人
- 韓國人
- 俄語
- 簡體中文
- 西班牙語
- 繁體中文
Firebase 控制台支持哪些角色和權限?
Firebase 控制台和 Google Cloud Console 使用相同的底層角色和權限。在Firebase IAM 文檔中詳細了解角色和權限。
Firebase 支持 Owner、Editor 和 Viewer 的基本(基本)角色:
- 項目所有者可以將其他成員添加到項目中,設置集成(項目鏈接到 BigQuery 或 Slack 等服務),並擁有項目的完全編輯權限。
- 項目編輯者擁有項目的完全編輯權限。
- 項目查看者只有項目的讀取權限。請注意,Firebase 控制台當前不會隱藏/禁用項目查看者的編輯 UI 控件,但對於分配了查看者角色的項目成員,這些操作將失敗。
Firebase 還支持:
- Firebase 預定義角色- 精選的 Firebase 特定角色,與 Owner、Editor 和 Viewer 的基本角色相比,可以實現更精細的訪問控制。
- 自定義角色— 您創建的完全自定義的 IAM 角色,用於定制一組滿足您組織特定要求的權限。
價錢
哪些產品是付費的?哪些是免費的?
Firebase 的付費基礎架構產品包括實時數據庫、Firebase 的雲存儲、雲功能、託管、測試實驗室和電話身份驗證。我們為所有這些功能提供免費套餐。
Firebase 還提供許多免費產品:分析、雲消息傳遞、通知編寫器、遠程配置、應用索引、動態鏈接和崩潰報告。您可以在所有計劃中無限量使用這些產品中的任何一種,包括我們的免費 Spark 計劃。此外,電話身份驗證之外的所有身份驗證功能都是免費的。
Firebase 是否為付費產品提供免費試用積分?
Firebase 付費服務可以在Google Cloud 免費試用下使用。新的 Google Cloud 和 Firebase 用戶可以利用 90 天的試用期,其中包括 300 美元的免費 Cloud Billing 積分來探索和評估 Google Cloud 和 Firebase 產品和服務。
在 Google Cloud 免費試用期間,您將獲得一個免費試用 Cloud Billing 帳戶。在免費試用期內,任何使用該結算帳戶的 Firebase 項目都將採用 Blaze 定價計劃。
不用擔心,設置此免費試用 Cloud Billing 帳戶不會讓我們向您收費。除非您通過將免費試用 Cloud Billing 帳戶升級為付費帳戶來明確啟用計費,否則您無需付費。您可以在試用期間隨時升級到付費帳戶。升級後,您仍然可以使用任何剩餘的積分(在 90 天內)。
免費試用期到期後,您需要將項目降級為 Spark 定價計劃,或在 Firebase 控制台中設置 Blaze 定價計劃才能繼續使用您的 Firebase 項目。
詳細了解Google Cloud 免費試用。
我怎麼知道哪個定價計劃適合我?
火花定價計劃
我們的 Spark 計劃是免費開發應用程序的好地方。您可以獲得所有免費的 Firebase 功能(Analytics、Notifications Composer、Crashlytics 等)以及我們大量的付費基礎設施功能。但是,如果您在一個日曆月內超出 Spark 計劃資源,您的應用程序將在該月的剩餘時間內關閉。此外,使用 Spark 計劃時,Google Cloud 功能不可用。
Blaze 定價計劃
我們的 Blaze 計劃專為生產應用程序而設計。 Blaze 計劃還允許您使用付費的 Google Cloud 功能擴展您的應用程序。您只需為消耗的資源付費,讓您可以隨需應變。我們努力使我們的 Blaze 計劃價格與行業領先的雲提供商相比具有競爭力。
如何監控我的使用情況和計費?
您可以在以下任何信息中心的 Firebase 控制台中跟踪您對項目資源的使用情況:
Flame 定價計劃發生了什麼變化?
2020 年 1 月,Flame 定價計劃(額外配額 25 美元/月)已作為新註冊的選項被刪除。現有計劃用戶被授予寬限期,以將他們的項目遷移出 Flame 計劃。 2022 年 2 月,Flame 定價計劃中的剩餘項目降級為 Spark 定價計劃。
因此,
- 現有的 Spark 和 Blaze 計劃項目以及任何新項目都不能再切換到或註冊 Flame 計劃。
- 如果您將現有的 Flame 計劃項目移至不同的定價計劃,則該項目無法返回到 Flame 計劃。
- 降級到 Spark 計劃的項目可以升級到 Blaze 計劃以恢復額外的付費服務。
- 對 Flame 計劃的引用已從文檔中刪除。
您對 Flame 計劃的退休還有更多疑問嗎?閱讀下面的一些其他常見問題解答。
想了解 Firebase 提供的其他定價計劃嗎?訪問我們的Firebase 定價頁面!如果您想開始將任何現有項目轉移到另一個定價計劃,您可以在您的項目的Firebase 控制台中執行此操作。
有關 Flame 計劃退休的其他常見問題解答
我有一個依賴固定 Firebase 成本的項目、流程或業務模型。我該怎麼辦?
註冊 Blaze 定價計劃,並確保設置預算警報。
是否可以授予我創建新 Flame 計劃項目的特殊權限?
不,Firebase 不為項目提供特殊訪問權限以切換或註冊 Flame 計劃。
我將我的 Flame 計劃項目更改為不同的定價計劃。我該如何改回來?
不再可能切換到火焰計劃。要訪問 Flame 計劃提供的服務,請確保您使用的是 Blaze 定價計劃,並考慮為您的項目設置預算警報。
作為 Flame 計劃退役的一部分,我的項目自動切換到不同的定價計劃。我該怎麼辦?
如果您的項目需要超出 Spark 計劃提供的額外配額,則需要將您的項目升級到 Blaze 定價計劃。
為什麼火焰計劃要退役?
多年來,我們看到 Flame 計劃的使用量在下降,大多數使用該計劃的項目都沒有充分發揮其價值。維持此定價計劃通常不具有成本效益,我們認為如果資源用於其他 Firebase 計劃,我們可以更好地為每個人服務。
Blaze 計劃中的免費使用與 Spark 計劃中的免費使用有何不同?
Blaze 計劃的免費使用量每天計算一次。使用限制也不同於 Cloud Functions、電話身份驗證和測試實驗室的 Spark 計劃。
對於 Cloud Functions,Blaze 計劃的免費使用量是在 Cloud Billing 帳號級別而非項目級別計算的,並且具有以下限制:
- 200 萬次調用/月
- 400K GB-秒/月
- 200K CPU-秒/月
- 5 GB 網絡出口/月
對於電話身份驗證,Blaze 計劃的免費使用量按月計算。
對於測試實驗室,Blaze 計劃的免費使用具有以下限制:
- 30 物理設備分鐘/天
- 60 虛擬設備分鐘/天
當我從 Spark 更改為 Blaze 計劃時,免費使用配額是否會重置?
Spark 計劃的免費使用包含在 Blaze 計劃中。遷移到 Blaze 計劃時,免費使用不會重置。
什麼是“同時數據庫連接”?
同時連接相當於連接到數據庫的一個移動設備、瀏覽器選項卡或服務器應用程序。 Firebase 對同時連接到應用數據庫的數量施加了硬性限制。這些限制是為了保護 Firebase 和我們的用戶免受濫用。
Spark 計劃限制為 100 且無法提高。 Flame 和 Blaze 計劃限制每個數據庫同時連接 200,000 個。
此限制與您的應用程序的用戶總數不同,因為您的用戶不會一次全部連接。如果您需要超過 200,000 個同時連接,請閱讀Scale with Multiple Databases 。
如果我超出實時數據庫的 Spark 計劃存儲或下載限制會怎樣?
為了向您提供可預測的價格,Spark 計劃中可供您使用的資源設置了上限。這意味著當您在任何月份超過任何計劃限制時,您的應用程序將被關閉以防止任何進一步的資源使用和額外費用。
如果我超出實時數據庫的 Spark 計劃同時連接限制,會發生什麼情況?
當您的應用程序達到 Spark 計劃的並發限制時,任何後續連接都將被拒絕,直到某些現有連接關閉。該應用程序將繼續為已連接的用戶工作。
如果我超出 Cloud Storage 的 Spark 計劃上傳、下載或存儲限制會怎樣?
當您在 Spark 計劃中的項目中超出 Cloud Storage 限制時,結果取決於您超出的限制類型:
- 如果您超過GB 存儲限制,您將無法在該項目中存儲更多數據,除非您刪除一些存儲的數據或升級到提供更多存儲空間或無限存儲空間的計劃。
- 如果您超過GB 下載限制,您的應用將無法下載更多數據,直到第二天(從美國太平洋時間午夜開始),除非您升級到限制較少或沒有限制的計劃。
- 如果您超過上傳或下載操作限制,您的應用將無法上傳或下載更多數據,直到第二天(從美國太平洋時間午夜開始),除非您升級到限制較少的計劃,或者沒有限制。
Firebase 與 Google Cloud 的集成如何運作?
Firebase 與Google Cloud深度集成。項目在 Firebase 和 Google Cloud 之間共享,因此項目可以啟用 Firebase 服務和 Google Cloud 服務。您可以從 Firebase 控制台或 Google Cloud Console 訪問相同的項目。具體來說:
- 某些 Firebase 產品直接由 Google Cloud 提供支持,例如 Cloud Storage for Firebase。由 Google Cloud 支持的產品列表將隨著時間的推移而繼續增長。
- Firebase 和 Google Cloud 共享您的許多設置,包括協作者和結算信息。您對 Firebase 和 Google Cloud 的使用會出現在同一張帳單上。
此外,當您升級到 Blaze 計劃時,您可以直接在 Firebase 項目中使用 Google Cloud 的任何世界一流的基礎架構即服務和 API,以標準Google Cloud 定價。您還可以將數據從 Google Cloud 直接導出到 BigQuery 進行分析。如需了解詳情,請參閱將BigQuery 與 Firebase 關聯。
將 Google Cloud 與 Firebase 結合使用(與其他不位於同一地點的雲服務相比)有許多安全性增強、延遲改進和節省時間的好處。查看Google Cloud 網站了解更多詳情。
如果我在 Google Cloud Console 中為該項目添加或刪除結算帳號,我的 Firebase 項目會發生什麼情況?
如果將 Cloud Billing 帳號添加到 Google Cloud Console 中的項目,如果該項目當前在 Spark 計劃中,則該項目將自動升級到 Firebase Blaze 計劃。
相反,如果從 Google Cloud Console 中的項目中移除現有的有效 Cloud Billing 帳號,則該項目將降級為 Firebase Spark 計劃。
我可以隨時升級、降級或取消嗎?
是的,您可以隨時升級、降級或取消。請注意,我們不為降級或取消提供按比例退款。這意味著,如果您在計費期結束前降級或取消,您仍需支付當月剩餘時間的費用。
我將獲得什麼樣的支持?
所有 Firebase 應用,包括那些使用免費計劃的應用,都在美國太平洋地區的工作時間內提供來自 Firebase 員工的電子郵件支持。所有帳戶都對帳單相關問題、帳戶相關問題、技術(故障排除)問題和事件報告提供無限支持。
我可以限制 Blaze 計劃的使用量嗎?
不,您目前無法限制 Blaze 計劃的使用量。我們正在評估支持 Blaze 計劃使用上限的選項。
Blaze 用戶可以為他們的項目或帳戶定義預算,並在他們的支出接近這些限制時收到警報。了解如何設置預算警報。
什麼是自動備份?你們提供每小時備份嗎?
自動備份是我們 Blaze 定價計劃為客戶提供的一項高級功能,它每天備份一次 Firebase 實時數據庫數據並將其上傳到Google Cloud Storage 。
我們不提供每小時備份。
你們提供開源、非營利或教育折扣嗎?
我們的 Spark 計劃可供任何類型的個人或組織使用,包括非營利組織、學校和開源項目。由於這些計劃已包含大量配額,因此我們不為開源、非營利或教育項目提供任何特殊折扣或計劃。
您是否提供企業合同、定價、支持或專用基礎架構託管?
我們的 Blaze 計劃適用於各種規模的企業,我們的SLA達到或超過雲基礎設施的行業標準。但是,我們目前不提供企業合同、定價或支持,也不為我們的實時數據庫等服務提供專用基礎架構託管(即本地安裝)。我們正在努力添加其中一些功能。
你們提供臨時定價嗎?我只想為一兩個功能按需付費。
我們在 Blaze 計劃中提供特別定價,您只需為使用的功能付費。
付費 Firebase 計劃如何與廣告一起使用?付費計劃是否有免費廣告積分?
Firebase 定價計劃與廣告分開,因此沒有免費的廣告信用。作為 Firebase 開發人員,您可以將您的 Ads 帳戶“鏈接”到 Firebase 以支持轉化跟踪。
所有廣告活動都直接在 Ads 中進行管理,並且從 Ads 控制台管理廣告計費。
雲函數定價
為什麼我需要一個結算帳號才能使用 Cloud Functions for Firebase?
Cloud Functions for Firebase 依賴於一些付費的 Google 服務: Cloud Build 、 Container Registry和Cloud Storage 。除了現有定價之外,還將對這些服務的使用收費。
您只需為構建函數的運行時容器所需的計算時間付費。
Cloud Storage 與Container Registry互操作,將為運行功能的容器提供存儲空間。您需要為部署功能所需的每個容器付費。您可能會注意到每個存儲容器的小額費用 - 例如,1GB 的存儲按每月 0.026 美元計費。
要了解有關您的帳單可能如何變化的更多信息,請查看以下內容
- Cloud Functions 定價:現有的免費層保持不變。
- Cloud Build 定價: Cloud Build 提供免費套餐。
- 容器註冊表定價。
Cloud Functions for Firebase 是否仍可免費使用?
是的。在 Blaze 計劃中,Cloud Functions 為調用、計算時間和 Internet 流量提供免費層。每月免費提供前 2,000,000 次調用、400,000 GB-sec、200,000 CPU-sec 和 5 GB 的 Internet 出口流量。您只需為超過這些閾值的使用付費。
每次部署操作都會對函數容器使用的存儲空間產生小額費用。例如,如果您的函數通過 Container Registry 消耗 1GB 的存儲空間,則您每月需要支付 0.026 美元的費用。如果您的開發過程依賴於部署功能進行測試,您可以在開發過程中使用Firebase Local Emulator Suite進一步降低成本。
請參閱Firebase 定價計劃和Cloud Functions 定價示例方案。
Firebase 是否計劃提高 Cloud Functions for Firebase 的配額和限制?
沒有。除了取消最大構建時間限制外,沒有計劃更改配額;當達到 120 分鐘的每日構建配額時,您不會收到錯誤或警告,而是根據 Blaze 定價計劃的條款向您收費。請參閱配額和限制。
我可以獲得 300 美元的 Google Cloud 贈金嗎?
是的,您可以在 Google Cloud Console 中創建一個 Cloud Billing 帳戶以獲得 300 美元的贈金,然後將該 Cloud Billing 帳戶關聯到 Firebase 項目。
More about the Google Cloud credit here .
Note that if you do this, you have to then set up the Blaze pricing plan in the Firebase console in order for your project to continue working after the $300 credit is exhausted.
I want to follow a codelab to learn about Firebase. Can you give me a temporary billing account?
No, sorry. You can use the Firebase emulator for development without having a Cloud Billing account. Alternatively, try applying for a Google Cloud free trial . If you're still having trouble paying your bill because of this change, contact Firebase Support.
I'm worried I'm going to rack up a huge bill.
You can set up budget alerts in the Google Cloud Console to help control costs. Also, you can set limits on the number of billed instances created for each of your functions. To get an idea of costing for typical scenarios, see the Cloud Functions Pricing examples.
How can I check my current billing charges?
View the Usage and billing dashboard in the Firebase console.
I use Firebase Extensions. Will I be affected by this change?
Yes. Since extensions use Cloud Functions , extensions that use Node.js 10 or later will be subject to the same charges as other functions.
To use extensions based on Node.js 10 or later, you will need to upgrade to the Blaze pricing plan. You will be charged a small amount (typically around $0.01 per month ) for the Firebase resources required by each extension you install (even if they are not used), in addition to any charges associated with your use of Firebase services.
Privacy
Where can I find information about privacy and security in Firebase?
Check out the page Privacy and Security in Firebase .
Do the Firebase SDKs log any usage/diagnostic information outside of Analytics?
Yes. This is currently iOS-only, but may change in the future. The Firebase Apple platforms SDK includes the FirebaseCoreDiagnostics
framework by default. This framework is used by Firebase to collect SDK usage and diagnostics information to help prioritize future product enhancements. FirebaseCoreDiagnostics
is optional, so if you would like to opt out of sending Firebase diagnostic logs, you can do so by unlinking the library from your application. You can browse the full source, including logged values, on GitHub
A/B Testing
A/B Testing: How many experiments can I create and run?
You are allowed up to 300 experiments per project, which could consist of up to 24 running experiments, with the rest as draft or completed.
AdMob
AdMob: Can I link my Windows apps to Firebase?
No, Windows apps are not currently supported.
AdMob: Why can't I link my app to AdMob from the Firebase console?
You can link an AdMob app to a Firebase app via the AdMob console. Learn how.
AdMob: What permissions or access do I need to link a Firebase app to an AdMob app?
In order to do this linking, you need the following access:
- AdMob : You need to be an AdMob admin.
- Firebase : You must have the
firebase.links.create
permission, which is included in the Owner role and the Firebase Admin role . - Google Analytics : You must have the Edit role or Manage Users role for the property associated with the Firebase project. Learn more.
AdMob: Can multiple users in the same AdMob account link AdMob apps and Firebase apps?
For multi-user AdMob accounts , the user who created the first Firebase link and accepted the Firebase Terms of Service is the only user who can create new links between AdMob apps and Firebase apps.
AdMob: To use AdMob, should I use the Firebase SDK for AdMob or the Google Mobile Ads SDK?
- For iOS projects , use the Google Mobile Ads SDK:
pod 'Google-Mobile-Ads-SDK'
- For Android projects , use the Google Mobile Ads SDK:
implementation 'com.google.android.gms:play-services-ads:20.6.0'
Note that the Firebase Android SDKs for AdMob transitively include the Firebase SDK for Google Analytics. So, if your app calls any Google Analytics APIs and you switch to using the Google Mobile Ads SDK, make sure that you explicitly add the dependency for the Firebase SDK for Google Analytics (
) to your app'scom.google.firebase:firebase-analytics build.gradle
file. - For C++ projects and Unity projects , follow the instructions in the respective documentation.
Analytics
Analytics: When must I upgrade my Google Analytics for Firebase property to retain service?
Any Firebase project created before July 31, 2019 must be upgraded to the full Google Analytics 4 experience if it hasn't already. (Banners display in the Analytics dashboard if an upgrade is required.) The associated Terms of Service must be accepted by February 15, 2022 to ensure data collection continues and by March 15, 2022 to prevent the deletion of the Analytics property and its data. If you no longer want to use Google Analytics and the associated data, no action is required and the property will be deleted on March 15, 2022.
Failure to accept the new Google Analytics Terms of Service will disrupt Firebase features, including: Crash-Free Users (Crashlytics), targeted Configurations and Remote Config personalization, A/B Testing features, Targeting and Campaign Metrics (Cloud Messaging). It will also disrupt Google Analytics for Firebase Integrations , including: Exporting project data to BigQuery , Google Ads Integrations , and AdMob Integrations .
If you have questions about accessing your Firebase project, including finding or assigning an Owner, review the Permissions and access to Firebase projects FAQs .
Analytics: What changed in the Google Analytics section with the October 2021 update?"
You can find a summary of these changes in the Firebase Help Center article New Google Analytics 4 functionality in Google Analytics for Firebase .
Analytics: Why is Google Analytics a recommended part of using Firebase products?
Google Analytics is a free and unlimited analytics solution that works with Firebase features to deliver powerful insights. It enables you to view event logs in Crashlytics, notification effectiveness in FCM, deep link performance for Dynamic Links, and in-app purchase data from Google Play. It powers advanced audience targeting in Remote Config, Remote Config personalization, and more.
Google Analytics acts as a layer of intelligence in the Firebase console to provide you with more actionable insights about how to develop a high quality app, grow your user base, and earn more money.
To get started, read the documentation .
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 Google Analytics data is used to enhance other Firebase and Google features. You can control how your Google Analytics data is shared in your project settings anytime. Learn more about Data sharing settings .
Analytics: What is the new fully upgraded Google Analytics account?
You can read more about the new Google Analytics upgrade in our blog post .
Analytics: How do I know if I'm using Google Analytics for Firebase or a fully upgraded Google Analytics account?
If you see a link to "View your data in Google Analytics" from the analytics dashboard in the Firebase console, then your project is using a fully upgraded Google Analytics account.
You can also check by viewing the Google Analytics card in the Firebase console (you can access this from settings > Project Settings > Integrations , then click Manage ). If you see a Linked Google Analytics account listed in the Your Google Analytics property section, your project is using the full Google Analytics experience in Firebase. If you do not see a Linked Google Analytics account , your project is using Google Analytics for Firebase.
Analytics: What will happen to my data when I upgrade to the new Google Analytics for Firebase?
This will not affect your existing Firebase project analytics data in the Firebase console.
You will be able to continue using the same dashboard and workflows you are using today, and you will also have access to some advanced features in Google Analytics.
Note that if you decide to enable cross-device reporting after making the upgrade, your data will be de-duplicated using the UserID. This may decrease some user counts in the Firebase console.
Analytics: What is Firebase User Segmentation Storage?
Firebase User Segmentation Storage stores audience lists you've created to provide targeting information to other Firebase services that use them, such as Crashlytics, FCM, Remote Config personalization, and more.
Analytics: Why don't I see any data after unlinking my app from Google Analytics?
Your analytics data resides within the Google Analytics property - not within the Firebase project. If you delete or unlink the property, then your data is unlinked from your project as well. The data still resides in that property, however, and you can always relink it to your project.
Creating a new Google Analytics account (and new property) will result in having a blank analytics dashboard in the Firebase console.
Analytics: Why do I get an error when trying to upgrade my project to the new Google Analytics experience?
If you are experiencing and error when upgrading, such as:
The operation has failed (Reason: Requested entity already exists)
or
The operation has failed (Reason: Precondition check failed)
This means that there is an association between your project and an already existing Google Analytics property. You can unlink the property, delete it, or upgrade through the Google Analytics interface.
If this is still an issue, you can use the REST API to unlink by using the removeAnalytics
method , then use the addGoogleAnalytics
method to link a new property.
You can then move the data from one property to another .
Analytics: Will audiences and/or events defined in Google Analytics be available on the Firebase console?
Your audiences and user properties will be synced. For some features, you'll need to use the Google Analytics interface, such as segmentation and closed funnels. You can access the Google Analytics interface directly via deep-links from the Firebase console. Any changes you make from the Firebase console can also be performed in Google Analytics, and those changes will be reflected in Firebase.
Analytics in my iOS app: Can I install Analytics without ad attribution and IDFA collection features?
Yes. See the Configure Data Collection and Usage page for more details.
App Indexing
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 the Google Play Console . Learn how to verify your app .
App Indexing: Do sitemaps need to be added via the 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.
Authentication
Firebase Authentication: Which countries are supported for phone authentication?
Firebase Authentication supports phone number verification across the the world, but not all networks reliably deliver our verification messages. The following countries have good rates of delivery, and should be expected to work well for phone number sign in.
Country | Code |
---|---|
AD | Andorra |
AE | United Arab Emirates |
AF | Afghanistan |
AG | Antigua and Barbuda |
AL | Albania |
AM | Armenia |
AO | Angola |
AR | Argentina |
AS | American Samoa |
AT | Austria |
AU | Australia |
AW | Aruba |
AZ | Azerbaijan |
BA | Bosnia and Herzegovina |
BB | Barbados |
BD | Bangladesh |
BE | Belgium |
BF | Burkina Faso |
BG | Bulgaria |
BJ | Benin |
BM | Bermuda |
BN | Brunei Darussalam |
BO | Bolivia |
BR | Brazil |
BS | Bahamas |
BT | Bhutan |
BW | Botswana |
BY | Belarus |
BZ | Belize |
CA | Canada |
CD | Congo, (Kinshasa) |
CF | Central African Republic |
CG | Congo (Brazzaville) |
CH | Switzerland |
CI | Côte d'Ivoire |
CK | Cook Islands |
CL | Chile |
CM | Cameroon |
CO | Colombia |
CR | Costa Rica |
CV | Cape Verde |
CW | Curaçao |
CY | Cyprus |
CZ | Czech Republic |
DE | Germany |
DJ | Djibouti |
DK | Denmark |
DM | Dominica |
DO | Dominican Republic |
DZ | Algeria |
EC | Ecuador |
EG | Egypt |
ES | Spain |
ET | Ethiopia |
FI | Finland |
FJ | Fiji |
FK | Falkland Islands (Malvinas) |
FM | Micronesia, Federated States of |
FO | Faroe Islands |
FR | France |
GA | Gabon |
GB | United Kingdom |
GD | Grenada |
GE | Georgia |
GF | French Guiana |
GG | Guernsey |
GH | Ghana |
GI | Gibraltar |
GL | Greenland |
GM | Gambia |
GP | Guadeloupe |
GQ | Equatorial Guinea |
GR | Greece |
GT | Guatemala |
GY | Guyana |
HK | Hong Kong, SAR China |
HN | Honduras |
HR | Croatia |
HT | Haiti |
HU | Hungary |
ID | Indonesia |
IE | Ireland |
IL | Israel |
IM | Isle of Man |
IN | India |
IQ | Iraq |
IT | Italy |
JE | Jersey |
JM | Jamaica |
JO | Jordan |
JP | Japan |
KE | Kenya |
KG | Kyrgyzstan |
KH | Cambodia |
KM | Comoros |
KN | Saint Kitts and Nevis |
KR | Korea (South) |
KW | Kuwait |
KY | Cayman Islands |
KZ | Kazakhstan |
LA | Lao PDR |
LB | Lebanon |
LC | Saint Lucia |
LI | Liechtenstein |
LK | Sri Lanka |
LS | Lesotho |
LT | Lithuania |
LU | Luxembourg |
LV | Latvia |
LY | Libya |
MA | Morocco |
MD | Moldova |
ME | Montenegro |
MF | Saint-Martin (French part) |
MG | Madagascar |
MK | Macedonia, Republic of |
MM | Myanmar |
MN | Mongolia |
MO | Macao, SAR China |
MS | Montserrat |
MT | Malta |
MU | Mauritius |
MW | Malawi |
MX | Mexico |
MY | Malaysia |
MZ | Mozambique |
NA | Namibia |
NC | New Caledonia |
NE | Niger |
NF | Norfolk Island |
NG | Nigeria |
NI | Nicaragua |
NL | Netherlands |
NO | Norway |
NP | Nepal |
NZ | New Zealand |
OM | Oman |
PA | Panama |
PE | Peru |
PG | Papua New Guinea |
PH | Philippines |
PK | Pakistan |
PL | Poland |
PM | Saint Pierre and Miquelon |
PR | Puerto Rico |
PS | Palestinian Territory |
PT | Portugal |
PY | Paraguay |
QA | Qatar |
RE | Réunion |
RO | Romania |
RS | Serbia |
RU | Russian Federation |
RW | Rwanda |
SA | Saudi Arabia |
SC | Seychelles |
SE | Sweden |
SG | Singapore |
SH | Saint Helena |
SI | Slovenia |
SK | Slovakia |
SL | Sierra Leone |
SN | Senegal |
SR | Suriname |
ST | Sao Tome and Principe |
SV | El Salvador |
SZ | Swaziland |
TC | Turks and Caicos Islands |
TG | Togo |
TH | Thailand |
TL | Timor-Leste |
TM | Turkmenistan |
TO | Tonga |
TR | Turkey |
TT | Trinidad and Tobago |
TW | Taiwan, Republic of China |
TZ | Tanzania, United Republic of |
UA | Ukraine |
UG | Uganda |
US | United States of America |
UY | Uruguay |
UZ | Uzbekistan |
VC | Saint Vincent and Grenadines |
VE | Venezuela (Bolivarian Republic) |
VG | British Virgin Islands |
VI | Virgin Islands, US |
VN | Viet Nam |
WS | Samoa |
YE | Yemen |
YT | Mayotte |
ZA | South Africa |
ZM | Zambia |
ZW | Zimbabwe |
Cloud Functions
Cloud Functions runtime support
Why is the Node.js 8 runtime deprecated?
On Dec 31, 2019, Node.js 8 was marked end-of-life by the Node.js Foundation . At that time, the Node.js Foundation stopped issuing security releases for Node.js 8. Because of this, we recommend that you update to Node.js 10 or later as soon as you can.
What happens if a Node.js 8 function is left running after the removal of Node.js 8 support? Will it work indefinitely?
No it will not. Deployment of functions to the Node.js 8 runtime was disabled in the Firebase CLI on December 15, 2020. Execution of already-deployed functions will stop at some point in the future; if you have deployed functions to the Node.js 8 runtime, we recommend that you upgrade to the Node.js 12 runtime .
How do I upgrade to Node.js 12?
- Make sure you're on the Blaze pricing plan .
- Make sure you are using Firebase CLI v8.1.0 or later.
- Change the
engines
field in your functions'package.json
. - Optionally, test your changes using the Firebase Local Emulator Suite .
- Redeploy functions using the Firebase CLI v8.1.0 or later.
How can I make sure I deployed my functions to the Node.js 12 runtime?
In the Firebase console, go to the functions dashboard and check the runtime column.
I use Firebase Extensions. Will I be affected by this change?
Yes. Since extensions use Cloud Functions , the runtime of your extensions will need to be updated on the same timeline as Cloud Functions.
We recommend that you upgrade your Firebase project to the Blaze pricing plan and update to the latest version of each extension installed in your project. You can upgrade your projects' extensions via the Firebase console or Firebase CLI .
Cloud Messaging
Cloud Messaging: What's the difference between the Notifications composer 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.
The Notifications composer is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, the Notifications composer lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
Capabilities | Notifications composer | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (ie 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: Apple announced they're decprecating the legacy binary protocol for APNs. Do I need to do anything?
No. Firebase Cloud Messaging switched to the HTTP/2-based APNs protocol in 2017. If you are using FCM to send notifications to iOS devices, there should be no action required on your part.
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 the Notifications composer, a serverless notifications solution with a web console that lets anyone send notifications to target specific audiences based on insights from Google Analytics for Firebase.
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 .
Notifications composer: What's the difference between the Notifications composer and Cloud Messaging?
The Notifications composer is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, the Notifications composer 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 the Notifications composer:
Capabilities | Notifications composer | Cloud Messaging | |
---|---|---|---|
Target | Single device | ||
Clients subscribed to topics (ie 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 composer: I am an existing Google Cloud Messaging (GCM) developer, and I want to use the Notifications composer. What should I do?
The Notifications composer is an out-of-the-box solution that lets anyone send notifications to target specific audiences based on insights from Google Analytics for Firebase. Also, the Notifications composer provides funnel analysis for every message, allowing easy evaluation of notification effectiveness.
If you are an existing GCM developer, to use the Notifications composer you have to upgrade from GCM SDKs to FCM SDKs. See the guides for migrating Android and iOS apps.
Cloud Storage
Cloud Storage: Why can't I use Cloud Storage?
Cloud Storage for Firebase creates a default bucket in the App Engine no-cost tier. This allows you to quickly get up and running with Firebase and Cloud Storage for Firebase, without having to put in a credit card or enable a Cloud Billing account. It also allows you to easily share data between Firebase and a Google Cloud project.
There are, however, two known cases where this bucket cannot be created and you will be unable to use Cloud Storage for Firebase:
- A project imported from Google Cloud which had a App Engine Master/Slave Datastore application.
- A project imported from Google Cloud 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 Cloud Storage for Firebase in that project.
Cloud Storage: Why do I see new service account IDs associated with my Firebase projects that use Cloud Storage?
Firebase uses service accounts to operate and manage services without sharing user credentials. When you create a Firebase project, you might notice that a number of service accounts are already available in your project.
If you used Cloud Storage before September 15, 2020, you may see the following legacy service account that is used to manage your bucket: firebase-storage@system.gserviceaccount.com
.
After September 15, 2020, Cloud Storage for Firebase buckets may include an additional new service account: service-<project number>@gcp-sa-firebasestorage.iam.gserviceaccount.com
.
You can view all service accounts associated with your project in the Firebase console, on the Service accounts tab .
Removing the new service account
We strongly discourage you from removing the new service account because if you do so, you will not be able to take advantage of upcoming security improvements.
However, if you prefer, you can disable the API or remove access from the new service account. Removing this account may block access to your Cloud Storage bucket from your apps.
Adding the new service account
If you removed the new service account or disabled the API and want to add them back, follow the instructions provided in Creating and managing service accounts for using the Google Cloud Console to add service-<project number>@gcp-sa-firebasestorage.iam.gserviceaccount.com
to the set of service accounts for your project.
Crashlytics
Visit the Crashlytics troubleshooting & FAQ page for helpful tips and answers to more FAQs.
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 (eg 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 Google 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.
Dynamic Links
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.
Hosting
Hosting: Why does my Hosting release history table in the Firebase console show file counts that are more than what my local project actually has?
Firebase automatically adds extra files containing metadata about the Hosting site, and these files are included in the total file count for the release.
Hosting: What's the largest file size that I can deploy to Firebase Hosting?
Hosting has a maximum size limit of 2 GB for individual files.
We recommend storing larger files using Cloud Storage , which offers a maximum size limit in the terabyte range for individual objects.
Hosting: How many Hosting sites can I have per Firebase project?
The Firebase Hosting multisite feature supports a maximum of 36 sites per project.
Performance Monitoring
Visit the Performance Monitoring troubleshooting & FAQ page for helpful tips and answers to more FAQs.
Performance Monitoring: How many custom URL patterns can I create?
You can create up to 400 total custom URL patterns per app and up to 100 custom URL patterns per domain for that app.
Performance Monitoring: Why am I not seeing real time display of performance data?
To view real time performance data, make sure that your app uses a Performance Monitoring SDK version that's compatible with real time data processing.
- iOS — v7.3.0 or later
- tvOS — v8.9.0 or later
- Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
- Web — v7.14.0 or later
Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.
Realtime Database
Realtime Database: Why was my Realtime Database reported bandwidth lower than average between September 2016 and March 2017?
For our bandwidth calculations, we normally include SSL encryption overhead (based on layer 5 of the OSI model). However, in September 2016, we introduced a bug that caused our bandwidth reporting to ignore encryption overhead. This might have resulted in artificially low reported bandwidth and bills on your account for a few months.
We released a fix for the bug in late March 2017, returning bandwidth reporting and billing to their normal levels.
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. If you are approaching this limit, batching operations using multi-path updates can help you achieve higher throughput.
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, you may need to shard your application across multiple database instances for added scale. You may also consider Cloud Firestore as an alternative database.
Realtime Database: What can I do if I'm over my Realtime Database usage limits?
If you've received an email alert or notification in the Firebase console that you've exceeded your Realtime Database usage limits, you can address it based on the usage limit you've exceeded. To see your Realtime Database usage, go to the Realtime Database Usage dashboard in the Firebase console.
If you're over your download limit, you can upgrade your Firebase pricing plan or wait until your download limit resets at the start of your next billing cycle. To decrease your downloads, try the following steps:
- Add queries to limit the data that your listen operations return.
- Check for unindexed queries.
- Use listeners that only download updates to data — for example,
on()
instead ofonce()
. - Use security rules to block unauthorized downloads.
If you're over your storage limit, upgrade your pricing plan to avoid service disruptions. To reduce the amount of data in your database, try the following steps:
- Run periodic cleanup jobs.
- Reduce any duplicate data in your database.
Note that it may take some time to see any data deletions reflected in your storage allotment.
If you're over your simultaneous database connections limit, upgrade your plan to avoid any service disruptions. To manage simultaneous connections to your database, try connecting via users via the REST API if they don't require a realtime connection.
Remote Config
Remote Config: Why don't fetched values change the behavior and appearance of my app?
Unless you fetch values with fetchAndActivate()
, values are stored locally but not activated. To activate fetched values so that they can take effect, call activate
. This design lets you control when the behavior and appearance of your app changes, because you can choose when to call activate
. After you call activate
, your app source code determines when updated parameter values are used.
For example, you could fetch values and then activate them the next time a user starts your app, which removes the need to delay app startup while your app waits for fetched values from the service. Changes to your app's behavior and appearance then occur when your app uses the updated parameter values.
To learn more about the Remote Config API and usage model, see Remote Config API Overview .
Remote Config: I am making a lot of fetch requests while developing my app. Why doesn't my app always get the latest values from the service when it sends fetch requests?
During app development, you might want to fetch and activate configs very frequently (many times per hour) to let you rapidly iterate as you develop and test your app. To accommodate rapid iteration on a project with up to 10 developers, you can temporarily set a FirebaseRemoteConfigSettings
object with a low minimum fetch interval ( setMinimumFetchIntervalInSeconds
) in your app.
Remote Config: How quickly does the Remote Config service return fetched values after my app sends a fetch request?
Devices usually receive fetched values in less than a second, and often receive fetched values in milliseconds. The Remote Config service handles fetch requests within milliseconds, but the time required to complete a fetch request will depend on the network speed of the device and the latency of the network connection used by the device.
If your goal is to make fetched values take effect in your app as soon as possible, but without creating a jarring user experience, consider adding calls to fetchAndActivate
each time that your app does a full screen refresh.
Test Lab
Visit the Test Lab troubleshooting page for helpful tips and answers to FAQs.