Firebase with Python 3.9 giving an SSL error
[READ] Step 1: Are you in the right place?
Step 2: Describe your environment
- Operating System version: MAC OSX 11.6 BIg Sur
- Firebase SDK version: 5.0.2
- Firebase Product: firestore/ admin SDK (auth, database, storage, etc)
- Python version: 3.9
- Pip version: 22.0.3
[REQUIRED] Step 3: Describe the problem
I am trying to use admin SDK to connect to firebase - using the service account JSON file. It gives SSL issue. precisely: google.api_core.exceptions.RetryError: Deadline of 300.0s exceeded while calling functools.partial(<function _wrap_stream_errors.
Steps to reproduce:
I can tell how I am getting it. It was working fine when I last checked - a month back. I just tried to access one collection in Firestore and got this error.
Relevant Code:
docs = db.collection("users").where("username", "==", "access").stream()
cred = credentials.Certificate("./firebase.json")
firebase_admin.initialize_app(cred)
db = firestore.client()
docs = db.collection("users").where("username", "==", "access").stream()
Stack Trace if needed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/google/api_core/retry.py", line 184, in retry_target
return target()
File "/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 168, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/a/Desktop/test/noomi_backend/weeklyNotif.py", line 52, in
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Could be an openssl issue in your environment. Check your openssl version by running openssl version.
If you can reproduce it please file an issue in google-cloud/firestore repo.
Hi @lahirumaramba On running openssl version, I get this output LibreSSL 2.8.3
How do I fix this and get to the working SSL version? Please let me know what I can do from my end. I also ran python3 -c "import ssl; print(ssl.OPENSSL_VERSION)" and got the output as OpenSSL 1.1.1m 14 Dec 2021. What do i need to do to get firebase working again?