Проект Firebase — это сущность верхнего уровня для Firebase. В проекте вы можете зарегистрировать свои приложения Apple, Android или веб-приложения. После регистрации приложений в Firebase вы можете добавить в приложение пакеты SDK Firebase для конкретных продуктов , например Analytics , Cloud Firestore , Crashlytics или Remote Config .
Варианты приложений для Apple, Android и веб-приложений следует регистрировать в рамках одного проекта Firebase. Вы можете использовать несколько проектов Firebase для поддержки различных сред, таких как разработка, промежуточное тестирование и производство.
Вот несколько ресурсов, где можно узнать больше о проектах Firebase:
Понимание проектов Firebase — краткий обзор нескольких важных концепций проектов Firebase, включая их связь с Google Cloud , а также базовую иерархию проекта, его приложений и ресурсов.
Общие рекомендации по настройке проектов Firebase — содержит общие рекомендации высокого уровня по настройке проектов Firebase и регистрации приложений в проекте, что позволяет организовать четкий рабочий процесс разработки с использованием различных сред.
Обратите внимание, что для всех проектов Firebase система автоматически добавляет метку firebase:enabled на страницу «Метки» вашего проекта в консоли Google Cloud . Подробнее об этой метке читайте в разделе часто задаваемых вопросов .
Что такое организация Google Cloud ?
Организация Google Cloud — это контейнер для проектов Google Cloud (включая проекты Firebase). Такая иерархия обеспечивает более эффективную организацию, управление доступом и аудит ваших проектов Google Cloud и Firebase. Подробнее см. в разделе Создание и управление организациями .
Как добавить Firebase в существующий проект Google Cloud ?
У вас могут быть существующие проекты Google Cloud управляемые через консоль Google Cloud или консоль API Google.
Вы можете добавить Firebase к этим существующим проектам Google Cloud используя любой из следующих вариантов:
Firebase тесно интегрирован с Google Cloud . Проекты являются общими для Firebase и Google Cloud , поэтому в проектах могут быть включены как сервисы Firebase, так и сервисы Google Cloud . Вы можете получить доступ к одному и тому же проекту из консоли Firebase или консоли Google Cloud . В частности:
Некоторые продукты Firebase поддерживаются напрямую Google Cloud , например, Cloud Storage for Firebase . Список продуктов, поддерживаемых Google Cloud будет со временем расширяться.
Многие ваши настройки, включая данные о соавторах и платёжную информацию, используются Firebase и Google Cloud совместно. Использование Firebase и Google Cloud отражается в одном счёте.
Кроме того, при переходе на тариф Blaze вы сможете использовать любые передовые решения Google Cloud Infrastructure-as-a-Service и API непосредственно в вашем проекте Firebase по стандартным ценам Google Cloud . Вы также можете экспортировать данные из Google Cloud напрямую в BigQuery для анализа. Подробнее см. в статье «Связь BigQuery с Firebase».
Использование Google Cloud с Firebase (по сравнению с другими облачными сервисами, не расположенными в одном месте) даёт множество преимуществ, таких как повышение безопасности, уменьшение задержек и экономия времени. Подробнее см. на сайте Google Cloud .
Почему мой проект Google Cloud имеет метку firebase:enabled ?
На странице Метки вашего проекта в консоли Google Cloud вы можете увидеть метку firebase:enabled (в частности, Keyfirebase со Valueenabled ).
Firebase автоматически добавила эту метку, поскольку ваш проект является проектом Firebase, а это значит, что для него включены специфические конфигурации и сервисы Firebase. Узнайте больше о связи между проектами Firebase и Google Cloud .
Настоятельно рекомендуем не изменять и не удалять эту метку. Она используется Firebase и Google Cloud для отображения списка ваших проектов Firebase (например, с помощью конечной точки REST API projects.list или в меню консоли Firebase ).
Обратите внимание, что ручное добавление этой метки в список меток проекта НЕ активирует специфичные для Firebase конфигурации и сервисы для вашего проекта Google Cloud . Для этого необходимо добавить Firebase через консоль Firebase (или, в более сложных случаях, через Firebase Management REST API или Firebase CLI ).
Почему мой проект Firebase не отображается в списке проектов Firebase?
Этот ответ на часто задаваемые вопросы применим, если вы не видите свой проект Firebase в следующих местах:
В списке проектов, которые вы просматриваете в консоли Firebase
В ответе на запуск команды Firebase CLI firebase projects:list
Попробуйте выполнить следующие действия по устранению неполадок:
Для начала попробуйте открыть свой проект, перейдя по его URL-адресу. Используйте следующий формат: https://console.firebase.google.com/project/ PROJECT_ID /overview
Если вы не можете получить доступ к проекту или получаете ошибки прав доступа, проверьте следующее:
Убедитесь, что вы вошли в Firebase, используя ту же учётную запись Google, у которой есть доступ к проекту. Вы можете входить и выходить из консоли Firebase , используя аватар вашей учётной записи в правом верхнем углу консоли.
Убедитесь, что на странице «Метки» вашего проекта в консоли Google Cloud есть метка firebase:enabled . Firebase и Google Cloud используют эту метку для отображения ваших проектов Firebase. Если эта метка отсутствует, но для вашего проекта включен Firebase Management API , добавьте метку вручную (в частности, Keyfirebase со Valueenabled ).
Убедитесь, что вам назначена одна из базовых ролей IAM (владелец, редактор, наблюдатель) или роль с разрешениями, связанными с Firebase, например, предопределенная роль Firebase . Вы можете просмотреть свои роли на странице IAM в консоли Google Cloud .
Если ваш проект принадлежит организации Google Cloud , вам могут потребоваться дополнительные разрешения для просмотра проекта в консоли Firebase . Обратитесь к администратору вашей организации Google Cloud чтобы получить соответствующую роль для просмотра проекта, например, роль браузера.
Если ни один из вышеперечисленных шагов по устранению неполадок не помог вам увидеть свой проект в списке проектов Firebase, обратитесь в службу поддержки Firebase .
Сколько проектов я могу иметь на одну учетную запись Google (адрес электронной почты)?
Тарифный план Spark : Квота на создание проектов ограничена небольшим количеством проектов (обычно около 5-10).
Тарифный план Blaze : квота на создание проектов по-прежнему ограничена, но может увеличиться при подключении учетной записи Cloud Billing с хорошей репутацией.
Обратите внимание на следующее относительно ограничения квоты на создание проектов:
Это ограничение не относится только к Firebase. Ограничения по квоте проекта в Firebase такие же, как и в Google Cloud .
Сколько приложений Firebase может быть в проекте Firebase?
Проект Firebase — это контейнер для приложений Firebase для Apple, Android и веб-приложений. Firebase ограничивает общее количество приложений Firebase в проекте Firebase до 30.
После этого числа производительность начинает снижаться (особенно для Google Analytics ), и в конечном итоге, при большем количестве приложений, некоторые функции продукта перестают работать. Кроме того, если вы используете вход через Google в качестве поставщика аутентификации, для каждого приложения в вашем проекте создаётся базовый идентификатор клиента OAuth 2.0. В рамках одного проекта можно создать не более 30 идентификаторов клиента.
Необходимо убедиться, что все приложения Firebase в рамках одного проекта Firebase являются платформенными вариантами одного и того же приложения с точки зрения конечного пользователя. Например, если вы разрабатываете приложение с собственной торговой маркой, каждое приложение с независимой торговой маркой должно иметь свой собственный проект Firebase, но версии этого приложения для Apple и Android могут находиться в одном проекте. Более подробные рекомендации см. в наших общих рекомендациях по настройке проектов Firebase .
В редких случаях, когда вашему проекту требуется более 30 приложений, вы можете запросить увеличение лимита. Для подачи такого запроса ваш проект должен быть на тарифном плане Blaze. Чтобы подать запрос и получить оценку, посетите консоль Google Cloud . Подробнее об управлении квотами читайте в документации Google Cloud .
Что произойдет, если я отмечу в своем проекте среду «производства»?
В консоли Firebase вы можете пометить свои проекты Firebase по типу среды: «Производственная» или «Неопределенная» (непроизводственная) среда.
Добавление тега к типу среды никак не влияет на работу проекта Firebase или его функции. Однако добавление тега может помочь вам и вашей команде управлять различными проектами Firebase на протяжении всего жизненного цикла приложения.
Если вы отметите свой проект как производственную среду, мы добавим к нему яркий тег Prod в консоли Firebase , напоминая вам, что любые изменения могут повлиять на ваши приложения. В будущем мы можем добавить больше функций и мер безопасности для проектов Firebase, отмеченных как производственные среды.
Чтобы изменить тип среды вашего проекта Firebase, перейдите в settingsНастройки проекта > Общие , затем на карточке Ваш проект в разделе Окружение нажмите edit , чтобы изменить тип среды.
Где я могу найти идентификатор приложения Firebase?
В консоли Firebase перейдите в settingsProject settings (Настройки проекта) . Прокрутите вниз до карточки Your apps (Ваши приложения) , затем нажмите на нужное приложение Firebase, чтобы просмотреть информацию о нём, включая его App ID (Идентификатор приложения) .
Вот несколько примеров значений идентификатора приложения:
Приложения Firebase для iOS: 1:1234567890:ios:321abc456def7890
Приложения Firebase для Android: 1:1234567890:android:321abc456def7890
Любая из следующих ролей Firebase: владелец или администратор Firebase и
Любой из следующих уровней доступа Google Play : владелец учетной записи или администратор
Для привязки вашего приложения AdMob вам необходимо быть одновременно владельцем проекта Firebase и администратором AdMob .
Для привязки аккаунта AdWords вам необходимо быть одновременно владельцем проекта Firebase и администратором AdWords.
Для привязки вашего проекта BigQuery вам необходимо быть владельцем проекта Firebase.
Какие уведомления об открытом исходном коде мне следует включить в свое приложение?
На платформах Apple модуль Firebase содержит файл NOTICES с соответствующими записями. В Firebase Android SDK есть вспомогательная Activity для отображения информации о лицензии.
Разрешения и доступ к проектам Firebase
Как назначить участнику проекта роль, например, роль владельца?
Чтобы управлять ролями, назначенными каждому участнику проекта, вы должны быть владельцем проекта Firebase (или иметь назначенную роль с разрешением resourcemanager.projects.setIamPolicy ).
Вот места, где вы можете назначать роли и управлять ими:
Консоль Google Cloud предлагает широкий набор инструментов для назначения ролей участникам проекта на странице IAM . В консоли Cloud вы также можете создавать и управлять пользовательскими ролями , а также предоставлять сервисным аккаунтам доступ к вашему проекту.
Обратите внимание, что в консоли Google Cloud участники проекта называются принципалами .
Если владелец вашего проекта больше не может выполнять задачи владельца (например, человек покинул вашу компанию) и ваш проект не управляется через организацию Google Cloud (см. следующий абзац), вы можете обратиться в службу поддержки Firebase и уточнить у них, как запросить доступ к проекту Firebase.
Обратите внимание: если проект Firebase входит в организацию Google Cloud , у него может не быть владельца. Если вам не удаётся найти владельца для своего проекта Firebase, обратитесь к менеджеру вашей организации Google Cloud чтобы назначить владельца для проекта.
Как найти владельца проекта Firebase?
Вы можете просмотреть участников проекта и их роли в следующих местах:
Если у вас есть доступ к проекту в консоли Firebase , вы можете просмотреть список участников проекта, включая владельцев, на странице Пользователи и разрешения консоли Firebase .
Если у вас нет доступа к проекту в консоли Firebase , проверьте, есть ли у вас доступ к проекту в консоли Google Cloud . Список участников проекта, включая владельцев, можно просмотреть на странице IAM консоли Google Cloud .
Если владелец вашего проекта больше не может выполнять задачи владельца (например, человек покинул вашу компанию) и ваш проект не управляется через организацию Google Cloud (см. следующий абзац), вы можете обратиться в службу поддержки Firebase , чтобы назначить временного владельца.
Обратите внимание: если проект Firebase входит в организацию Google Cloud , у него может не быть владельца. Вместо этого лицо, управляющее вашей организацией Google Cloud может выполнять многие задачи, доступные владельцу. Однако для выполнения некоторых задач, связанных с владельцем (например, назначение ролей или управление ресурсами Google Analytics ), администратору может потребоваться назначить себе роль владельца . Если вы не можете найти владельца для своего проекта Firebase, свяжитесь с лицом, управляющим вашей организацией Google Cloud чтобы назначить владельца для проекта.
Почему или когда следует назначать участнику проекта роль владельца?
Для обеспечения надлежащего управления проектом Firebase у него должен быть владелец .
Участники проекта с ролью владельца часто являются единственными участниками проекта, которые могут выполнять административные задачи или получать важные уведомления :
Участники проекта с ролью владельца часто являются единственными участниками, которые могут выполнять важные административные действия (например, назначать роли и управлять свойствами Google Analytics ), а служба поддержки Firebase может выполнять административные запросы только от подтвержденных владельцев проекта.
Участники проекта с ролью владельца часто являются единственными, кто (по умолчанию) получает уведомления об изменениях в проекте или продуктах (например, об изменениях в счетах и юридическом оформлении, об упразднении функций и т. д.). При желании вы можете настроить «основные контакты» своего проекта, если хотите, чтобы уведомления получали конкретные или дополнительные участники проекта.
После того как вы назначите владельца(ев) для проекта Firebase, важно поддерживать эти назначения в актуальном состоянии.
Обратите внимание: если проект Firebase входит в организацию Google Cloud , управляющий организацией Google Cloud может выполнять многие задачи, доступные владельцу. Однако для выполнения некоторых задач, связанных с владельцем (например, назначение ролей или управление ресурсами Google Analytics ), администратору может потребоваться назначить себе роль владельца .
Я не думаю, что у меня есть проект Firebase, но мне пришло письмо о нём. Как мне получить доступ к этому проекту?
В полученном вами электронном письме должна быть ссылка для открытия вашего проекта Firebase. Щёлкнув по ней, вы откроете проект в консоли Firebase .
Если вы не можете открыть проект по ссылке, убедитесь, что вы вошли в Firebase, используя ту же учётную запись Google, которая вы получили письмо о проекте. Вы можете войти в консоль Firebase и выйти из неё, используя аватар вашей учётной записи в правом верхнем углу консоли.
Обратите внимание: если вы являетесь администратором организации Google Cloud , вы можете получать уведомления об изменениях в проектах Firebase внутри вашей организации. Однако у вас может не хватать прав для открытия проекта Firebase. В таких случаях проще всего назначить себе роль владельца, чтобы открыть проект и выполнить необходимые действия. Подробнее о том , зачем и когда назначать роль владельца , читайте здесь.
Платформы и фреймворки
Посетите страницы устранения неполадок и часто задаваемых вопросов для конкретной платформы, чтобы получить полезные советы и ответы на дополнительные часто задаваемые вопросы.
Какие браузеры поддерживаются для доступа к консоли Firebase ?
Доступ к консоли Firebase можно получить из последних версий популярных настольных браузеров, таких как Chrome, Firefox, Safari и Edge. Мобильные браузеры в настоящее время поддерживаются не полностью.
Я могу загрузить консоль Firebase , но почему я не могу найти или получить доступ к своему проекту Firebase?
Этот раздел часто задаваемых вопросов применим, если у вас возникла одна из следующих проблем:
Консоль Firebase возвращает страницу с ошибкой, в которой говорится, что ваш проект, возможно, не существует или у вас нет доступа к проекту.
Консоль Firebase не отображает ваш проект, даже если вы вводите его идентификатор или имя проекта в поле поиска консоли.
Попробуйте выполнить следующие действия по устранению неполадок:
Для начала попробуйте открыть свой проект, перейдя по его URL-адресу. Используйте следующий формат: https://console.firebase.google.com/project/ PROJECT-ID /overview
Если вы по-прежнему не можете получить доступ к проекту или получаете ошибки прав доступа, проверьте следующее:
Убедитесь, что вы вошли в Firebase, используя ту же учётную запись Google, у которой есть доступ к проекту. Вы можете входить и выходить из консоли Firebase , используя аватар вашей учётной записи в правом верхнем углу консоли.
Убедитесь, что вам назначена одна из базовых ролей IAM (владелец, редактор, наблюдатель) или роль с разрешениями, связанными с Firebase, например, предопределенная роль Firebase . Вы можете просмотреть свои роли на странице IAM в консоли Google Cloud .
Если ваш проект принадлежит организации Google Cloud , вам могут потребоваться дополнительные разрешения для просмотра проекта в консоли Firebase . Обратитесь к администратору вашей организации Google Cloud , чтобы получить соответствующую роль для просмотра проекта, например, роль браузера.
Если ни один из вышеперечисленных шагов по устранению неполадок не помог вам найти или получить доступ к своему проекту, обратитесь в службу поддержки Firebase .
Почему у меня не загружается консоль Firebase ?
Этот раздел часто задаваемых вопросов применим, если у вас возникла какая-либо из следующих проблем:
Страница в консоли Firebase никогда не загружается до конца.
Данные на странице не загружаются должным образом.
При загрузке консоли Firebase вы получаете сообщения об ошибках браузера.
Попробуйте выполнить следующие действия по устранению неполадок:
Проверьте строку «Консоль» на панели состояния Firebase на предмет возможных перебоев в обслуживании.
Попробуйте загрузить консоль Firebase в режиме инкогнито или в приватном окне.
Отключите все расширения браузера.
Убедитесь, что сетевое соединение не заблокировано блокировщиком рекламы, антивирусом, прокси-сервером, брандмауэром или другим программным обеспечением.
Попробуйте загрузить консоль Firebase , используя другую сеть или устройство.
Чтобы изменить языковые настройки, см. раздел Изменить язык .
Консоль Firebase поддерживает следующие языки:
Английский
Бразильский португальский
Французский
немецкий
индонезийский
японский
корейский
Русский
упрощенный китайский
испанский
Традиционный китайский
Какие роли и разрешения поддерживает консоль Firebase ?
Консоль Firebase и консоль Google Cloud используют одни и те же базовые роли и разрешения. Подробнее о ролях и разрешениях см. в документации Firebase IAM .
Владелец проекта может добавлять других участников в проект, настраивать интеграцию (связывание проекта с такими сервисами, как BigQuery или Slack) и имеет полный доступ на редактирование проекта.
Редактор проекта имеет полный доступ к редактированию проекта.
Наблюдатель проекта имеет доступ только на чтение. Обратите внимание, что консоль Firebase в настоящее время не скрывает/не отключает элементы управления редактированием пользовательского интерфейса для наблюдателей проекта, но эти операции не будут выполнены для участников проекта, которым назначена роль наблюдателя.
Firebase также поддерживает:
Предопределенные роли Firebase — специально подобранные роли Firebase, которые обеспечивают более детальное управление доступом, чем базовые роли владельца, редактора и наблюдателя.
Пользовательские роли — полностью настраиваемые роли IAM, которые вы создаете для настройки набора разрешений, соответствующих конкретным требованиям вашей организации.
Как работает «пример приложения» на консоли? Что происходит и что можно сделать?
Консоль Firebase предоставляет пример приложения , чтобы у вас было реальное работающее приложение для изучения и экспериментов с Firebase и другими службами Google (например, API Gemini ).
Автоматическая настройка Firebase и развертывание примера приложения
Когда вы просматриваете пример приложения в консоли Firebase , мы автоматически делаем для вас следующее:
Создайте новый проект Firebase для вашего примера приложения.
Зарегистрируйте Firebase Web App в новом проекте Firebase
Включите службы и API, которые используются примером приложения (например, Firebase Authentication , Cloud Firestore и т. д.)
Предоставьте все необходимые ресурсы (например, экземпляры базы данных и правила безопасности)
Настройте Firebase AI Logic для использования Gemini Developer API
Разверните пример приложения по временному URL-адресу предварительного просмотра с помощью Firebase Hosting (по умолчанию срок действия этого URL-адреса истекает через 7 дней ).
Изучите кодовую базу примера приложения
Вариант 1: Открыть персонализированную версию кодовой базы примера приложения в Firebase Studio
Пример приложения позволяет открыть персонализированную версию кодовой базы примера приложения в Firebase Studio (браузерном рабочем пространстве Google для разработки полнофункциональных приложений). После настройки проекта и приложения (см. выше) вы найдете ссылки на Firebase Studio на баннерах в консоли Firebase и в верхней части развернутого приложения.
Когда вы открываете пример приложения в Firebase Studio , мы автоматически делаем для вас следующее:
Используйте тот же проект Firebase, Firebase Web App и ресурсы, созданные при первоначальной настройке (см. выше)
Вставьте конфигурацию Firebase вашего примера приложения в кодовую базу (обычно в src/bootstrap.js )
В Firebase Studio вы можете изучить кодовую базу, чтобы понять, как взаимодействовать с различными службами Firebase и Google.
Вариант 2: просмотр публичной, неперсонализированной версии кодовой базы примера приложения на GitHub
Кроме того, вы можете просмотреть публичную, неперсонализированную версию кодовой базы примера приложения на GitHub.
Почему в журналах Emulator Suite отображается ошибка, начинающаяся со слов «Не рекомендуется использовать несколько идентификаторов проектов в режиме одного проекта»?
Это сообщение означает, что Emulator Suite обнаружил, что, возможно, запущен эмулятор конкретного продукта с разными идентификаторами проектов. Это может указывать на неправильную конфигурацию и вызывать проблемы при взаимодействии эмуляторов друг с другом, а также при попытке взаимодействия с эмуляторами из вашего кода. Если идентификаторы проектов не совпадают, часто возникает ощущение, что данные отсутствуют, поскольку данные, хранящиеся в эмуляторах, привязаны к идентификатору проекта, а совместимость зависит от совпадения идентификаторов проектов.
Это часто вызывало путаницу среди разработчиков, поэтому по умолчанию Local Emulator Suite теперь допускает запуск только с одним идентификатором проекта, если только вы не укажете иное в файле конфигурации firebase.json . Если эмулятор обнаружит более одного идентификатора проекта, он выдаст предупреждение и потенциально вызовет фатальную ошибку.
Проверьте декларацию(и) идентификатора вашего проекта на наличие несоответствий в:
Проект по умолчанию, заданный в командной строке. По умолчанию при запуске будет взят идентификатор проекта, выбранного с помощью firebase init или firebase use . Чтобы просмотреть список проектов (и узнать, какой из них выбран), используйте firebase projects:list .
Модульные тесты. Идентификатор проекта часто указывается в вызовах методов initializeTestEnvironment или initializeTestApp библиотеки Rules Unit Testing. Другой тестовый код может инициализироваться с помощью initializeApp(config) .
Флаг командной строки --project . Передача флага --project в Firebase CLI переопределяет проект по умолчанию. Необходимо убедиться, что значение флага соответствует идентификатору проекта в модульных тестах и при инициализации приложения.
Места для проверки, специфичные для платформы:
Интернет
Свойство projectId в объекте JavaScript firebaseConfig , используемое в initializeApp .
Андроид
Свойство project_id внутри файла конфигурации google-services.json .
Платформы Apple
Свойство PROJECT_ID в файле конфигурации GoogleService-Info.plist .
Чтобы отключить режим одного проекта, обновите firebase.json , добавив ключ singleProjectMode :
Часто задаваемые вопросы о ценах на конкретный продукт см. в разделе продукта на этой странице или в специальной документации по продукту.
Какие продукты платные, а какие бесплатные?
Подробную информацию о платных и бесплатных продуктах см. в разделе Тарифные планы Firebase .
Предлагает ли Firebase бесплатные пробные кредиты для платных продуктов?
Платные сервисы Firebase можно использовать в рамках бесплатной пробной версии Google Cloud . Новые пользователи Google Cloud и Firebase могут воспользоваться 90-дневным пробным периодом, включающим бесплатные кредиты Cloud Billing на сумму 300 долларов США для изучения и оценки продуктов и сервисов Google Cloud и Firebase.
В течение бесплатного пробного периода Google Cloud вам будет предоставлен бесплатный пробный аккаунт Cloud Billing . Любой проект Firebase, связанный с этим аккаунтом, будет работать по тарифному плану Blaze с оплатой по факту использования в течение бесплатного пробного периода.
Не беспокойтесь, привязка проекта Firebase к этой бесплатной пробной учетной записи Cloud Billing не позволит нам взимать с вас плату за использование, превышающее эти кредиты . Плата за использование, превышающее эти кредиты, взимается только в том случае, если вы явно включите взимание платы, обновив свою бесплатную пробную учетную запись Cloud Billing до платной. Вы можете перейти на платную учетную запись в любой момент в течение пробного периода. После перехода на платную учетную запись вы по-прежнему сможете использовать оставшиеся кредиты (в течение 90-дневного периода).
По истечении бесплатного пробного периода, если вы не перешли с бесплатной пробной версии Cloud Billing на платную, ваш связанный проект Firebase будет автоматически понижен до тарифного плана Spark . Обратите внимание, что вы можете в любое время снова перейти на тарифный план Blaze .
Наш тарифный план Spark — отличная возможность разработать приложение бесплатно. Вы получаете все бесплатные функции Firebase ( Analytics , Remote Config , Crashlytics и т. д.) и множество платных функций инфраструктуры. Однако, если вы превысите ресурсы тарифного плана Spark в течение календарного месяца, ваше приложение будет отключено до конца этого месяца. Кроме того, при использовании тарифного плана Spark недоступны функции Google Cloud .
Тарифный план Blaze
Наш тарифный план Blaze разработан для производственных приложений. Он также позволяет расширить возможности вашего приложения платными функциями Google Cloud . Вы платите только за потребляемые ресурсы, что позволяет масштабировать их по мере необходимости. Мы стремимся сделать цены на тарифный план Blaze конкурентоспособными по сравнению с ведущими поставщиками облачных услуг.
Могу ли я в любое время повысить, понизить или отменить подписку?
Да, вы можете перейти на более высокий, более низкий тариф или отменить подписку в любое время. Обратите внимание, что мы не предоставляем пропорциональный возврат средств за понижение тарифа или отмену подписки. Это означает, что если вы перейдете на более низкий тариф или отмените подписку до окончания расчетного периода, вы все равно заплатите за оставшуюся часть месяца.
Чем бесплатное использование в плане Blaze отличается от бесплатного использования в плане Spark?
Бесплатное использование на тарифном плане Blaze рассчитывается ежедневно. Лимиты использования также отличаются от тарифного плана Spark для Cloud Functions , аутентификации по телефону и Test Lab .
Для Cloud Functions бесплатное использование по плану Blaze рассчитывается на уровне учетной записи Cloud Billing , а не на уровне проекта и имеет следующие ограничения:
2 млн вызовов/месяц
400 тыс. ГБ-секунд/месяц
200 тыс. процессорных секунд в месяц
5 ГБ исходящего сетевого трафика/месяц
Для аутентификации по телефону бесплатное использование тарифного плана Blaze рассчитывается ежемесячно.
Для Test Lab бесплатное использование плана Blaze имеет следующие ограничения:
30 минут использования физического устройства в день
60 минут виртуального устройства/день
Сбрасывается ли квота бесплатного использования при переходе с тарифного плана Spark на Blaze?
Бесплатное использование тарифного плана Spark включено в тариф Blaze. Бесплатное использование не сбрасывается при переходе на тариф Blaze.
Что произойдет с моим проектом Firebase, если я свяжу платежную учетную запись с этим проектом в консоли Google Cloud ?
Если учетная запись Cloud Billing связана с проектом в консоли Google Cloud , этот же проект будет автоматически обновлен до плана Firebase с оплатой по мере использования Blaze (если этот проект в настоящее время находится на плане Spark).
Напротив, если существующая активная учетная запись Cloud Billing будет отвязана от проекта в консоли Google Cloud , этот проект будет переведен на бесплатный план Firebase Spark.
Как я могу контролировать свое использование и выставление счетов?
Вы можете отслеживать использование ресурсов проекта в консоли Firebase на любой из следующих панелей управления:
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 kind of support will I receive?
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.
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.
What happened to the Flame pricing plan?
In January 2020, the Flame pricing plan ($25/mo of additional quota) was removed as an option for new sign-ups. Existing plan users were granted a grace period to migrate their projects off the Flame plan. In February 2022, the remaining projects on the Flame pricing plan were downgraded to the Spark pricing plan. Соответственно,
Existing Spark and Blaze plan projects and any new projects can no longer switch to or sign up for the Flame plan.
If you moved an existing Flame plan project to a different pricing plan, the project cannot return to the Flame plan.
Projects downgraded to the Spark plan can be upgraded to the Blaze plan to resume additional paid services.
References to the Flame plan have been removed from documentation.
Do you have more questions about the Flame plan retirement? Read some of the additional FAQs below.
Want to learn about the other pricing plans offered by Firebase? Visit our Firebase pricing page ! If you'd like to start moving any existing projects to another pricing plan, you can do that in the Firebase console for your project.
Additional FAQs about the Flame plan retirement
I have a project or a process or a business model that relies on a fixed Firebase cost. What should I do?
Sign up for the Blaze pricing plan, and make sure to set budget alerts .
May I be given special access to create new Flame plan projects?
No, Firebase isn't offering special access for projects to switch to or sign-up for the Flame plan.
I changed my Flame plan project to a different pricing plan. How do I change it back?
Switching to the Flame plan is no longer possible. For access to services provided by the Flame plan, make sure that you're using the Blaze pricing plan, and consider setting up budget alerts for your project.
My project was automatically switched to a different pricing plan as part of the Flame plan retirement. What should I do?
If your project requires additional quota beyond what is provided with the Spark plan, you'll need to upgrade your project to the Blaze pricing plan.
Why is the Flame plan being retired?
Over the years, we've seen declining usage of the Flame plan, and most projects that use the plan are not consuming its full value. Maintaining this pricing plan is generally not cost-effective, and we feel that we can serve everyone better if resources went to other Firebase initiatives.
Конфиденциальность
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.
A/B Testing : Why do I receive a "Project not linked to Google Analytics" message when creating a Remote Config experiment?
If you've already linked Firebase and Google Analytics , but still see a message that Google Analytics is not linked, make sure that an Analytics stream exists for all apps in your project. Currently, all apps in a project must be connected to a Google Analytics stream to use A/B Testing.
You can find the list of all active streams on the Google Analytics integration details page within the Firebase console, accessed from settingsProject Settingschevron_rightIntegrationschevron_rightGoogle Analyticschevron_rightManage .
Creating a Google Analytics stream for any app that does not have one should resolve the issue. There are a few ways to create streams for missing apps:
If you only have one or two apps missing an associated Google Analytics stream, you can choose one of the following methods to add a Google Analytics stream:
Delete and re-add any app without an active stream in the Firebase console.
From the Google Analytics console , select Admin , click Data Streams , then click Add stream , add the missing app's details, and click Register app .
If you have more than a few missing app streams, unlinking and relinking your Google Analytics property is the fastest and most efficient way to create the missing app streams:
From settingsProject Settings , select Integrations .
Within the Google Analytics card, click Manage to access Firebase and Google Analytics settings.
Make a note of the Google Analytics Property ID and the Linked Google Analytics account .
Click more_vertMore and select Unlink Analytics from this project .
Review the warning that appears (don't worry here; you will relink the same property in the next step), then click Unlink Google Analytics .
When unlinking is complete, you'll be redirected to the Integrations page.
Within the Google Analytics card, click Enable to begin the relinking process.
Select your Analytics account from the Select account list.
Next to Automatically create a new property in this account , click editEdit and, from the Analytics property list that appears, select your property ID.
A list of all apps in your project appears. Existing stream mappings for each app are listed, and apps that do not have a stream will have one created for them.
Click Enable Google Analytics to relink the property.
To use AdMob , always use the Google Mobile Ads SDK as described in this FAQ. Additionally and optionally, if you want to collect user metrics for AdMob , then include the Firebase SDK for Google Analytics in your app.
For Android projects : Add the dependency for the Google Mobile Ads SDK to your build.gradle file: implementation 'com.google.android.gms:play-services-ads:24.7.0'
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 : How do I update my Analytics property settings?
From the Admin page in your Google Analytics property, you can update your property settings, such as:
Data sharing settings
Data retention settings
Time zone and currency settings
To update your property settings, follow these steps:
In the Firebase console, go to your settings > Project settings .
Go to the Integrations tab, and then in the Google Analytics card, click Manage or View link .
Analytics on-device measurement in my iOS app: How was the Analytics SDK updated for on-device conversion measurement support, and am I required to upgrade?
Before our release updating on-device conversion measurement using event data, developers had to manually include multiple SDK modules to use on-device measurement capabilities, a time-consuming process. As a result, we updated the existing default SDK module ( FirebaseAnalytics ) to include on-device conversion measurement capabilities as well for Google Ads.
* - This configuration will include On-Device Conversion Measurement (Event Data) as well. If needed, you can disable the feature by setting the value of GOOGLE_ADS_ON_DEVICE_CONVERSION_EVENT_DATA_ENABLED to NO (Boolean) in your app's Info.plist file.
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: Can I move Analytics data from one Firebase project to another project?
No, it isn't possible to directly move Analytics data from one Firebase project to another project. However, you can export and combine data from both projects into a single location, such as BigQuery for analysis.
While moving existing data isn't possible, you can link an existing Analytics property to a new Firebase project and start collecting data from then on in that new project. You can do this linking in either the Firebase console or the Google Analytics UI. Learn more about linking a property to your Firebase project .
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 regions are supported for phone authentication?
Firebase Authentication supports phone number verification globally, but not all networks reliably deliver verification messages. The following regions have good rates of delivery, and should be expected to work well for phone authentication. Where noted, some carriers are unavailable in a region due to poor delivery success rates.
Область
Код
ОБЪЯВЛЕНИЕ
Андорра
АЕ
Объединенные Арабские Эмираты
АФ
Афганистан
АГ
Антигуа и Барбуда
АЛ
Албания
ЯВЛЯЮСЬ
Армения
АО
Ангола
АР
Аргентина
КАК
Американское Самоа
В
Австрия
AU
Австралия
АВ
Аруба
АЗ
Азербайджан
БА
Босния и Герцеговина
ББ
Барбадос
БД
Бангладеш
БЫТЬ
Бельгия
БФ
Буркина-Фасо
БГ
Болгария
БЖ
Бенин
БМ
Бермудские острова
БН
Бруней-Даруссалам
БО
Боливия
БР
Бразилия
БС
Багамские острова
БТ
Бутан
БВ
Ботсвана
К
Беларусь
БЗ
Белиз
Калифорния
Канада
компакт-диск
Конго (Киншаса)
CF
Центральноафриканская Республика
CG
Конго (Браззавиль)
Ч
Швейцария
КИ
Берег Слоновой Кости
СК
Острова Кука
КЛ
Чили
СМ
Камерун
СО
Колумбия
CR
Коста-Рика
резюме
Кабо-Верде
CW
Кюрасао
CY
Кипр
Чехия
Чешская Республика
ДЕ
Германия
диджей
Джибути
ДК
Дания
ДМ
Доминика
ДЕЛАТЬ
Доминиканская Республика
ДЗ
Алжир
ЕС
Эквадор
НАПРИМЕР
Египет
ЕС
Испания
ET
Эфиопия
ФИ
Финляндия
ФДж
Фиджи
ФК
Фолклендские (Мальвинские) острова
ФМ
Микронезия, Федеративные Штаты
ФО
Фарерские острова
FR
Франция
ГА
Габон
ГБ
Великобритания
ГД
Гренада
GE
Джорджия
ГФ
Французская Гвиана
ГАРАНТИРОВАННАЯ ПОБЕДА
Гернси
ГХ
Гана
ГИ
Гибралтар
ГЛ
Гренландия
ГМ
Гамбия
Врач общей практики
Гваделупа
GQ
Экваториальная Гвинея
ГР
Греция
ГТ
Гватемала
ГЯ
Гайана
Гонконг
Гонконг, САР Китая
HN
Гондурас
HR
Хорватия
ХТ
Гаити
HU
Венгрия
ИДЕНТИФИКАТОР
Индонезия
IE
Ирландия
ИЛ
Израиль
Я
Остров Мэн
В
Индия
IQ
Ирак
ЭТО
Италия
JE
Джерси
Дж. М.
Ямайка
ДЖО
Иордания
JP
Япония
КЕ
Кения
КГ
Кыргызстан
КХ
Камбоджа
КМ
Коморские острова
КН
Сент-Китс и Невис
КР
Корея (Южная)
кВт
Кувейт
Кентукки
Каймановы острова
КЗ
Казахстан
Лос-Анджелес
Лаосская Народно-Демократическая Республика
ФУНТ
Ливан
ЛК
Сент-Люсия
ЛИ
Лихтенштейн
ЛК
Шри-Ланка
ЛС
Лесото
ЛТ
Литва
ЛУ
Люксембург
ЛВ
Латвия
ЛИ
Ливия
МА
Марокко
МД
Молдова
МНЕ
Черногория
МФ
Сен-Мартен (французская часть)
МГ
Мадагаскар
МК
Македония, Республика
ММ
Мьянма
МН
Монголия
МО
Макао, САР Китая
РС
Монтсеррат
МТ
Мальта
МУ
Маврикий
МВт
Малави
МХ
Мексика
МОЙ
Малайзия
МЗ
Мозамбик
NA
Намибия
NC
Новая Каледония
СВ
Нигер
НФ
остров Норфолк
НГ
Нигерия
НИ
Никарагуа
Нидерланды
Нидерланды
НЕТ
Норвегия
НП
Непал
Новая Зеландия
Новая Зеландия
ОМ
Оман
ПА
Панама
ЧП
Перу
ПГ
Папуа-Новая Гвинея
ПХ
Филиппины
ПК
Пакистан
ПЛ
Польша
премьер-министр
Сен-Пьер и Микелон
PR
Пуэрто-Рико
PS
Палестинская территория
ПТ
Португалия
ПИ
Парагвай
контроль качества
Катар
РЕ
Реюньон
РО
Румыния
РС
Сербия
РУ
Российская Федерация
РВ
Руанда
СА
Саудовская Аравия
СК
Сейшельские острова
ЮВ
Швеция
СГ
Сингапур
Ш
Святая Елена
СИ
Словения
СК
Словакия
СЛ
Сьерра-Леоне
СН
Сенегал
СР
Суринам
СТ
Сан-Томе и Принсипи
СВ
Сальвадор
СЗ
Свазиленд
ТС
Острова Теркс и Кайкос
ТГ
Того
ТХ
Таиланд
ТЛ
Тимор-Лешти
ТМ
Туркменистан
К
Тонга
ТР
Турция
ТТ
Тринидад и Тобаго
ТВ
Тайвань, Китайская Республика
ТЗ
Танзания, Объединенная Республика
UA
Украина
УГ
Уганда
НАС
Соединенные Штаты Америки
УЙ
Уругвай
УЗ
Узбекистан
ВК
Сент-Винсент и Гренадины
ВЕ
Венесуэла (Боливарианская Республика)
ВГ
Британские Виргинские острова
VI
Виргинские острова, США
ВН
Вьетнам
WS
Самоа
ВЫ
Йемен
YT
Майотта
ЗА
ЮАР
ЗМ
Замбия
ЗВ
Зимбабве
Firebase Authentication : What happened to the free SMS on the Spark plan?
Starting September 2024, to improve the security and service quality of Phone Authentication, Firebase projects must be linked to a Cloud Billing account to enable and use the SMS Service.
Firebase Authentication : How can I prevent SMS abuse when using phone authentication?
To help protect your project from SMS traffic pumping and API abuse, take the following steps:
Look for regions with a very high number of sent SMS and a very low number (or zero) of verified SMS. The ratio of verified/sent is your success rate. Healthy success rates are commonly in the 70-85% range since SMS is not a guaranteed delivery protocol, and some regions may experience abuse. Success rates below 50% imply many sent SMS but few successful logins, which is a common indicator of bad actors and SMS traffic pumping.
Use SMS Region Policy to either deny SMS regions with low success rates, or only allow certain regions if your app is only intended for distribution in certain markets.
Limit your authorized authentication domains
Use the Authentication settings dashboard to manage authorized domains. The localhost domain is added by default to the approved authentication domains to simplify development. Consider removing localhost from the authorized domains in your production project to prevent bad actors from running code on theirlocalhost to access your production project.
Enable and enforce App Check
Enable App Check to help protect your project from API abuse by attesting that requests only come from applications associated with your project.
Remember that you need to enforce App Check for Authentication in the Firebase console (consider monitoring traffic before enforcing). Also, double check your reCAPTCHA Enterprise approved sites list to validate that it only contains your production sites, and that the list of applications registered to your project in App Check is accurate.
Note that App Check helps protect against automated attacks by asserting that the call comes from one of your registered applications. It does not prevent users from using your app in unintended ways (for example, starting then never finishing login flows to generate sent SMS).
Firebase Authentication : Are phone numbers ported to a new carrier supported by phone authentication?
At this time, numbers ported between carriers will result in all SMS becoming undeliverable for those end users. There is no workaround, and Firebase is working on this issue.
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 : In my web app, why are sign-in with redirects failing with the following error: This domain YOUR_REDIRECT_DOMAIN is not authorized to run this operation ?
Follow the troubleshooting steps in this FAQ if you're getting the following error:
This domain YOUR_REDIRECT_DOMAIN is not authorized to run this operation.
This error is most likely caused because your redirect domain isn't listed as a authorized domain for Firebase Authentication , or the API key that you use with the Firebase Authentication Service is invalid.
First make sure that YOUR_REDIRECT_DOMAIN is in the list of authorized domains for your Firebase project. If your redirect domain is already listed there, continue to troubleshoot an invalid API key.
By default, Firebase Authentication JS SDK relies on the API key for your Firebase project that's labeled as the Browser key , and it uses this key to verify that a sign-in redirect URL is valid according to the list of authorized domains. Authentication gets this API key depending on how you access the Authentication SDK:
If you use Hosting -provided Auth helpers to log users in with the Authentication JS SDK, then Firebase automatically obtains your API key with the rest of your Firebase configuration each time you deploy to Firebase Hosting . Make sure that the authDomain in your web app firebaseConfig is properly configured to use one of the domains for that Hosting site. You can verify this by going to https:// authDomain __/firebase/init.json , and checking that the projectId matches that from your firebaseConfig .
If you self-host the sign-in code , then you can use a __/firebase/init.json file to provide the Firebase configuration to the self-hosted Authentication JS SDK Redirect helper. The API key and the projectId listed in this config file should match your web app firebaseConfig .
Check to make sure this API key hasn't been deleted: Go to the APIs & Services > Credentials panel in the Google Cloud console where all the API keys for your project are listed.
If the Browser key has not been deleted, check the following:
If you self-host the sign-in code, make sure the API key listed in your __/firebase/init.json file matches the API key in the Cloud console. Correct the key in the file, if necessary, then redeploy your app.
If the Browser key has been deleted, you can have Firebase generate a new API key for you: In the Firebase console, go to settings > Project settings , then in the Your apps section, click on your web app. This action automatically creates an API key that you can see in the SDK setup and configuration section for your web app.
Note that in the Cloud console this new API key will not be called Browser key ; instead, it will be the same name as your Firebase Web App's nickname. If you decide to add API restrictions to this new API key, make sure the Firebase Authentication API is in the list of allowed APIs.
Once your new API key is created, complete the applicable steps below:
If you use reserved Hosting URLs , then redeploy your app to Firebase so that it can automatically obtain the new API key with the rest of your Firebase configuration.
If you self-host the sign-in code , copy the new API key and add it to your __/firebase/init.json file, then redeploy your app.
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 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.
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 server protocol. 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.
Возможности
Notifications composer
Cloud Messaging
Цель
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
Доставка
Немедленный
Future client device local time
Аналитика
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.
Cloud Messaging : How does an app instance restored from a backup work with FCM?
One FCM token is connected to an app on one device. FCM data is excluded from backup, so an app instance restored from a backup is treated as a new app instance from FCM's perspective. Device users have to open a restored app to be able to get a new FCM token.
To avoid conflict with the original app instance, we also recommend developers to exclude Firebase installation data from backup. The Firebase installation data is stored in a PersistedInstallation....json file. The file name is a constant for an app. For example <exclude domain="file" path="PersistedInstallation.W0R...GQ.json" />
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.
FCM quotas and limits
How do I notify a large customer base within 2 minutes?
Unfortunately, this use case cannot be supported. You must spread your traffic out over 5 minutes.
My app notifies users of events, and these messages must be delivered immediately to support my business model. Can I get more quota?
Unfortunately, we cannot grant quota increases for this reason. You must spread your traffic out over 5 minutes.
My messages are about scheduled events. How can I send all my traffic at the top of the hour?
We recommend that you start sending the notifications at least 5 minutes prior to the event.
How long will it take for my quota request to be fulfilled?
This depends a bit on your use of FCM. In any case, you can expect an answer in a few business days. In some cases, there may be some back-and-forth regarding your usage of FCM and various circumstances, which can prolong the process. If all requirements are met, most requests will be handled within 2 weeks.
429s are hard for me / my business to deal with. Can I get an exemption or more quota to avoid getting 429s?
While we understand that quota limits can be challenging, quotas are vital to keeping the service reliable and we can't grant exemptions.
Can I get more quota for a temporary event?
You may request additional quota to support an event lasting up to 1 month. File the request at least 1 month in advance of the event and with clear details on when the event starts and ends, and FCM will make every practical effort to fulfill the request (no increase can be guaranteed). These quota increases will be reverted after the event's end date.
Is my current quota subject to change?
While Google will not do so lightly, quotas may be changed as needed to protect the integrity of the system. When possible, Google will notify you in advance of such changes.
Cloud Storage for Firebase
Cloud Storage for Firebase : What are the changes to the default bucket announced in September 2024?
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 : On Spark plan projects, can I store executable files?
For no-cost (Spark) plan projects, Firebase blocks uploads and hosting of certain executable file types for Windows, Android and Apple by Cloud Storage for Firebase and Firebase Hosting . This policy exists to prevent abuse on our platform.
Serving, hosting and file uploads of disallowed files are blocked for all Spark projects created on or after Sept 28th, 2023. For existing Spark projects with files uploaded before that date, such files can still be uploaded and hosted.
This restriction applies to Spark plan projects. Projects on the pay as you go (Blaze) plan are not affected.
The following file types cannot be hosted on Firebase Hosting and Cloud Storage for Firebase :
Windows files with .exe , .dll and .bat extensions
Android files with .apk extension
Apple platform files with .ipa extension
Что мне нужно сделать?
If you still want to host these file types after September 28th, 2023:
For Hosting: upgrade to the Blaze plan before you can deploy these file types to Firebase Hosting via the firebase deploy command.
For Storage: upgrade to the Blaze plan to upload these file types to the bucket of your choice using the GCS CLI, the Firebase console, or Google Cloud console.
Use Firebase tools to manage your Firebase Hosting and Cloud Storage resources.
For managing resources in Firebase Hosting , use the Firebase console to delete releases according to this guide .
For managing resources in Cloud Storage , navigate to the Storage product page in your project.
On the Files tab, locate disallowed files to delete in your folder hierarchy, then select them using the checkbox next to the filename(s) on the left-hand side of the panel.
Click Delete , and confirm the files were deleted.
Cloud Storage for Firebase : Why do I see an unexpected increase in upload and download operations?
Previously, download and upload requests to the Cloud Storage for Firebase API were not being counted properly. We have taken steps to fix this issue, starting from September 15, 2023.
For Blaze users, upload and download operations will start counting towards your monthly bill. For Spark users, they will start counting towards your monthly free limit.
We recommend monitoring your Usage page for any increases that may count towards your limits.
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 .
Cloud Storage for Firebase pricing
Cloud Storage for Firebase : What are the changes to the pricing plan requirements for Cloud Storage announced in September 2024?
How do I predict how much I will be billed for upload and download operations?
Visit the Firebase Pricing page and use the Blaze plan calculator . The calculator lists all the usage types for Cloud Storage for Firebase .
Use the sliders to input the expected usage of your Storage bucket. The calculator will estimate your monthly bill.
What happens if I exceed Spark plan upload, download or storage limits for Cloud Storage for Firebase ?
When you exceed limits for Cloud Storage in a project on the Spark plan, the result depends on the type of limit that you exceed:
If you exceed the GB stored limit, you will not be able to store any more data in that project unless you remove some of the data stored or upgrade to a plan that provides more storage space, or unlimited storage space.
If you exceed the GB downloaded limit, your app will not be able to download more data until the next day (starting at midnight, US Pacific Time), unless you upgrade to a plan with less restrictive limits, or with no limits.
If you exceed the upload or download operations limit, your app will not be able to upload or download more data until the next day (starting at midnight, US Pacific Time), unless you upgrade to a plan with less restrictive limits, or with no limits.
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 : On Spark plan projects, can I store executable files?
For no-cost (Spark) plan projects, Firebase blocks uploads and hosting of certain executable file types for Windows, Android and Apple by Cloud Storage for Firebase and Firebase Hosting . This policy exists to prevent abuse on our platform.
Serving, hosting and file uploads of disallowed files are blocked for all Spark projects created on or after Sept 28th, 2023. For existing Spark projects with files uploaded before that date, such files can still be uploaded and hosted.
This restriction applies to Spark plan projects. Projects on the pay as you go (Blaze) plan are not affected.
The following file types cannot be hosted on Firebase Hosting and Cloud Storage for Firebase :
Windows files with .exe , .dll and .bat extensions
Android files with .apk extension
Apple platform files with .ipa extension
Что мне нужно сделать?
If you still want to host these file types after September 28th, 2023:
For Hosting: upgrade to the Blaze plan before you can deploy these file types to Firebase Hosting via the firebase deploy command.
For Storage: upgrade to the Blaze plan to upload these file types to the bucket of your choice using the GCS CLI, the Firebase console, or Google Cloud console.
Use Firebase tools to manage your Firebase Hosting and Cloud Storage resources.
For managing resources in Firebase Hosting , use the Firebase console to delete releases according to this guide .
For managing resources in Cloud Storage , navigate to the Storage product page in your project.
On the Files tab, locate disallowed files to delete in your folder hierarchy, then select them using the checkbox next to the filename(s) on the left-hand side of the panel.
Click Delete , and confirm the files were deleted.
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 : What is a "simultaneous database connection"?
A simultaneous connection is equivalent to one mobile device, browser tab, or server app connected to the database. Firebase imposes hard limits on the number of simultaneous connections to your app's database. These limits are in place to protect both Firebase and our users from abuse.
The Spark plan limit is 100 and cannot be raised. The Flame and Blaze plans have a limit of 200,000 simultaneous connections per database.
This limit isn't the same as the total number of users of your app, because your users don't all connect at once. If you need more than 200,000 simultaneous connections, please read Scale with Multiple Databases .
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 DatabaseUsage 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.
Realtime Database : What happens if I exceed Spark plan storage or download limits for Realtime Database ?
To provide you with a predictable price, the resources available to you in the Spark plans are capped. This means that when you exceed any plan limit in any month, your app will be turned off to prevent any further resource usage and additional charges.
Realtime Database : What happens if I exceed Spark plan simultaneous connection limits for Realtime Database ?
When your app reaches its concurrency limit on the Spark plan, any subsequent connections will be rejected until some of the existing connections are closed. The app will continue to work for users who are connected.
Realtime Database : What are automated backups? Do you offer hourly backups for Realtime Database ?
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.
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.
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.