thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.05k stars 525 forks source link

Pyrebase errors out after running and streaming for a couple of hours #400

Open navneetg707 opened 2 years ago

navneetg707 commented 2 years ago

for msg in self.sse: File "/home/ubuntu/tradebot/env/lib/python3.8/site-packages/sseclient/sseclient.py", line 85, in next self._connect() File "/home/ubuntu/tradebot/env/lib/python3.8/site-packages/pyrebase/pyrebase.py", line 523, in _connect super(ClosableSSEClient, self)._connect() File "/home/ubuntu/tradebot/env/lib/python3.8/site-packages/sseclient/sseclient.py", line 54, in _connect self.resp.raise_for_status() File "/home/ubuntu/tradebot/env/lib/python3.8/site-packages/requests/models.py", line 862, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://xxxx.firebase.url>

Leslaw77 commented 2 years ago

Same issue. For me, the new, refreshed token, is not being passed to the stream.

heston commented 2 years ago

I have a fork that uses more recent libraries from Google for auth. I believe it fixes this issue: https://github.com/heston/Pyrebase/tree/heston-dev