djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 377 forks source link

SSL Exception while using the demo script #194

Open sagism opened 7 years ago

sagism commented 7 years ago

I am testing push notifications to my app using the demo script. I get the following error: File "demopush2.py", line 25, in <module> apns.gateway_server.send_notification(token_hex, payload) File "/Users/sagi/Dropbox/Projects/coral/coral/manager/push/apns_new.py", line 544, in send_notification self.write(self._get_notification(token_hex, payload)) File "/Users/sagi/Dropbox/Projects/coral/coral/manager/push/apns_new.py", line 267, in write return self._connection().write(string) File "/Users/sagi/Dropbox/Projects/coral/coral/manager/push/apns_new.py", line 248, in _connection self._connect() File "/Users/sagi/Dropbox/Projects/coral/coral/manager/push/apns_new.py", line 224, in _connect self._ssl = wrap_socket(self._socket, self.key_file, self.cert_file) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 911, in wrap_socket ciphers=ciphers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__ self.do_handshake() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:590) I am using python 2.7.10. Getting the very same error on ubuntu 14.04 and on macOS 10.12.4.

Kunple-w commented 6 years ago

I have same issue .

p-doyle commented 5 years ago

I am having the same issue. Tried running from Windows, Raspberry Pi and macOS and all have the same error.