Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Call to Firestore getting timed out from the docker container.

Open
#776 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, python

Research direction

Start with src/async_client_messaging_app/settings/firebase_manager.py at initialize_firebase and the doc_ref.set call shown in the traceback. Compare the Firestore and OAuth requests from the local environment with those from the Docker container, including the container networking setup. Done means identifying a reproducible cause for the DeadlineExceeded error and documenting a verified fix.

Written by the indexing model from the issue text.

Description

api: firestore

I'm facing an issue while creating a single record in the Google Firestore document from the docker, whereas the same code works fine in my local.

Below is the error I am getting:

2024-03-06 08:44:30,390 [google.auth.transport.requests|365|140737231338496|Thread-1] | requests.py:__call__:185 (DEBUG) - Making request: POST https://oauth2.googleapis.com/token
2024-03-06 14:15:29 Traceback (most recent call last):
2024-03-06 14:15:29   File "/usr/local/bin/gunicorn", line 8, in <module>
2024-03-06 14:15:29     sys.exit(run())
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
2024-03-06 14:15:29     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 236, in run
2024-03-06 14:15:29     super().run()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run
2024-03-06 14:15:29     Arbiter(self).run()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 58, in __init__
2024-03-06 14:15:29     self.setup(app)
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 118, in setup
2024-03-06 14:15:29     self.app.wsgi()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2024-03-06 14:15:29     self.callable = self.load()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2024-03-06 14:15:29     return self.load_wsgiapp()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2024-03-06 14:15:29     return util.import_app(self.app_uri)
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 371, in import_app
2024-03-06 14:15:29     mod = importlib.import_module(module)
2024-03-06 14:15:29   File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
2024-03-06 14:15:29     return _bootstrap._gcd_import(name[level:], package, level)
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2024-03-06 14:15:29   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
2024-03-06 14:15:29   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/__init__.py", line 4, in <module>
2024-03-06 14:15:29     from . import api  # noqa: E402
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/__init__.py", line 1, in <module>
2024-03-06 14:15:29     from . import resources
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/resources/__init__.py", line 1, in <module>
2024-03-06 14:15:29     from . import acm_client, acm_server, topic_management
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/resources/acm_client.py", line 6, in <module>
2024-03-06 14:15:29     from async_client_messaging_app.db import firestore
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/db/firestore.py", line 5, in <module>
2024-03-06 14:15:29     from async_client_messaging_app import app
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/app.py", line 21, in <module>
2024-03-06 14:15:29     firebase_app.initialize_firebase()
2024-03-06 14:15:29   File "/a360/async_client_messaging_api/src/async_client_messaging_app/settings/firebase_manager.py", line 54, in initialize_firebase
2024-03-06 14:15:29     doc_ref.set({"first": "Ada", "last": "Lovelace", "born": 1815})
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/document.py", line 167, in set
2024-03-06 14:15:29     write_results = batch.commit(**kwargs)
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/batch.py", line 59, in commit
2024-03-06 14:15:29     commit_response = self._client._firestore_api.commit(
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/services/firestore/client.py", line 1371, in commit
2024-03-06 14:15:29     response = rpc(
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
2024-03-06 14:15:29     return wrapped_func(*args, **kwargs)
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 293, in retry_wrapped_func
2024-03-06 14:15:29     return retry_target(
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 153, in retry_target
2024-03-06 14:15:29     _retry_error_helper(
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_base.py", line 212, in _retry_error_helper
2024-03-06 14:15:29     raise final_exc from source_exc
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 144, in retry_target
2024-03-06 14:15:29     result = target()
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
2024-03-06 14:15:29     return func(*args, **kwargs)
2024-03-06 14:15:29   File "/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
2024-03-06 14:15:29     raise exceptions.from_grpc_error(exc) from exc
2024-03-06 14:15:29 google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded

Any leads for fixing this would be appreciated?

Dominant language
Python
Stars
1.2k
Forks
359
Avg merge
3d 9h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-python

All issues in firebase/firebase-admin-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.