siskin-im icon indicating copy to clipboard operation
siskin-im copied to clipboard

Push in background not working

Open jelbana opened this issue 4 years ago • 29 comments

Describe the bug

I don't receive push notifications when the app is not open. My xmpp account is registered at movim.eu, which according to https://compliance.conversations.im/server/movim.eu/ supports XEP-0357.

To Reproduce

Push notifications are enabled in the settings. Notifications only come through when I open the app.

Details (please complete the following information):

  • Siskin Version: 7.0 (6) (testflight version)
  • iOS version: 15.0.1
  • iPhone model: 6s

jelbana avatar Oct 10 '21 17:10 jelbana

Both 1:1 & Groups?

Enabled Push in settings?

licaon-kter avatar Oct 10 '21 17:10 licaon-kter

Please verify that you do not have "focus mode" enabled. With it enabled, iOS will filter out notifications.

hantu85 avatar Oct 10 '21 17:10 hantu85

Both 1:1 & Groups?

Enabled Push in settings?

So far only tested 1:1.

Yes Push enabled in settings.

Please verify that you do not have "focus mode" enabled. With it enabled, iOS will filter out notifications.

It is not enabled.

I am able to receive notifications in Conversations on Android. I have also additionally tested disconnecting from Conversations and no change is observed.

jelbana avatar Oct 10 '21 18:10 jelbana

Both 1:1 & Groups?

I can confirm groups also do not work for push notifications. I can only get a notification when the app is open.

jelbana avatar Oct 11 '21 03:10 jelbana

@jelbana group messages push need a supported server, Tigase or Prosody (with newest special modules). But Movim runs ejabberd.

Eg. Make some test accounts on xmpp.cloud or tigase.im or jabberd.today or sure.im and test between them (all these run Tigase)

licaon-kter avatar Oct 11 '21 04:10 licaon-kter

@jelbana group messages push need a supported server, Tigase or Prosody (with newest special modules). But Movim runs ejabberd.

Eg. Make some test accounts on xmpp.cloud or tigase.im or jabberd.today or sure.im and test between them (all these run Tigase)

Happy to test group notifications afterwards. It seems 1:1 is also not receiving push notifications.

jelbana avatar Oct 11 '21 04:10 jelbana

@jelbana Could you check if you do not have any hanging notifications from Siskin on your iOS device? I've seen issues caused by filtering notifications by iOS if old notifications were still in the notifications center.

On the server side, I do see notifications from movim.eu being properly processed and forwarded to APNs for delivery.

hantu85 avatar Oct 11 '21 09:10 hantu85

@jelbana Could you check if you do not have any hanging notifications from Siskin on your iOS device? I've seen issues caused by filtering notifications by iOS if old notifications were still in the notifications center.

On the server side, I do see notifications from movim.eu being properly processed and forwarded to APNs for delivery.

No hanging notifications from Siskin are present. Anything else I can do to test push notifications?

jelbana avatar Oct 11 '21 15:10 jelbana

Push in 1:1 seems to be working all of a sudden. I'm not sure I changed any of the settings other than retoggling the push notifications toggle. I will monitor it for a couple days before closing the thread.

jelbana avatar Oct 11 '21 19:10 jelbana

@licaon-kter @hantu85

Currently 1:1 push notifications are working, but calling does not work. If I open Siskin while an audio call is made, only then do I do get a notification and the option to accept/reject. Is this related to the way push is implemented differently on Movim as opposed to tigase? Or should I expect it to work as well?

jelbana avatar Oct 13 '21 02:10 jelbana

Yes, this should work (iirc) for calls too on Tigase servers, see the list to test with, above.

licaon-kter avatar Oct 13 '21 05:10 licaon-kter

I have the same problem here for college of mine. He won't get notifications when Siskin is in the background.

Describe the bug In most cases, no message notification if a message arrives and Siskin is not opened on the screen (1:1 and group chat)

To Reproduce Background app refresh and Push are enabled. Focus mode is disabled (iOS 15.02 only).

Details Device: iPhone SE 1st generation Operating system: iOS 14.8 & iOS 15.0.2 Software: Siskin 6.4 (AppStore) Server: Mailbox.org (supports XEP-0357: Push Notifications)

niklasliebig avatar Oct 26 '21 13:10 niklasliebig

@niklasliebig Do you know which server (software) is being used at mailbox.org? It sends notifications but does not include <x/> element with a summary of notification (even an empty one). Due to that those notifications are sent as regular notifications to iOS devices instead of "prioritized" notifications and may more often be dismissed by the iOS.

Most (if not all) XMPP servers are now sending important push notifications (related to message) either with <x xmlns-"jabber:x:data"/> element being included or add <priority xmlns="tigase:push:priority:0">high</priority>.

Without those markings from the XMPP server for notifications related to actual messages, we cannot mark them as high-priority notifications which may lead to those notifications being dropped.

hantu85 avatar Oct 26 '21 17:10 hantu85

https://compliance.conversations.im says which software, ejabberd (unfortunately stuck in time in Dec 2018 as when iNPUTmicose visited them :()

licaon-kter avatar Oct 26 '21 17:10 licaon-kter

Then it may need to be updated for push notifications to work correctly with SiskinIM.

