jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.28k stars 618 forks source link

APNS Notifications not being sent via send_message #724

Open StevenWorrall opened 6 months ago

StevenWorrall commented 6 months ago

Notifications send just fine through the Django console test functionality but when trying to send via the send_message function, notifications never come through.

Using this code to send and the same APNS device id for both tests:

devices = APNSDevice.objects.filter(user=user) for device in devices: try: device.send_message(message) except APNSServerError as e: logger.info(f"Error in sending message: {e}")

Receiving these logs when trying to send:

Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.HEADER_TABLE_SIZE, original_value=4096, new_value=4096), ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=None, new_value=1000), ChangedSetting(setting=SettingCodes._max_frame_size, original_value=16384, new_value=16384), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=None, new_value=8000)}>

Received unhandled event <SettingsAcknowledged changed_settings:{ChangedSetting(setting=SettingCodes.ENABLE_PUSH, 

Received unhandled event <SettingsAcknowledged changed_settings:{}>

Received unhandled event <RemoteSettingsChanged changed_settings:{ChangedSetting(setting=SettingCodes.HEADER_TABLE_SIZE, original_value=4096, new_value=4096), ChangedSetting(setting=SettingCodes.MAX_CONCURRENT_STREAMS, original_value=1000, new_value=1000), ChangedSetting(setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65535, new_value=65535), ChangedSetting(setting=SettingCodes._max_frame_size, original_value=16384, new_value=16384), ChangedSetting(setting=SettingCodes._max_header_list_size, original_value=8000, new_value=8000)}>