Hi,
Backendless Version (3.x / 5.x, Online / Managed / Pro )
4.3.7 Pro
Client SDK (REST / Android / Objective-C / Swift / JS )
Swift
Application ID
We have 3 applications: dev, staging, live.
Live one works as expected.
Dev and staging had issues.
We are using hosted Backendless platform on version 4.3.7 and from time to time experiencing issues with push notifications on iOS app.
They stopped working, but only on some applications before the iOS certificates expire.
During troubleshooting we do perform the following actions:
- Re-upload the same certificate
- Re-start Taskman service.
- Create new certificate, and upload instead of previous.
And sometime ago 1st and 2nd step did fix the issues, without generating new certificate.
Currently it can’t fix the case on our dev and staging applications.
While live one still works without any issues.
The code between the environments is the same, no logic changes.
Push notifications are tested using BL UI messaging service or the API call like this:
curl --location --request POST ‘https://bl_domain/api/app_id/app_key/messaging/default’
–header ‘Content-Type: application/json’
–data-raw '{
“headers”: {
“ios-alert”: “test”,
“ios-sound”: “default”
},
“message”: “test”,
“pushSinglecast”: [
“device_id
]
}
’
Uploaded certificate example is attached. Same fields were used before re-upload and after (tested as Sandbox type as well). Also we can ensure that push notifications were working 2 months ago in the same flow.
The same certificate is in use and working in another chat messaging tools, installed and configured separately from Backendless.
Taskman logs contain the following message in similar time period when tests are done, but not in the exact moment:
[ERROR] - 2022-04-13 12:51:52,772 - from com.notnoop.apns.internal.ApnsConnectionImpl in Thread-44885 - Couldn’t connect to APNS server
java.net.ConnectException: Connection refused (Connection refused)
#011at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
#011at java.net.PlainSocketImpl.socketConnect(Native Method)
#011at com.notnoop.apns.internal.ApnsConnectionImpl.getOrCreateSocket(ApnsConnectionImpl.java:268)
#011at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
#011at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
#011at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
#011at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
#011at java.net.Socket.connect(Socket.java:589)
#011at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
#011at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:427)
#011at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:327)
#011at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:312)
#011at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
#011at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:89)
#011at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
#011at com.backendless.services.notifications.ios.IOSNotificationGateway.send(IOSNotificationGateway.java:98)
#011at com.backendless.services.notifications.AbstractPushNotificator.pushMessage(AbstractPushNotificator.java:45)
#011at com.backendless.services.notifications.SendMessagesTask.doSendMessage(SendMessagesTask.java:334)
#011at com.backendless.services.notifications.SendMessagesTask.sendMessage(SendMessagesTask.java:237)
#011at com.backendless.services.notifications.SendMessagesTask.sendNotifications(SendMessagesTask.java:153)
#011at com.backendless.services.notifications.SendMessagesTask.execute(SendMessagesTask.java:118)
#011at com.backendless.taskman.Task.run(Task.java:128)
#011at java.lang.Thread.run(Thread.java:745)
Please, let us know of there is any other steps or actions that we can do to resolve the issue.