Dự án Firebase là thực thể cấp cao nhất cho Firebase. Trong một dự án, bạn có thể đăng ký ứng dụng Apple, Android hoặc web của mình. Sau khi đăng ký ứng dụng của mình với Firebase, bạn có thể thêm SDK Firebase dành riêng cho sản phẩm vào ứng dụng của mình, chẳng hạn như Analytics, Cloud Firestore, Crashlytics hoặc Cấu hình từ xa.
Bạn nên đăng ký các biến thể ứng dụng web, Android và Apple của mình trong một dự án Firebase duy nhất. Bạn có thể sử dụng nhiều dự án Firebase để hỗ trợ nhiều môi trường, chẳng hạn như phát triển, dàn dựng và sản xuất.
Dưới đây là một số tài nguyên để tìm hiểu thêm về các dự án Firebase:
Hiểu dự án Firebase — cung cấp thông tin tổng quan ngắn gọn về một số khái niệm quan trọng về dự án Firebase, bao gồm mối quan hệ của chúng với Google Cloud và hệ thống phân cấp cơ bản của dự án cũng như các ứng dụng và tài nguyên của dự án.
Các phương pháp hay nhất chung để thiết lập dự án Firebase — cung cấp các phương pháp hay nhất chung, cấp cao để thiết lập dự án Firebase và đăng ký ứng dụng của bạn với một dự án để bạn có quy trình phát triển rõ ràng sử dụng các môi trường riêng biệt.
Lưu ý rằng đối với tất cả các dự án Firebase, Firebase sẽ tự động thêm nhãn firebase:enabled trong trang Nhãn cho dự án của bạn trong Google Cloud Console. Tìm hiểu thêm về nhãn này trong Câu hỏi thường gặp của chúng tôi.
Tổ chức Google Cloud là gì?
Tổ chức Google Cloud là vùng chứa cho các dự án Google Cloud (bao gồm cả các dự án Firebase). Hệ thống phân cấp này cho phép tổ chức tốt hơn, quản lý quyền truy cập và kiểm tra các dự án Google Cloud và Firebase của bạn. Để biết thêm thông tin, hãy tham khảo Tạo và quản lý tổ chức .
Làm cách nào để thêm Firebase vào dự án Google Cloud hiện có?
Để thêm Firebase vào dự án Google Cloud hiện tại của bạn, hãy nhấp vào Thêm dự án trên trang đích của bảng điều khiển Firebase , sau đó chọn dự án của bạn trong menu Tên dự án .
Tại sao dự án Google Cloud của tôi có nhãn firebase:enabled ?
Trong trang Nhãn cho dự án của bạn trong Google Cloud Console, bạn có thể thấy nhãn firebase:enabled (cụ thể là Key của firebase có Value là enabled ).
Firebase đã tự động thêm nhãn này vì dự án của bạn là một dự án Firebase, có nghĩa là dự án của bạn đã bật các dịch vụ và cấu hình dành riêng cho Firebase cho dự án đó. Tìm hiểu thêm về mối quan hệ giữa các dự án Firebase và Google Cloud .
Chúng tôi thực sự khuyên bạn không nên sửa đổi hoặc xóa nhãn này. Nhãn này được Firebase và Google Cloud sử dụng để liệt kê các dự án Firebase của bạn (ví dụ: thông qua điểm cuối API projects.list hoặc trong menu trong bảng điều khiển Firebase).
Xin lưu ý rằng việc thêm nhãn này vào danh sách nhãn dự án của bạn theo cách thủ công KHÔNG kích hoạt cấu hình và dịch vụ dành riêng cho Firebase cho dự án Google Cloud của bạn. Để làm điều đó, bạn cần thêm Firebase thông qua bảng điều khiển Firebase (hoặc, đối với các trường hợp sử dụng nâng cao, thông qua API REST quản lý Firebase hoặc CLI của Firebase ).
Tại sao dự án Firebase của tôi không hiển thị trong danh sách dự án Firebase của tôi?
Câu hỏi thường gặp này có thể áp dụng nếu bạn không thấy dự án Firebase của mình ở những vị trí sau:
Trong danh sách các dự án mà bạn đang xem trong bảng điều khiển Firebase
Trong phản hồi từ việc chạy lệnh Firebase CLI firebase projects:list
Hãy thử các bước khắc phục sự cố sau:
Trước tiên, hãy thử truy cập dự án của bạn bằng cách truy cập trực tiếp vào URL của dự án. Sử dụng định dạng sau: https://console.firebase.google.com/project/ PROJECT-ID /overview
Nếu bạn không thể truy cập dự án hoặc gặp lỗi về quyền, hãy kiểm tra những điều sau:
Đảm bảo rằng bạn đã đăng nhập vào Firebase bằng cùng một tài khoản Google có quyền truy cập vào dự án. Bạn có thể đăng nhập và đăng xuất khỏi bảng điều khiển Firebase thông qua hình đại diện tài khoản của mình ở góc trên cùng bên phải của bảng điều khiển.
Đảm bảo rằng dự án của bạn có nhãn firebase:enabled trong trang Nhãn cho dự án của bạn trong Google Cloud Console. Firebase và Google Cloud sử dụng nhãn này để liệt kê các dự án Firebase của bạn. Nếu bạn không thấy nhãn này nhưng API quản lý Firebase được bật cho dự án của bạn, thì hãy thêm nhãn theo cách thủ công (cụ thể là Key của firebase có Value là enabled ).
Đảm bảo rằng bạn đã được chỉ định một trong các vai trò IAM cơ bản (Chủ sở hữu, Người chỉnh sửa, Người xem) hoặc vai trò có các quyền liên quan đến Firebase, chẳng hạn như vai trò được xác định trước của Firebase . Bạn có thể xem (các) vai trò của mình trong trang IAM của Google Cloud Console.
Nếu dự án của bạn thuộc về một tổ chức Google Cloud, bạn có thể yêu cầu các quyền bổ sung để xem dự án được liệt kê trong bảng điều khiển Firebase. Liên hệ với người quản lý tổ chức Google Cloud của bạn để cung cấp cho bạn vai trò phù hợp để xem dự án, chẳng hạn như vai trò Trình duyệt.
Nếu không có bước khắc phục sự cố nào ở trên cho phép bạn xem dự án của mình trong danh sách các dự án của Firebase, hãy liên hệ với Bộ phận hỗ trợ của Firebase .
Tôi có thể có bao nhiêu dự án cho mỗi tài khoản?
Gói định giá Spark — Hạn ngạch dự án của bạn được giới hạn ở một số lượng nhỏ dự án (thường là khoảng 5-10).
Gói định giá Blaze — Hạn ngạch dự án của bạn trên mỗi tài khoản Thanh toán trên đám mây tăng đáng kể miễn là tài khoản Thanh toán trên đám mây của bạn ở trạng thái tốt.
Giới hạn hạn ngạch dự án hiếm khi là mối quan tâm đối với hầu hết các nhà phát triển, nhưng nếu cần, bạn có thể yêu cầu tăng hạn ngạch dự án của mình .
Lưu ý rằng việc xóa hoàn toàn dự án cần 30 ngày và được tính vào hạn ngạch của bạn cho đến khi dự án được xóa hoàn toàn.
Tôi có thể có bao nhiêu Ứng dụng Firebase trong một dự án Firebase?
Dự án Firebase là vùng chứa Ứng dụng Firebase trên Apple, Android và web. Firebase giới hạn tổng số Ứng dụng Firebase trong dự án Firebase là 30.
Sau con số này, hiệu suất bắt đầu giảm (đặc biệt là đối với Google Analytics) và cuối cùng, ở số lượng ứng dụng cao hơn, một số chức năng của sản phẩm sẽ ngừng hoạt động. Ngoài ra, nếu bạn sử dụng thông tin đăng nhập bằng Google với tư cách là nhà cung cấp dịch vụ xác thực, thì ID ứng dụng khách OAuth 2.0 cơ bản sẽ được tạo cho từng ứng dụng trong dự án của bạn. Có giới hạn khoảng 30 ID khách hàng có thể được tạo trong một dự án.
Bạn nên đảm bảo rằng tất cả Ứng dụng Firebase trong một dự án Firebase duy nhất là các biến thể nền tảng của cùng một ứng dụng từ góc độ người dùng cuối. Ví dụ: nếu bạn phát triển ứng dụng nhãn trắng, thì mỗi ứng dụng được gắn nhãn độc lập phải có dự án Firebase riêng nhưng phiên bản Apple và Android của nhãn đó có thể nằm trong cùng một dự án. Đọc hướng dẫn chi tiết hơn trong các phương pháp hay nhất chung của chúng tôi để thiết lập dự án Firebase .
Trong trường hợp hiếm hoi, dự án của bạn yêu cầu hơn 30 ứng dụng, bạn có thể yêu cầu tăng giới hạn ứng dụng. Dự án của bạn phải nằm trong gói định giá Blaze để thực hiện yêu cầu này. Truy cập Google Cloud Console để đưa ra yêu cầu của bạn và yêu cầu đó được đánh giá. Tìm hiểu thêm về quản lý hạn ngạch trong tài liệu Google Cloud.
Điều gì xảy ra nếu tôi gắn thẻ dự án của mình là môi trường "sản xuất"?
Trong bảng điều khiển Firebase, bạn có thể gắn thẻ các dự án Firebase của mình bằng loại môi trường của chúng, là môi trường Sản xuất hoặc Không xác định (không sản xuất).
Việc gắn thẻ dự án của bạn dưới dạng một loại môi trường không ảnh hưởng đến cách thức hoạt động của dự án Firebase hoặc các tính năng của dự án. Tuy nhiên, việc gắn thẻ có thể giúp bạn và nhóm của bạn quản lý các dự án Firebase khác nhau trong vòng đời của ứng dụng.
Nếu bạn gắn thẻ dự án của mình dưới dạng môi trường sản xuất, thì chúng tôi sẽ thêm thẻ Prod có màu sáng vào dự án trong bảng điều khiển Firebase, nhắc bạn rằng mọi thay đổi đều có thể ảnh hưởng đến các ứng dụng sản xuất được liên kết của bạn. Trong tương lai, chúng tôi có thể thêm nhiều tính năng và biện pháp bảo vệ hơn cho các dự án Firebase được gắn thẻ là môi trường sản xuất.
Để thay đổi loại môi trường của dự án Firebase, hãy đi tới settingsCài đặt dự án > Chung , sau đó trong thẻ Dự án của bạn bên dưới Môi trường , nhấp vào edit để thay đổi loại môi trường.
Tôi có thể tìm ID ứng dụng cho ứng dụng Firebase của mình ở đâu?
Trong bảng điều khiển Firebase, chuyển đến settings của bạn Cài đặt dự án . Cuộn xuống thẻ Ứng dụng của bạn , sau đó nhấp vào Ứng dụng Firebase mong muốn để xem thông tin của ứng dụng, bao gồm ID ứng dụng .
Dưới đây là một số giá trị ID ứng dụng mẫu:
Ứng dụng iOS của Firebase: 1:1234567890:ios:321abc456def7890
Ứng dụng Firebase Android: 1:1234567890:android:321abc456def7890
Ứng dụng web Firebase: 1:1234567890:web:321abc456def7890
Điều kiện tiên quyết để liên kết Google Play / AdMob / Google Ads / BigQuery với ứng dụng hoặc dự án Firebase của tôi là gì?
Một trong các vai trò Firebase sau: Chủ sở hữu hoặc Quản trị viên Firebase Và
Một trong các cấp truy cập Google Play sau: Chủ tài khoản hoặc Quản trị viên
Để liên kết ứng dụng AdMob của bạn , bạn cần vừa là chủ sở hữu dự án Firebase vừa là quản trị viên AdMob.
Để liên kết tài khoản AdWords của bạn , bạn cần vừa là chủ sở hữu dự án Firebase vừa là quản trị viên AdWords.
Để liên kết dự án BigQuery của bạn , bạn cần phải là chủ sở hữu dự án Firebase.
Tôi nên đưa những thông báo mã nguồn mở nào vào ứng dụng của mình?
Trên các nền tảng của Apple, nhóm Firebase chứa tệp THÔNG BÁO bao gồm các mục có liên quan. SDK Android Firebase chứa Activity trợ giúp để hiển thị thông tin giấy phép.
Quyền và quyền truy cập vào các dự án Firebase
Làm cách nào để chỉ định vai trò cho thành viên dự án, chẳng hạn như vai trò Chủ sở hữu?
Để quản lý (các) vai trò được chỉ định cho từng thành viên dự án, bạn phải là Chủ sở hữu của dự án Firebase (hoặc được chỉ định vai trò với quyền resourcemanager.projects.setIamPolicy ).
Đây là những nơi bạn có thể chỉ định và quản lý vai trò:
Google Cloud Console cung cấp một bộ công cụ mở rộng để chỉ định vai trò cho các thành viên dự án trong trang IAM . Trong Bảng điều khiển đám mây, bạn cũng có thể tạo và quản lý vai trò tùy chỉnh cũng như cấp cho tài khoản dịch vụ quyền truy cập vào dự án của mình.
Lưu ý rằng trong Google Cloud Console, các thành viên dự án được gọi là người đứng đầu .
Nếu Chủ sở hữu dự án của bạn không còn có thể thực hiện các nhiệm vụ của Chủ sở hữu (ví dụ: người đã rời công ty của bạn) và dự án của bạn không được quản lý thông qua tổ chức Google Cloud (xem đoạn tiếp theo), bạn có thể liên hệ với Bộ phận hỗ trợ của Firebase để yêu cầu một Chủ sở hữu tạm thời được chỉ định.
Lưu ý rằng nếu dự án Firebase là một phần của tổ chức Google Cloud, dự án đó có thể không có Chủ sở hữu. Nếu bạn không thể tìm thấy Chủ sở hữu cho dự án Firebase của mình, hãy liên hệ với người quản lý tổ chức Google Cloud của bạn để chỉ định Chủ sở hữu cho dự án.
Làm cách nào để tìm Chủ sở hữu của dự án Firebase?
Bạn có thể xem các thành viên dự án và vai trò của họ ở những nơi sau:
Nếu bạn có quyền truy cập vào dự án trong bảng điều khiển Firebase, thì bạn có thể xem danh sách thành viên dự án, bao gồm cả Chủ sở hữu, trong trang Người dùng và quyền của bảng điều khiển Firebase.
Nếu bạn không có quyền truy cập vào dự án trong bảng điều khiển Firebase, hãy kiểm tra xem bạn có quyền truy cập vào dự án trong Google Cloud Console hay không. Bạn có thể xem danh sách thành viên dự án, bao gồm Chủ sở hữu, trong trang IAM của Google Cloud Console.
Nếu Chủ sở hữu dự án của bạn không còn có thể thực hiện các nhiệm vụ của Chủ sở hữu (ví dụ: người đã rời công ty của bạn) và dự án của bạn không được quản lý thông qua tổ chức Google Cloud (xem đoạn tiếp theo), bạn có thể liên hệ với Bộ phận hỗ trợ của Firebase để yêu cầu một Chủ sở hữu tạm thời được chỉ định.
Lưu ý rằng nếu dự án Firebase là một phần của tổ chức Google Cloud, dự án đó có thể không có Chủ sở hữu. Thay vào đó, người quản lý tổ chức Google Cloud của bạn có thể thực hiện nhiều tác vụ mà Chủ sở hữu có thể thực hiện. Tuy nhiên, để thực hiện một số tác vụ dành riêng cho Chủ sở hữu (như chỉ định vai trò hoặc quản lý thuộc tính Google Analytics), quản trị viên có thể cần chỉ định cho mình vai trò Chủ sở hữu thực tế để thực hiện các tác vụ đó. Nếu bạn không thể tìm thấy Chủ sở hữu cho dự án Firebase của mình, hãy liên hệ với người quản lý tổ chức Google Cloud của bạn để chỉ định Chủ sở hữu cho dự án.
Tại sao hoặc khi nào tôi nên chỉ định vai trò Chủ sở hữu cho một thành viên dự án?
Để đảm bảo quản lý đúng dự án Firebase, dự án đó phải có Chủ sở hữu . Chủ sở hữu của dự án là người có thể thực hiện một số hành động quản trị quan trọng (như chỉ định vai trò và quản lý thuộc tính Google Analytics) và Bộ phận hỗ trợ của Firebase chỉ có thể đáp ứng các yêu cầu quản trị từ Chủ sở hữu dự án đã chứng minh.
Sau khi bạn thiết lập (các) Chủ sở hữu cho dự án Firebase, điều quan trọng là phải luôn cập nhật các nhiệm vụ đó.
Lưu ý rằng nếu dự án Firebase là một phần của tổ chức Google Cloud, thì người quản lý tổ chức Google Cloud của bạn có thể thực hiện nhiều tác vụ mà Chủ sở hữu có thể thực hiện. Tuy nhiên, đối với một số tác vụ dành riêng cho Chủ sở hữu (như chỉ định vai trò hoặc quản lý thuộc tính Google Analytics), quản trị viên có thể cần chỉ định cho mình vai trò Chủ sở hữu thực tế để thực hiện các tác vụ đó.
Tôi không nghĩ rằng mình có dự án Firebase nhưng tôi đã nhận được email về một dự án. Làm thế nào để tôi truy cập vào dự án này?
Email bạn nhận được phải chứa liên kết để mở dự án Firebase của bạn. Nhấp vào liên kết trong email sẽ mở dự án trong bảng điều khiển Firebase.
Nếu bạn không thể mở dự án trong liên kết, hãy đảm bảo rằng bạn đã đăng nhập vào Firebase bằng chính tài khoản Google đã nhận được email về dự án. Bạn có thể đăng nhập và đăng xuất khỏi bảng điều khiển Firebase thông qua hình đại diện tài khoản của mình ở góc trên cùng bên phải của bảng điều khiển.
Lưu ý rằng nếu là quản trị viên của một tổ chức Google Cloud, thì bạn có thể được thông báo về những thay đổi đối với các dự án Firebase trong tổ chức của mình. Tuy nhiên, bạn có thể không có đủ quyền để mở dự án Firebase. Trong những trường hợp này, giải pháp đơn giản nhất là gán cho bạn vai trò Chủ sở hữu thực tế để mở dự án và thực hiện các hành động được yêu cầu. Tìm hiểu thêm về lý do và thời điểm chỉ định vai trò Chủ sở hữu .
Nền tảng và khuôn khổ
Truy cập các trang Câu hỏi thường gặp & khắc phục sự cố dành riêng cho nền tảng để biết các mẹo và câu trả lời hữu ích để biết thêm Câu hỏi thường gặp.
Các trình duyệt được hỗ trợ để truy cập bảng điều khiển Firebase là gì?
Bạn có thể truy cập bảng điều khiển Firebase từ các phiên bản gần đây của các trình duyệt máy tính để bàn phổ biến như Chrome, Firefox, Safari và Edge. Trình duyệt di động hiện không được hỗ trợ đầy đủ.
Tôi có thể tải bảng điều khiển Firebase nhưng tại sao tôi không thể tìm hoặc truy cập dự án Firebase của mình?
Câu hỏi thường gặp này có thể áp dụng nếu bạn đang gặp phải một trong các vấn đề sau:
Bảng điều khiển Firebase trả về một trang lỗi cho biết dự án của bạn có thể không tồn tại hoặc bạn không có quyền truy cập vào dự án.
Bảng điều khiển Firebase không hiển thị dự án của bạn ngay cả khi bạn nhập ID dự án hoặc tên dự án vào trường tìm kiếm của bảng điều khiển.
Hãy thử các bước khắc phục sự cố sau:
Trước tiên, hãy thử truy cập dự án của bạn bằng cách truy cập trực tiếp vào URL của dự án. Sử dụng định dạng sau: https://console.firebase.google.com/project/ PROJECT-ID /overview
Nếu bạn vẫn không thể truy cập dự án hoặc gặp lỗi về quyền, hãy kiểm tra những điều sau:
Đảm bảo rằng bạn đã đăng nhập vào Firebase bằng cùng một tài khoản Google có quyền truy cập vào dự án. Bạn có thể đăng nhập và đăng xuất khỏi bảng điều khiển Firebase thông qua hình đại diện tài khoản của mình ở góc trên cùng bên phải của bảng điều khiển.
Đảm bảo rằng bạn đã được chỉ định một trong các vai trò IAM cơ bản (Chủ sở hữu, Người chỉnh sửa, Người xem) hoặc vai trò có các quyền liên quan đến Firebase, chẳng hạn như vai trò được xác định trước của Firebase . Bạn có thể xem (các) vai trò của mình trong trang IAM của Google Cloud Console.
Nếu dự án của bạn thuộc về một tổ chức Google Cloud, bạn có thể yêu cầu các quyền bổ sung để xem dự án được liệt kê trong bảng điều khiển Firebase. Liên hệ với người quản lý tổ chức Google Cloud của bạn để cung cấp cho bạn vai trò phù hợp để xem dự án, chẳng hạn như vai trò Trình duyệt.
Nếu không có bước khắc phục sự cố nào ở trên cho phép bạn tìm hoặc truy cập dự án của mình, hãy liên hệ với Bộ phận hỗ trợ của Firebase .
Tại sao bảng điều khiển Firebase không tải cho tôi?
Câu hỏi thường gặp này có thể áp dụng nếu bạn đang gặp phải bất kỳ sự cố nào sau đây:
Một trang trong bảng điều khiển Firebase không bao giờ tải xong.
Dữ liệu trong một trang không tải như mong đợi.
Bạn nhận được thông báo lỗi trình duyệt khi tải bảng điều khiển Firebase.
Bảng điều khiển Firebase hỗ trợ những vai trò và quyền nào?
Bảng điều khiển Firebase và Google Cloud Console sử dụng các vai trò và quyền cơ bản giống nhau. Tìm hiểu thêm về vai trò và quyền trong tài liệu IAM của Firebase .
Chủ sở hữu dự án có thể thêm các thành viên khác vào dự án, thiết lập tích hợp (liên kết dự án với các dịch vụ như BigQuery hoặc Slack) và có toàn quyền chỉnh sửa đối với dự án.
Trình chỉnh sửa dự án có toàn quyền truy cập chỉnh sửa đối với dự án.
Trình xem dự án chỉ có quyền truy cập đọc đối với dự án. Lưu ý rằng bảng điều khiển Firebase hiện không ẩn/tắt điều khiển chỉnh sửa giao diện người dùng khỏi Người xem dự án, nhưng các thao tác này sẽ không thành công đối với các thành viên dự án được chỉ định vai trò Người xem.
Firebase cũng hỗ trợ:
Các vai trò được xác định trước của Firebase — Các vai trò dành riêng cho Firebase được quản lý cho phép kiểm soát quyền truy cập chi tiết hơn so với các vai trò cơ bản của Chủ sở hữu, Người chỉnh sửa và Người xem.
Vai trò tùy chỉnh — Các vai trò IAM được tùy chỉnh hoàn toàn mà bạn tạo để điều chỉnh một tập hợp các quyền đáp ứng các yêu cầu cụ thể của tổ chức của bạn.
định giá
Những sản phẩm nào được thanh toán? Đó là miễn phí?
Các sản phẩm cơ sở hạ tầng trả phí của Firebase là Cơ sở dữ liệu thời gian thực, Lưu trữ đám mây cho Firebase, Chức năng đám mây, Lưu trữ, Phòng thí nghiệm thử nghiệm và xác thực qua điện thoại. Chúng tôi cung cấp một bậc miễn phí cho tất cả các tính năng này.
Firebase cũng có nhiều sản phẩm miễn phí: Analytics, Nhắn tin qua đám mây, trình tổng hợp Thông báo, Cấu hình từ xa, Lập chỉ mục ứng dụng, Liên kết động và Báo cáo sự cố. Bạn có thể sử dụng không giới hạn bất kỳ sản phẩm nào trong số này trong tất cả các gói, kể cả gói Spark miễn phí của chúng tôi. Ngoài ra, tất cả các tính năng Xác thực ngoài xác thực qua điện thoại đều miễn phí.
Firebase có cung cấp tín dụng dùng thử miễn phí cho các sản phẩm trả phí không?
Bạn có thể sử dụng các dịch vụ trả phí của Firebase trong Bản dùng thử miễn phí Google Cloud . Người dùng Google Cloud và Firebase mới có thể tận dụng thời gian dùng thử 90 ngày bao gồm 300 đô la tín dụng Thanh toán qua đám mây miễn phí để khám phá và đánh giá các sản phẩm và dịch vụ của Google Cloud và Firebase.
Trong thời gian Dùng thử miễn phí Google Cloud, bạn sẽ được cung cấp tài khoản Thanh toán qua đám mây dùng thử miễn phí. Bất kỳ dự án Firebase nào sử dụng tài khoản thanh toán đó sẽ nằm trong gói giá Blaze trong thời gian dùng thử miễn phí.
Đừng lo lắng, việc thiết lập tài khoản Thanh toán đám mây dùng thử miễn phí này không cho phép chúng tôi tính phí bạn. Bạn không bị tính phí trừ khi bạn kích hoạt thanh toán một cách rõ ràng bằng cách nâng cấp tài khoản Thanh toán đám mây dùng thử miễn phí của mình thành tài khoản trả phí. Bạn có thể nâng cấp lên tài khoản trả phí bất cứ lúc nào trong thời gian dùng thử. Sau khi bạn đã nâng cấp, bạn vẫn có thể sử dụng bất kỳ khoản tín dụng nào còn lại (trong khoảng thời gian 90 ngày).
Khi thời gian dùng thử miễn phí hết hạn, bạn sẽ cần hạ cấp dự án của mình xuống gói giá Spark hoặc thiết lập gói giá Blaze trong bảng điều khiển Firebase để tiếp tục sử dụng dự án Firebase của mình.
Gói Spark của chúng tôi là một nơi tuyệt vời để phát triển ứng dụng của bạn miễn phí. Bạn nhận được tất cả các tính năng miễn phí của Firebase (Analytics, trình tổng hợp Thông báo, Crashlytics, v.v.) và rất nhiều tính năng cơ sở hạ tầng trả phí của chúng tôi. Tuy nhiên, nếu bạn vượt quá tài nguyên của gói Spark trong một tháng theo lịch, thì ứng dụng của bạn sẽ bị tắt trong thời gian còn lại của tháng đó. Ngoài ra, các tính năng của Google Cloud không khả dụng khi sử dụng gói Spark.
Kế hoạch định giá Blaze
Gói Blaze của chúng tôi được thiết kế cho các ứng dụng sản xuất. Gói Blaze cũng cho phép bạn mở rộng ứng dụng của mình bằng các tính năng trả phí của Google Cloud. Bạn chỉ trả tiền cho những tài nguyên mà bạn sử dụng, cho phép bạn mở rộng quy mô theo nhu cầu. Chúng tôi cố gắng làm cho giá gói Blaze của mình cạnh tranh với các nhà cung cấp đám mây hàng đầu trong ngành.
Làm cách nào tôi có thể theo dõi việc sử dụng và thanh toán của mình?
Bạn có thể theo dõi việc sử dụng tài nguyên dự án của mình trong bảng điều khiển Firebase trên bất kỳ trang tổng quan nào sau đây:
Vào tháng 1 năm 2020, gói định giá Flame ($25/tháng của hạn ngạch bổ sung) đã bị xóa dưới dạng tùy chọn cho các lượt đăng ký mới. Người dùng gói hiện tại đã được cấp thời gian gia hạn để di chuyển các dự án của họ ra khỏi gói Flame. Vào tháng 2 năm 2022, các dự án còn lại trong gói giá Flame đã được hạ cấp xuống gói giá Spark. Theo đó,
Các dự án gói Spark và Blaze hiện có và mọi dự án mới không còn có thể chuyển sang hoặc đăng ký gói Flame.
Nếu bạn đã chuyển một dự án gói Flame hiện tại sang một gói giá khác, thì dự án đó không thể quay lại gói Flame.
Các dự án bị hạ cấp xuống gói Spark có thể được nâng cấp lên gói Blaze để tiếp tục các dịch vụ trả phí bổ sung.
Các tham chiếu đến kế hoạch Ngọn lửa đã bị xóa khỏi tài liệu.
Bạn muốn tìm hiểu về các gói giá khác do Firebase cung cấp? Truy cập trang định giá Firebase của chúng tôi! Nếu muốn bắt đầu chuyển bất kỳ dự án hiện có nào sang gói giá khác, bạn có thể thực hiện điều đó trong bảng điều khiển Firebase cho dự án của mình.
Các câu hỏi thường gặp bổ sung về việc ngừng sử dụng gói Flame
Tôi có một dự án hoặc quy trình hoặc mô hình kinh doanh dựa vào chi phí Firebase cố định. Tôi nên làm gì?
Tôi có thể được cấp quyền truy cập đặc biệt để tạo các dự án kế hoạch Ngọn lửa mới không?
Không, Firebase không cung cấp quyền truy cập đặc biệt cho các dự án để chuyển sang hoặc đăng ký gói Flame.
Tôi đã thay đổi dự án gói Flame của mình sang một gói giá khác. Làm thế nào để tôi thay đổi nó trở lại?
Không thể chuyển sang gói Flame. Để truy cập vào các dịch vụ do gói Flame cung cấp, hãy đảm bảo rằng bạn đang sử dụng gói định giá Blaze và xem xét việc thiết lập cảnh báo ngân sách cho dự án của mình.
Dự án của tôi đã tự động được chuyển sang một gói định giá khác như một phần của việc ngừng sử dụng gói Flame. Tôi nên làm gì?
Nếu dự án của bạn yêu cầu hạn ngạch bổ sung ngoài những gì được cung cấp trong gói Spark, bạn sẽ cần nâng cấp dự án của mình lên gói định giá Blaze.
Tại sao kế hoạch Ngọn lửa bị loại bỏ?
Trong những năm qua, chúng tôi nhận thấy việc sử dụng gói Flame ngày càng giảm và hầu hết các dự án sử dụng gói này đều không sử dụng hết giá trị của nó. Việc duy trì kế hoạch định giá này thường không hiệu quả về chi phí và chúng tôi cảm thấy rằng mình có thể phục vụ mọi người tốt hơn nếu các nguồn lực dành cho các sáng kiến khác của Firebase.
Việc sử dụng miễn phí trong gói Blaze khác với việc sử dụng miễn phí trong gói Spark như thế nào?
Việc sử dụng miễn phí trên gói Blaze được tính toán hàng ngày. Giới hạn sử dụng cũng khác với gói Spark dành cho Chức năng đám mây, xác thực điện thoại và Phòng thí nghiệm thử nghiệm.
Đối với Chức năng đám mây, mức sử dụng miễn phí trên gói Blaze được tính ở cấp tài khoản Thanh toán qua đám mây, không phải cấp dự án và có các giới hạn sau:
2 triệu lệnh gọi/tháng
400K GB-giây/tháng
200K CPU-giây/tháng
5 GB đầu ra mạng/tháng
Để xác thực qua điện thoại, việc sử dụng miễn phí gói Blaze được tính hàng tháng.
Đối với Test Lab, việc sử dụng miễn phí gói Blaze có các giới hạn sau:
30 phút thiết bị vật lý/ngày
60 phút thiết bị ảo/ngày
Định mức sử dụng miễn phí có bị đặt lại khi tôi chuyển từ gói Spark sang gói Blaze không?
Việc sử dụng miễn phí từ gói Spark được bao gồm trong gói Blaze. Việc sử dụng miễn phí không được đặt lại khi chuyển sang gói Blaze.
"Kết nối cơ sở dữ liệu đồng thời" là gì?
Kết nối đồng thời tương đương với một thiết bị di động, tab trình duyệt hoặc ứng dụng máy chủ được kết nối với cơ sở dữ liệu. Firebase áp đặt các giới hạn cứng đối với số lượng kết nối đồng thời tới cơ sở dữ liệu ứng dụng của bạn. Các giới hạn này được áp dụng để bảo vệ cả Firebase và người dùng của chúng tôi khỏi bị lạm dụng.
Giới hạn gói Spark là 100 và không thể tăng lên. Các gói Flame và Blaze có giới hạn 200.000 kết nối đồng thời trên mỗi cơ sở dữ liệu.
Giới hạn này không giống với tổng số người dùng ứng dụng của bạn vì không phải tất cả người dùng của bạn đều kết nối cùng một lúc. Nếu bạn cần hơn 200.000 kết nối đồng thời, vui lòng đọc Chia tỷ lệ với nhiều cơ sở dữ liệu .
Điều gì xảy ra nếu tôi vượt quá giới hạn lưu trữ hoặc tải xuống gói Spark cho Cơ sở dữ liệu thời gian thực?
Để cung cấp cho bạn một mức giá có thể dự đoán được, các tài nguyên có sẵn cho bạn trong các gói Spark được giới hạn. Điều này có nghĩa là khi bạn vượt quá bất kỳ giới hạn nào của gói trong bất kỳ tháng nào, ứng dụng của bạn sẽ bị tắt để ngăn việc sử dụng thêm tài nguyên và các khoản phí bổ sung.
Điều gì xảy ra nếu tôi vượt quá giới hạn kết nối đồng thời của gói Spark cho Cơ sở dữ liệu thời gian thực?
Khi ứng dụng của bạn đạt đến giới hạn đồng thời trên gói Spark, mọi kết nối tiếp theo sẽ bị từ chối cho đến khi một số kết nối hiện có bị đóng. Ứng dụng sẽ tiếp tục hoạt động cho những người dùng được kết nối.
Điều gì xảy ra nếu tôi vượt quá giới hạn tải lên, tải xuống hoặc lưu trữ của gói Spark đối với Cloud Storage?
Khi bạn vượt quá giới hạn cho Cloud Storage trong một dự án trên gói Spark, kết quả sẽ phụ thuộc vào loại giới hạn mà bạn vượt quá:
Nếu bạn vượt quá giới hạn GB được lưu trữ , bạn sẽ không thể lưu trữ thêm bất kỳ dữ liệu nào trong dự án đó trừ khi bạn xóa một số dữ liệu được lưu trữ hoặc nâng cấp lên gói cung cấp thêm dung lượng lưu trữ hoặc dung lượng lưu trữ không giới hạn.
Nếu bạn vượt quá giới hạn GB đã tải xuống , ứng dụng của bạn sẽ không thể tải thêm dữ liệu xuống cho đến ngày hôm sau (bắt đầu lúc nửa đêm, Giờ Thái Bình Dương của Hoa Kỳ), trừ khi bạn nâng cấp lên gói có giới hạn ít hạn chế hơn hoặc không có giới hạn.
Nếu bạn vượt quá giới hạn hoạt động tải lên hoặc tải xuống , thì ứng dụng của bạn sẽ không thể tải lên hoặc tải xuống thêm dữ liệu cho đến ngày hôm sau (bắt đầu từ nửa đêm, Giờ Thái Bình Dương của Hoa Kỳ), trừ khi bạn nâng cấp lên gói có giới hạn ít hạn chế hơn hoặc không Hạn mức.
Tích hợp Firebase với Google Cloud hoạt động như thế nào?
Firebase được tích hợp sâu với Google Cloud . Các dự án được chia sẻ giữa Firebase và Google Cloud, vì vậy các dự án có thể bật dịch vụ Firebase và dịch vụ Google Cloud. Bạn có thể truy cập cùng một dự án từ bảng điều khiển Firebase hoặc Google Cloud Console. Đặc biệt:
Một số sản phẩm Firebase nhất định được hỗ trợ trực tiếp bởi Google Cloud, chẳng hạn như Cloud Storage cho Firebase. Danh sách các sản phẩm được hỗ trợ bởi Google Cloud sẽ tiếp tục phát triển theo thời gian.
Nhiều cài đặt của bạn, bao gồm cộng tác viên và thông tin thanh toán, được chia sẻ bởi Firebase và Google Cloud. Việc sử dụng cả Firebase và Google Cloud của bạn xuất hiện trên cùng một hóa đơn.
Ngoài ra, khi bạn nâng cấp lên gói Blaze, bạn có thể sử dụng bất kỳ API và Cơ sở hạ tầng đẳng cấp thế giới nào của Google Cloud ngay bên trong dự án Firebase của mình, với mức giá tiêu chuẩn của Google Cloud . Bạn cũng có thể xuất trực tiếp dữ liệu từ Google Cloud sang BigQuery để phân tích. Để tìm hiểu thêm, hãy xem Liên kết BigQuery với Firebase.
Có nhiều lợi ích về tăng cường bảo mật, cải thiện độ trễ và tiết kiệm thời gian khi sử dụng Google Cloud với Firebase (so với các dịch vụ đám mây khác không cùng vị trí). Kiểm tra trang web Google Cloud để biết thêm chi tiết.
Điều gì xảy ra với dự án Firebase của tôi nếu tôi thêm hoặc xóa tài khoản thanh toán cho dự án đó trong Google Cloud Console?
Nếu tài khoản Cloud Billing được thêm vào một dự án trong Google Cloud Console, thì dự án đó sẽ tự động được nâng cấp lên gói Firebase Blaze nếu dự án đó hiện đang ở trong gói Spark.
Ngược lại, nếu một tài khoản Cloud Billing đang hoạt động hiện có bị xóa khỏi một dự án trong Google Cloud Console, thì dự án đó sẽ bị hạ cấp xuống gói Firebase Spark.
Tôi có thể nâng cấp, hạ cấp hoặc hủy bất kỳ lúc nào không?
Có, bạn có thể nâng cấp, hạ cấp hoặc hủy bất kỳ lúc nào. Lưu ý rằng chúng tôi không hoàn lại tiền theo tỷ lệ đối với việc hạ cấp hoặc hủy. Điều này có nghĩa là nếu bạn hạ cấp hoặc hủy trước khi kết thúc thời hạn thanh toán, bạn vẫn thanh toán cho phần còn lại của tháng.
Tôi sẽ nhận được loại hỗ trợ nào?
All Firebase apps, including those using no-cost plans, come with email support from Firebase staff during US Pacific business hours. All accounts have unlimited support for billing-related issues, account-related issues, technical (troubleshooting) questions, and incident reports.
Can I cap usage on the Blaze plan?
No, you cannot currently cap your Blaze plan usage. We are evaluating options for supporting caps on Blaze plan usage.
Blaze users can define a budget for their project or account, and receive alerts as their spending approaches those limits. Learn how to set up budget alerts .
What are automated backups? Do you offer hourly backups?
Automated backups are an advanced feature for customers on our Blaze pricing plan that backs up your Firebase Realtime Database data once a day and uploads it to Google Cloud Storage .
We do not offer hourly backups.
Do you offer open-source, nonprofit, or educational discounts?
Our Spark plan can be used by any type of individual or organization, including nonprofits, schools, and open-source projects. Since these plans already include generous quotas, we don't offer any special discounts or plans for open-source, nonprofit, or educational projects.
Do you offer enterprise contracts, pricing, support, or dedicated infrastructure hosting?
Our Blaze plan is suitable for enterprises of all sizes, and our SLA meets or exceeds the industry standard for cloud infrastructure. However, we do not currently offer enterprise contracts, pricing, or support, nor do we offer dedicated infrastructure hosting (that is, on-premises installations) for services like our Realtime Database. We are hard at work adding some of these features.
Do you offer ad-hoc pricing? I only want pay-as-you-go for one or two features.
We offer ad-hoc pricing in the Blaze plan, where you pay only for the features you use.
How do the paid Firebase plans work with Ads? Are there no-cost advertising credits with paid plans?
The Firebase pricing plans are separate from Ads, so there are no advertising credits without cost. As a Firebase developer, you are able to "link" your Ads account to Firebase to support conversion tracking.
All ads campaigns are managed directly in Ads, and Ads billing is managed from the Ads console.
Cloud Functions pricing
Why do I need a billing account to use Cloud Functions for Firebase?
Cloud Functions for Firebase relies on some paid Google services. New function deployments with Firebase CLI 11.2.0 and higher rely on Cloud Build and Artifact Registry . Deployments to older versions use Cloud Build in the same way, but rely on Container Registry and Cloud Storage for storage instead of Artifact Registry. Usage of these services will be billed in addition to existing pricing.
Storage space for Firebase CLI 11.2.0 and newer versions
Artifact Registry provides the containers in which functions run. Artifact Registry provides the first 500MB at no cost, so your first function deployments may not incur any fees. Above that threshold, each additional GB of storage is billed at $0.10 per month.
Storage space for Firebase CLI 11.1.x and prior versions
For functions deployed to older versions, Container Registry , provides the containers in which functions run. You'll be billed for each container required to deploy a function. You may notice small charges for each container stored—for example, 1GB of storage is billed at $0.026 per month .
To understand more about how your bill might change, please review the following
Does Cloud Functions for Firebase still have no-cost usage?
Yes. On the Blaze plan, Cloud Functions provides a no-cost tier for invocations, compute time, and internet traffic. The first 2,000,000 invocations, 400,000 GB-sec, 200,000 CPU-sec, and 5 GB of Internet egress traffic is provided at no cost each month. You'll be charged only for usage above those thresholds.
After the first 500MB of no-cost storage, each deployment operation will incur small-scale charges for the storage space used for the function's container. If your development process depends on deploying functions for testing, you can further minimize costs by using the Firebase Local Emulator Suite during development.
Is Firebase planning to raise the quotas and limits for Cloud Functions for Firebase?
No. There are no plans to change the quotas except for the removal of a maximum build time limit; instead of receiving errors or warnings when the daily build quota of 120 minutes is reached, you'll be billed under the terms of the Blaze pricing plan. See Quotas and limits .
Can I get the Google Cloud $300 credit?
Yes, you can create a Cloud Billing account in the Google Cloud Console to get the $300 credit, then link that Cloud Billing account to a Firebase project.
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.
To use extensions, 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?
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.
A/B Testing: Why can't I view my experiments after unlinking and re-linking my project to Google Analytics?
Linking to a different Google Analytics property will cause you to lose access to experiments created beforehand. To regain access to a previous experiment, re-link your project to the Google Analytics property that was linked when the experiment was created.
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?
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:22.1.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 ( com.google.firebase:firebase-analytics ) to your app's build.gradle file.
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.
Analytics: How do I control how my Analytics data is shared with the 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 in my iOS app: Can I install Analytics without ad attribution and IDFA collection features?
Analytics: Why don't I see any Analytics data in the Firebase console after unlinking Firebase from Google Analytics?
Analytics data resides within the Google Analytics property — not within the Firebase project. If you delete or unlink the property, then the Analytics data will not be accessible to Firebase and you'll see an empty Analytics dashboard in the Firebase console. Note that since the data still resides in the previously linked property, you can always relink the property to Firebase and see the Analytics data in the Firebase console.
Linking a brand new Google Analytics account (and thus a new Google Analytics property) to your Firebase project will result in an empty Analytics dashboard in the Firebase console. However, if your previously linked property still exists, then you can move the existing data from the old property to the new property.
Analytics: If my Analytics property and its data were deleted, is there any way to get them back?
No. If your property has been deleted, it isn't possible to undelete the property or retrieve the previously collected Analytics data stored in that property.
If you'd like to start using Google Analytics again, you can link either a new property or an existing property to your Firebase project. You can do this linking in either the Firebase console or the Google Analytics UI. Learn more about linking a Google Analytics property to your Firebase project.
Analytics: If my Analytics property was deleted, can I link a new Google Analytics property to my Firebase project and start using Analytics again?
If you'd like to start using Google Analytics again, you can link either a new property or an existing property to your Firebase project. You can do this linking in either the Firebase console or the Google Analytics UI. Learn more about linking a Google Analytics property to your Firebase project.
Note that since all Analytics data is stored in the property (not the Firebase project), the previously collected Analytics data cannot be retrieved.
Analytics: How will Firebase products or integrated Google products be affected by the deletion of my Analytics property?
Several Firebase products rely on the Google Analytics integration. If your Analytics property and its data are deleted, the following will happen if you use the following products:
Crashlytics — You can no longer see crash-free users, breadcrumb logs, and/or velocity alerts.
Cloud Messaging and In-App Messaging — You can no longer use targeting, campaign metrics, audience segmentation, and analytics labels.
Remote Config — You can no longer use targeted configurations or Personalization.
A/B Testing — You can no longer use A/B Testing since the experiment measurement is supplied by Google Analytics.
Dynamic Links — Any feature that relies on data from Google Analytics will be disrupted.
In addition, the following integrations will be affected:
Analytics: How do I segment users who 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: Are audiences and/or events defined in the Google Analytics interface also available in 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.
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
Firebase Authentication: In my Android app, why am I getting the following error: Google sign in failed ?
Follow the troubleshooting steps in this FAQ if you're getting the following error:
GoogleFragment: Google sign in failed
com.google.android.gms.common.api.ApiException: 13: Unable to get token.
at
com.google.android.gms.internal.auth-api.zbay.getSignInCredentialFromIntent(com.google.android.gms:play-services-auth@@20.3.0:6)
Make sure that Google sign-in is properly enabled as an authentication provider:
Within the Sign in method tab, disable and then re-enable the Google sign-in method (even if it's already enabled):
Open the Google sign-in method, disable it, and then click Save .
Re-open the Google sign-in method, enable it, and then click Save .
Also, in the Google sign-in provider configuration of the Authentication section, make sure that the OAuth client ID and secret match the web client displayed in the Credentials page of the Google Cloud Console (look in the OAuth 2.0 Client IDs section).
Firebase Authentication: How do I manually construct an OAuth web client??
Open the Credentials page of the Google Cloud Console.
At the top of the page, select Create credentials > OAuth client ID .
If you're prompted to configure your consent screen, follow the on-screen instructions, and then continue with the following steps of this FAQ.
Create the OAuth web client:
For the Application Type , select Web application .
For the Authorized JavaScript Origins , add the following:
http://localhost
http://localhost:5000
https:// PROJECT_ID .firebaseapp.com
https:// PROJECT_ID .web.app
For the Authorized Redirect URIs , add the following:
Within the Sign in method tab, open the Google sign-in provider, and then paste the web server client ID and secret you just constructed and copied from the Google Cloud Console. Click Save .
Firebase Authentication: How is %APP_NAME% determined for the email template for the confirmation email that can be sent to a user when they sign up using an email address and password?
Before December 2022, the %APP_NAME% in the email template was populated with the OAuth brand name that was automatically provisioned whenever an Android app was registered in the Firebase project. Now, since the OAuth brand is provisioned only when Google sign-in is enabled, the following describes how %APP_NAME% is determined:
If the OAuth brand name is available, then the %APP_NAME% in the email template will be the OAuth brand name (same as pre-December 2022 behavior).
If the OAuth brand name is not available, here's how the %APP_NAME% in the email template is determined:
For web apps , the %APP_NAME% will be the default Firebase Hosting site name (the value preceding .firebaseapp.com and .web.app and usually the Firebase project ID).
For mobile apps:
If the Android package name or iOS bundle ID is present in the request, then the %APP_NAME% will be the app name used in the Play Store or App Store (respectively).
Otherwise, the %APP_NAME% will be the default Firebase Hosting site name (the value preceding .firebaseapp.com and .web.app and usually the Firebase project ID).
Note that if the lookup of the default Firebase Hosting site name fails, then the final fallback is to use the Firebase project ID as the %APP_NAME% .
Cloud Functions
Cloud Functions runtime support
How do I upgrade to the latest supported version of Node.js?
How can I make sure I deployed my functions to a specific Node.js runtime?
In the Firebase console, go to the functions dashboard , select a function, and check the function's language under Additional details .
I use Firebase Extensions. Will I be affected by Cloud Functions runtime updates?
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 periodically 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 deprecating 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.
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.
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. 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 for Firebase
Cloud Storage for Firebase: Why can't I use Cloud Storage for Firebase?
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 for Firebase: Why do I get error code 412 responses about service account permissions and failed service account operations when using the Cloud Storage for Firebase API?
It's likely you're getting 412 error codes either because the Cloud Storage for Firebase API is not enabled for your project or a necessary service account is missing the required permissions.
Cloud Storage for Firebase: Why do I see new service account IDs associated with my Firebase projects that use Cloud Storage for Firebase?
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.
The service account that Cloud Storage for Firebase uses is scoped to your project and is named service- PROJECT_NUMBER @gcp-sa-firebasestorage.iam.gserviceaccount.com .
If you used Cloud Storage for Firebase before September 19, 2022, you may see an additional service account on previously-linked Cloud Storage buckets named firebase-storage@system.gserviceaccount.com . As of September 19, 2022, this service account is no longer supported.
You can view all service accounts associated with your project in the Firebase console, on the Service accounts tab .
Adding the new service account
If you removed the service account previously or the service account is not present in your project, you may do one of the following to add the account.
(Recommended) Automated: Use the AddFirebase REST endpoint to re-import your bucket into Firebase. You will only need to call this endpoint once, not once for each linked bucket.
We strongly discourage you from removing the service account because this may block access to your Cloud Storage buckets from your apps. To remove the service account from your project, follow the instructions in Disabling a service account .
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.
Firebase Local Emulator Suite
Why do Emulator Suite logs show an error starting with "Multiple projectIds are not recommended in single project mode"?
This message means the Emulator Suite has detected it may be running a particular product emulator using different project IDs. This may indicate a misconfiguration, and can cause issues when emulators try to communicate with one another, and when you try to interact with emulators from your code. If project IDs don't match, it often appears that data is missing, since data stored in emulators is keyed to projectID, and interoperability depends on matching project IDs.
This has been a common source of confusion among developers, so by default the Local Emulator Suite will now only allow running with a single project ID, unless you specify otherwise in the firebase.json configuration file. If an emulator detects more than one project ID, it will log a warning and potentially throw a fatal error.
Check your project ID declaration(s) for mismatches in:
The default project set at the command line. By default, the project ID will be taken on startup from the project selected with firebase init or firebase use . To view the list of projects (and see which one is selected) use firebase projects:list .
Unit tests. The project ID is often specified in calls to the Rules Unit Testing library methods initializeTestEnvironment or initializeTestApp . Other testing code may initialize with initializeApp(config) .
The command line --project flag. Passing the Firebase CLI --project flag overrides the default project. You'll need to ensure the value of the flag matches the project ID in unit tests and app initialization.
Platform-specific places to check:
Web
The projectId property in your JavaScript firebaseConfig object, used in initializeApp .
Android
The project_id property inside the google-services.json configuration file.
Apple platforms
The PROJECT_ID property in the GoogleService-Info.plist configuration file.
To disable single project mode, update firebase.json with the singleProjectMode key:
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?
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.
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 of once() .
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.
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.
Firebase User Segmentation Storage stores Firebase installation IDs and related attributes and segments as well as 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.