django-push-notifications
django-push-notifications copied to clipboard
hyper.http20.exceptions.StreamResetError: Stream forcefully closed
APNs max_concurrent_streams too high (4294967297), resorting to default maximum (1000)
Traceback (most recent call last):
File "
+1 The internal implementation for APNS was working as well, but when I've upgraded the package this error raises every time!
+1
Using v1.5.0
I've opened an issue in the source package page and now the problem is fixed!
Facing the same error, what was the solution?
Faced the same error. As @Kianoosh76 reported, it is a problem with use_sandbox. The APNSClient in send_batch_message is not being initialized with the proper arg for use_sandbox.
The solution was to set USE_SANDBOX at every bundle dict in django settings like so. I only needed it in my dev app, so I used a simple check to set it:
for bundle_id in ('com....dev', 'com...dev-alt',
'com...staging', 'com...beta'):
PUSH_NOTIFICATIONS_SETTINGS['APPLICATIONS'][bundle_id] = {
'PLATFORM': 'APNS',
'CERTIFICATE': get_cert_path(bundle_id),
'TOPIC': bundle_id,
'USE_SANDBOX': bundle_id == 'com...dev',
}
Got the same problem "Stream forcefully closed" here, using production cert and the following settings:
PUSH_NOTIFICATIONS_SETTINGS = { "APNS_TOPIC": Bundle id, "UPDATE_ON_DUPLICATE_REG_ID": True, "APNS_USE_SANDBOX": False }
And I'm passing the production cert file when calling send_message.
Fixed, turns out something is wrong with the generated production cert's subject
I use development cert and my app also in the development. I need to set settings.py
DEBUG=True to solve this problem
Got same issue: cert was generated for sandbox, solution: set APNS_USE_SANDBOX=True, but it may work on opposite way, if you are using production cert with APNS_USE_SANDBOX=True