Openfire push notifications on iOS with ChatSecure (XEP-0357) not working

Hello dear friends,

I recently switched from Android, where I was using Conversations, to iOS, where I’m using ChatSecure now.
Unfortunately, the push notifications are not working. As soon as iOS kills ChatSecure in the background, I need to launch the app manually to see new messages.

I installed the Push Notification plugin for XEP-0357 support.

If ChatSecure is running in the foreground, and I check the Server Sessions, I see that there is a session with pubsub(.)chatsecure(.)org. At least the session stays active for some period (maybe 20 mins) and is gone afterwards. To my understanding, this session must always stay active, for me to receive the notifications, or am I wrong.

I also used the S2S Connection Test with pubsub(.)chatsecure(.)org to check is the connection negotiation is doing fine. Here is the output:

Logs:

Sending server to server ping request to pubsub(.)chatsecure(.)org

An exception occurred while creating an encrypted session. Closing connection.
javax.net.ssl.SSLException: Tag mismatch!
	at sun.security.ssl.Alert.createSSLException(Alert.java:133) ~[?:?]
	at sun.security.ssl.TransportContext.fatal(TransportContext.java:360) ~[?:?]
	at sun.security.ssl.TransportContext.fatal(TransportContext.java:303) ~[?:?]
	at sun.security.ssl.TransportContext.fatal(TransportContext.java:298) ~[?:?]
	at sun.security.ssl.SSLTransport.decode(SSLTransport.java:123) ~[?:?]
	at sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:681) ~[?:?]
	at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:636) ~[?:?]
	at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:454) ~[?:?]
	at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:433) ~[?:?]
	at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:637) ~[?:?]
	at org.jivesoftware.openfire.net.TLSWrapper.unwrap(TLSWrapper.java:154) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.net.TLSStreamReader.decrypt(TLSStreamReader.java:117) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.net.TLSStreamReader.doRead(TLSStreamReader.java:80) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.net.TLSStreamReader.access$000(TLSStreamReader.java:32) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.net.TLSStreamReader$1.read(TLSStreamReader.java:167) ~[xmppserver-4.7.5.jar:4.7.5]
	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[?:?]
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[?:?]
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[?:?]
	at java.io.InputStreamReader.read(InputStreamReader.java:181) ~[?:?]
	at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2992) ~[xpp3-1.1.4c.jar:?]
	at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) ~[xpp3-1.1.4c.jar:?]
	at org.jivesoftware.openfire.net.MXParser.more(MXParser.java:372) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410) ~[xpp3-1.1.4c.jar:?]
	at org.jivesoftware.openfire.net.MXParser.nextImpl(MXParser.java:337) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) ~[xpp3-1.1.4c.jar:?]
	at org.jivesoftware.openfire.session.LocalOutgoingServerSession.secureAndAuthenticate(LocalOutgoingServerSession.java:489) ~[xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.session.LocalOutgoingServerSession.createOutgoingSession(LocalOutgoingServerSession.java:356) [xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.session.LocalOutgoingServerSession.authenticateDomain(LocalOutgoingServerSession.java:212) [xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.establishConnection(OutgoingSessionPromise.java:298) [xmppserver-4.7.5.jar:4.7.5]
	at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(OutgoingSessionPromise.java:254) [xmppserver-4.7.5.jar:4.7.5]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: javax.crypto.AEADBadTagException: Tag mismatch!
	at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:623) ~[?:?]
	at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116) ~[?:?]
	at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053) ~[?:?]
	at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:941) ~[?:?]
	at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:491) ~[?:?]
	at javax.crypto.CipherSpi.bufferCrypt(CipherSpi.java:779) ~[?:?]
	at javax.crypto.CipherSpi.engineDoFinal(CipherSpi.java:730) ~[?:?]
	at javax.crypto.Cipher.doFinal(Cipher.java:2497) ~[?:?]
	at sun.security.ssl.SSLCipher$T12GcmReadCipherGenerator$GcmReadCipher.decrypt(SSLCipher.java:1655) ~[?:?]
	at sun.security.ssl.SSLEngineInputRecord.decodeInputRecord(SSLEngineInputRecord.java:240) ~[?:?]
	at sun.security.ssl.SSLEngineInputRecord.decode(SSLEngineInputRecord.java:197) ~[?:?]
	at sun.security.ssl.SSLEngineInputRecord.decode(SSLEngineInputRecord.java:160) ~[?:?]
	at sun.security.ssl.SSLTransport.decode(SSLTransport.java:111) ~[?:?]
	... 28 more
Ignoring unexpected answer while waiting for dialback validation: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls></stream:features>
Inbound Server pubsub.chatsecure.org authenticated (via TLS)
Unable to process data send through inbound connection from /43.239.xxx.xxx to file transfer proxy: Illegal proxy transfer
Unable to process data send through inbound connection from /43.239.xxx.xxx to file transfer proxy: Illegal proxy transfer
Session is connected.
Successfully negotiated TLS connection.

As it states that the TLS connection is successfully negotiated, I believe that everything is working fine here, right?

But still, no push notifications after a couple of minutes after I turn off my iPhone screen.

Openfire version 4.7.5, iOS version 15.7.7, ChatSecure version 5.0.4 (171).

Any ideas why the push notifications are not working? What can I do to further troubleshoot?

Thanks in advance!