firestore CREDENTIALS Error when deploying firebase cloud function written in python
評価
この issue はまだ評価されていません。
説明
[REQUIRED] Environment info
firebase-tools:12.4.7
Platform: windows with python version of 3.11
[REQUIRED] Test case
i have code like below in for firebase cloud function in main.py.
when i test function using firebase emulators:start --only functions it worked perfectly
now when i try to deploy it using firebase deploy --only functions it gave me below error while pointing to db = firestore.client()
line in code
error
"""""""""
raise exceptions.DefaultCredentialsError(_CLOUD_SDK_MISSING_CREDENTIALS)
google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
"""""""""
code
"""
from firebase_functions import https_fn, options
import firebase_admin
from firebase_admin import firestore
app = firebase_admin.initialize_app()
options.set_global_options(timeout_sec=1000)
db = firestore.client()
firebase function that write something to firestore database is written below
"""
[REQUIRED] Steps to reproduce
use above code in main.py inside functions folder and try to deploy functions you will get same error
[REQUIRED] Expected behavior
credential should be automatically added since i am logged into my account using firebase login and using correct Project ID. it did not ask for credential when i was tasing using firebase emulators:start --only functions and it was working perfectly.
[REQUIRED] Actual behavior
it's asking for credential
- 主要言語
- Python
- スター
- 167
- フォーク
- 36
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-functions-python のほかの issue
-
identity_fn.AuthBlockingEvent is still missing auth_type and resource対応中かも @IzaakGough が 1 日前に担当しました。 オープンbug reproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
firebase/firebase-functions-python#316 · コメント 1 件 ·
-
HttpsError.__init__ does not pass message to super().__init__()対応中かも @Aayush99910 が 6 日前に担当しました。 オープンbug reproduced
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
firebase/firebase-functions-python#314 · コメント 3 件 ·
-
Add support for VPC direct connect対応中かも @IzaakGough が 111 日前に担当しました。 オープンfeature-request
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/firebase-functions-python#275 · コメント 1 件 · リアクション 1 件 ·
-
feature-request
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
firebase/firebase-functions-python#271 · コメント 3 件 ·
-
[Bug] stability_digest_payload_from_ce_payload fails with AttributeError: 'dict' object has no attribute 'split'対応中かも @hardikkaurani が 18 日前に担当しました。 オープンbug unable to reproduce
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
firebase/firebase-functions-python#260 · コメント 6 件 ·
firebase/firebase-functions-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws-samples/sample-per-model-bedrock#191 ·
メンテナーはふだん 1 日以内に返信
-
Docs viewer: inverted grey colormap, Phantom CT window -20 to 35 HU, smoothing up to 40 mm対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
PyTomography/PyTomography#331 ·
メンテナーはふだん 1 日以内に返信
-
effort: low prio: low ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
digitalfabrik/integreat-cms#4616 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FuRongJun-1999/dsh-memory#226 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug difficulty:2 good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
MakazhanAlpamys/Soup#1865 ·
メンテナーはふだん 1 日以内に返信