hantu85 avatar Oct 26 '21 17:10 hantu85

Thanks in advance for your advice. I'll try to get in touch with mailbox.org and come back here later. @licaon-kter The compliance tests says: "Server is running ejabberd 18.12.1-2". This (18.12.) is not to be confused with the date the compliance checks were last performed, which appears to be 10/22/2021.

niklasliebig avatar Oct 27 '21 07:10 niklasliebig

@niklasliebig my comment was about the software version, then again testing in Dec 2018 or Dec 2021 will yield the same results

licaon-kter avatar Oct 27 '21 07:10 licaon-kter

In the meantime we have tested two more servers: tigase.im and honigdachse.de. Both test accounts also do not give a notification for incoming messages when siskin is in the background. On the sender side we use jabber.de. Can we do further testing or provide useful information to help solving the issue? I would be glad to do so.

niklasliebig avatar Oct 27 '21 11:10 niklasliebig

@niklasliebig -- does the siskin user have account on tigase.im or on honigdasche.de server? In general if the account is on tigase.im (or sure.im, jabber.today or any other modern xmpp server) it should work just fine.

woj-tek avatar Oct 27 '21 11:10 woj-tek

@woj-tek Yep, we actually created test accounts on both servers: [email protected] and [email protected]. Unfortunately there are no push notifications for Siskin 6.4 (AppStore) running on the iPhone SE 1st generation when the app is in the background and the screen is off.

niklasliebig avatar Oct 27 '21 11:10 niklasliebig

How do you put the application in the background? Using home button? Do you kill the application when it's in the background? Could you try disabling and re-enabling push on that account?

woj-tek avatar Oct 27 '21 11:10 woj-tek

Also - could you try the latest testflight version?

woj-tek avatar Oct 27 '21 11:10 woj-tek

Having the same issue. Using iOS 15.0.2. No focus activated. Only when I launch the app I get notifications, not in in background.

milkywade avatar Oct 28 '21 10:10 milkywade

@milkywade Could you at least state which version of Siskin IM are you using? AppStore or TestFlight? and which device are you using?

hantu85 avatar Oct 28 '21 11:10 hantu85

Appstore iPhone 11

-- Sent from a mobile device

On Thursday, Oct 28, 2021 at 1:00 PM, Andrzej Wójcik @.*** @.***)> wrote:

@milkywade (https://github.com/milkywade) Could you at least state which version of Siskin IM are you using? AppStore or TestFlight? and which device are you using?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/tigase/siskin-im/issues/145#issuecomment-953737217), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AKNJKNDUEZRDASJE6H26OTDUJE3PHANCNFSM5FWVPI5A). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub).

milkywade avatar Oct 28 '21 11:10 milkywade

@woj-tek:

How do you put the application in the background? Using home button?

Yes, he uses the home button.

Do you kill the application when it's in the background?

We don't kill the application. At least we are not aware of it.

Could you try disabling and re-enabling push on that account?

Yep, we did that.

We have done a lot of retests and it appears that the Mailbox.org Server software is the main reason for not receiving notifications. Thank you for looking at the missing x element issue @hantu85. In the meantime, we've also made some mistakes on our side by forgetting to turn the notifications back on. All in all, our Siskin version works well with jabber.de, tigase.im and honigdachse.de and brings the notifications even after restarting the phone (and not touching the Siskin app). In some cases, the notification arrived, but the message itself took a few seconds to show up in the app. The funny thing is that the Siskin version we used (6.4 from the AppStore) even shows a notification when an account is deactivated. The deactivation of the account should include disable notifications in my understanding. So we learned a lot. Thanks again for your help. And no, my college is not going to try the Testflight version.

niklasliebig avatar Oct 28 '21 11:10 niklasliebig

The "account deactivation" "issue" is already solved in version 7.0 which is now being tested.

hantu85 avatar Oct 28 '21 11:10 hantu85

Hello, This issue comes up in google when search for xmpp siskin notification problem. I don't know if I have a misconfiguration error of this doesn't work for everyone else but...

I have an xmpp service provided by ejabberd And 3 friends who use either gajim+conversation and gajim+siskin

The two who use siskin, do not ever get their message notifications our chatroom. They need to open the app to see what is new, they don't get a notification.

My understanding is that I need to register as a developper with apple and compile my own version of siskin to get APN communication API keys, get my copy of Siskin on the app store, have them install it. Then program some kind of bridge between XMPP ejabberd server and Apple's APN infrastructure using my developper API keys. And probably create a plugin in ejabberd to send the actual notification to the bridge.

Is that what it will take to get my apple using friends to get my chat notifications ?

It seems easier to get non-apple using friends instead or maybe trying signal, I heard it's open source so maybe ?

shodanx2 avatar Jun 09 '23 03:06 shodanx2

No, Siskin devs already did that for you, the developer part.

Some issues that are known

  • no push notifications for groups (IF ejabberd, prosody/tigase servers have some components that help)
  • no notifications IF gajim is online always
  • careful to not not block s2s to the push server (if you're the admin)

Try with Monal too, it keeps (or tries at least) a connection open for longer to the server.

Read: https://eversten.net/en/blog/notification/

licaon-kter avatar Jun 09 '23 03:06 licaon-kter