Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with hyper library #5

Open
iainwatt opened this issue Mar 14, 2017 · 4 comments
Open

issue with hyper library #5

iainwatt opened this issue Mar 14, 2017 · 4 comments

Comments

@iainwatt
Copy link

I have been using your lib without error for a few months until it recently stopped working. We are using Apex (for Lambda) and simply redeployed the function that included 'gobiko.apns' in our requirements.txt

The error is;

GoAway frame could not be sent: 'NoneType' object has no attribute 'sendall'

and the traceback is;

local variable 'res' referenced before assignment: UnboundLocalError
Traceback (most recent call last):
File "/var/task/main.py", line 79, in handle
send_ios_push(params, developer_id, ios_devices, bundle_id)
File "/var/task/main.py", line 149, in send_ios_push
extra=formatted_params['extra']
File "/var/task/gobiko/apns/client.py", line 78, in send_bulk_message
return res
UnboundLocalError: local variable 'res' referenced before assignment

I think it may be failing to establish an SSL connection but not sure how to fix it.

AWS Lambda runs on python 2.7.12.

@Proper-Job
Copy link

@iainwatt
I haven't looked into your issue specifically. But since you're mentioning an SSL problem with regards to push notifications. Are you by any chance deploying using gevent? Because gevent monkey patches the SSLSocket implementation. I've had problems with gevent and APNS in the past.

@iainwatt
Copy link
Author

Thanks for looking into it, I am deploying using Apex. When you deploy Apex pulls in the all the libs from requirements.txt so on each deployment it seemed to be continually replacing some of the libs required in you package. I will try again and only load your package to Lambda once.

@mark-anders
Copy link

I'm seeing this too. I'm attempting to send_message from a Flask app in development mode, so using the Flask cli, which I think doesn't use gevent.

@mvanbaak
Copy link

hyper is no longer maintained. They (hyper team) suggest switching to httpx.
I did so. See #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants