Open sorter opened 7 years ago
I'm running into same issue. All circumstances seem to be consistent with the above post. Happens on 1.5.0 and not 1.4.1.
@matthewh @kit-cat I see a lot of apns related issues related to 1.5.0. Has there been some upgrade to apns2 that has broken functionality in this package?
This is just because the APNsClient call in apns2 doesn't support unicode strings for whatever reason. Calling .encode('utf-8') on the string passed into the APNsClient call fixes the issue.
Confirmed, fixed by forcefully providing a bytestring for the certificate path b'/path/to/file.pem'
I am getting this error in 1.6 version. Is it not fixed yet?
@mhsiddiqui No changes have to made to the codebase for this issue. Did you try the workarounds suggested by @Kiirojin or @carn1x?
I converted my apns token path to string in my settings.py file (which was unicode before this) and the error then I got is "APNSServerError: BadDeviceToken". I think this is expected behaviour. I was not getting this error when token has expired in 1.4.1 version. I think I had to put a try catch statement now.
Hello,
I've been using django-push-notifications without issue for some time now without configuration change. Upgrading to 1.5.0 appears to introduce a breaking change with the apns2 library.
Inserting some debug print statements reveals that
self.__credentials
is the absolute path to my APNS certificate.I will also note that
django-push-notifications==1.4.1
doesn't have this issue, the issue is with1.5.0
Has anyone else run into this?