FirebaseExtended / angularfire

AngularJS bindings for Firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSL error while trying to post to database

vitormfreis opened this issue · comments

I am trying to make a post request to the firebase but I am facing an error that has not occurred before with the same code. My internet connection is through a 2G-Modem on my embbedded linux (Ubuntu 16.04) device (Orange Pi 2g IoT) and I had no problem so far by running a Python 2.7 script on it and posting the URL. But now suddenly I started experiencing the following error as I execute my code:

root@OrangePi:~# [ 5218.307887] rc.local[395]: Traceback (most recent call last):
[ 5218.308805] rc.local[395]:   File "/root/TEST/Timekeeper.py", line 38, in <module>
[ 5218.309607] rc.local[395]:     send_event = firebase.post('/device', new_event)
[ 5218.310542] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/firebase/decorators.
[ 5218.311748] rc.local[395]:     return f(*args, **kwargs)
[ 5218.312254] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/firebase/firebase.py
[ 5218.314531] rc.local[395]:     connection=connection)
[ 5218.315074] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/firebase/decorators.
[ 5218.315506] rc.local[395]:     return f(*args, **kwargs)
[ 5218.315895] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/firebase/firebase.py
[ 5218.317208] rc.local[395]:     timeout=timeout)
[ 5218.317692] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.
[ 5218.320210] rc.local[395]:     return self.request('POST', url, data=data, json=json, **kwargs
[ 5218.320780] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.
[ 5218.321206] rc.local[395]:     resp = self.send(prep, **send_kwargs)
[ 5218.322444] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.
[ 5218.324416] rc.local[395]:     r = adapter.send(request, **kwargs)
[ 5218.325043] rc.local[395]:   File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.
[ 5218.325572] rc.local[395]:     raise SSLError(e, request=request)
[ 5218.325990] rc.local[395]: requests.exceptions.SSLError: HTTPSConnectionPool(host='hermes-4dc8ror(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),)

The part of the code that generates this error is the following:

from firebase import firebase

firebase_url = 'https://hermes-4dc8c.firebaseio.com/'
firebase = firebase.FirebaseApplication(firebase_url, None)

new_event = {

     "eventType": "Sirene"


  }

send_event = firebase.post('/device', new_event)

This embbedded device called Orange Pi 2g IoT has its own modem 2G to connect to internet but I am not sure what kind of certification this thing has at all since it is $10, is it possible that Firebase blocked my device due to unknown or strange connection origin?. Have anyone had this issue before here or can help me out with this?

We use: Python 2.7.12, OpenSSL 1.0.2g 1 Mar 2016, pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

Thanks, guys!!

Hi @vitormfreis! This is the AngularFire library which doesn't relate to the streaming API. Can you try posting this on Stackoverflow if you are still having trouble? Thanks!