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

When not using app, Siskin showing me offline to other clients and recieving no notifications in this period.

Open Ged296123 opened this issue 4 years ago • 30 comments

Describe the bug My contacts do not see me online (see me offline) when not using the app. Additionally, when not using app, I recieve no notifications of messages being sent to me.

To Reproduce Steps to reproduce the behavior:

  1. I start the app.
  2. I'm seen online to other clients (Conversations, Gajim) and recieve message notifications while using the app
  3. I revert to using another application (I do not deliberately terminate the app)
  4. Short while after not using app (do not know period of time as my contacts tell me I'm constantly offline), I appear offline. I recieve no messages and no notifications in this period.
  5. I'm back online and start recieving notifications once I start using the app.

Expected behavior Require to be online all the time unless my connection is actually broken (i.e. when not in communication with wifi / cell tower). Expect to get notifications of all messages / calls being sent to me

Screenshots N/A

Details (please complete the following information):

  • Siskin Version: 6.2
  • iOS version: 14.4
  • iPhone model: iPhone X

Additional context Add any other context about the problem here.

Ged296123 avatar Feb 12 '21 08:02 Ged296123

When you are not in the app, due to Apple restrictions on iOS all network activity needs to be terminated. As you are disconnected you appear as offline and that is correct and will not be changed as your client is not connected to your XMPP server.

Push notifications are there to deliver notifications in this case. Please check if they are enabled in Siskin IM account settings .

hantu85 avatar Feb 12 '21 08:02 hantu85

This is normal, as iOS kills the app, as Apple wishes.

You should get notifications, did you enable Push in settings? Does your server have Push (XEP-0357) support? Please contact your server admin and ask them if they have a push database entry for push.tigase.im and if s2s is active (or at least allowed with push.tigase.im).

/close as invalid

licaon-kter avatar Feb 12 '21 08:02 licaon-kter

This is normal, as iOS kills the app, as Apple wishes.

You should get notifications, did you enable Push in settings? Does your server have Push (XEP-0357) support? Please contact your server admin and ask them if they have a push database entry for push.tigase.im and if s2s is active (or at least allowed with push.tigase.im).

/close as invalid

Thanks licaon-kter, thanks hantu85.

I understand that Apple force closes the app but can't resolve the problem with push notifications. Tried various accounts (also with XEP-375) including yax.im, tigase.im and jabber.hot-chilli.net (also checked compliance for each of them through Conversations compliance check site). My push notifications are enabled in Siskin IM and in none of the accounts was I able to recieve any notification unless when I actually started using the app. On Monal however, I do not face the issue of going offline (at least not unless I haven't used the app for days) nor is there any problem with the notifications. Monal however has serious issues with MUC. XMPP on iOS is making me feel lost in all this...

Ged296123 avatar Feb 12 '21 10:02 Ged296123

This is normal, as iOS kills the app, as Apple wishes. You should get notifications, did you enable Push in settings? Does your server have Push (XEP-0357) support? Please contact your server admin and ask them if they have a push database entry for push.tigase.im and if s2s is active (or at least allowed with push.tigase.im). /close as invalid

Thanks licaon-kter, thanks hantu85.

I understand that Apple force closes the app but can't resolve the problem with push notifications. Tried various accounts (also with XEP-375) including yax.im, tigase.im and jabber.hot-chilli.net (also checked compliance for each of them through Conversations compliance check site). My push notifications are enabled in Siskin IM and in none of the accounts was I able to recieve any notification unless when I actually started using the app. On Monal however, I do not face the issue of going offline (at least not unless I haven't used the app for days) nor is there any problem with the notifications. Monal however has serious issues with MUC. XMPP on iOS is making me feel lost in all this...

Hello again. I've also checked with my admin. I'm on conversations.im and we do hae push. quoting from my admin "if there are any interop issues they are probably aware of it." Thanks again.

Ged296123 avatar Feb 12 '21 13:02 Ged296123

Hello, I'm noticing the same issue. My server has XEP-0357 support.

I don't know if this is related, but I noticed that I can't select option "When in Away/XA/DND state": the selector is disabled and can't be switched.

ios-siskin

raspbeguy avatar Feb 19 '21 13:02 raspbeguy

Can confirm the issue on Prosody server, with my two Siskin contacts. Monal works fine.

ValdikSS avatar Mar 05 '21 11:03 ValdikSS

@ValdikSS there is no "issue", it's just the way the app works, as Apple wishes. Monal tries to keep a connection alive (like Conversations does)

licaon-kter avatar Mar 05 '21 11:03 licaon-kter

Siskin registers push token to my server. My server sends push notification to Siskin, but the application doesn't seem to handle it. Monal handles push notifications perfectly fine, even after a month of offline state. Siskin used to work fine as well last year.

ValdikSS avatar Mar 05 '21 11:03 ValdikSS

Then open another issue, if that's about push. The OP here is about general offline.

licaon-kter avatar Mar 05 '21 12:03 licaon-kter

IMO this is the same issue. It is expected for the user to be offline, but the notification should be received.

ValdikSS avatar Mar 05 '21 12:03 ValdikSS

@Ged296123 have you got any success? i'm also facing same issue received all older notification when i open app but didn't received any notification on background when app is closed.

RaviVarsani avatar Mar 26 '21 06:03 RaviVarsani

@RaviVarsani you need to spell out if push is active, server software, details

licaon-kter avatar Mar 26 '21 06:03 licaon-kter

@licaon-kter several people told you that push are active, the server is working with push notifications just fine (Conversations and Monal receive push), but not Siskin. And it used to work previously.

ValdikSS avatar Mar 26 '21 07:03 ValdikSS

@licaon-kter yes of course; I have self hosted ejabberd server and i'm also getting registered push on push.tigase.im.

My scenario is when the app is open i'm getting notification but when i closed app then notifications of messages are not received. after sometimes if i again open app i can received all old notification within app.

i have question for push is we have to configure APN cert. for push works well?

and i'm successfully receiving push messages on Conversations Android with same server!!!!

RaviVarsani avatar Mar 26 '21 07:03 RaviVarsani

@ValdikSS pls don't reply to me, but to the actual users having these issues.

As a common courtesy, when reporting issues, one needs to specify all that info anyway, no matter what the posters above said, each case can be special.

licaon-kter avatar Mar 26 '21 07:03 licaon-kter

@RaviVarsani any log entries server side?

That's Conversations from Play store, yes?

licaon-kter avatar Mar 26 '21 07:03 licaon-kter

Yes that's Conversations and i have also whitelist that app to my own and that also working well .

RaviVarsani avatar Mar 26 '21 07:03 RaviVarsani

@RaviVarsani

when i closed app then notifications of messages are not received.

How do you close the app? Only by moving it to the background or by actually closing/killing it? (if it's the latter then the notifications won't work)

i have question for push is we have to configure APN cert. for push works well?

No, you don't. App developer have to deal with APNS certificate (as it's linked to the distributed app) and deploy that certificate on the XMPP Push Service (in Siskin's case that's push.tigase.im).

and i'm successfully receiving push messages on Conversations Android with same server!!!!

That's all good and well, but those contact to the different XMPP Push Services.

If you could share your JID (and possibly device-id / entries from ejabberd table) then we could check the logs.

woj-tek avatar Mar 26 '21 11:03 woj-tek

@woj-tek

when i closed app then notifications of messages are not received.

How do you close the app? Only by moving it to the background or by actually closing/killing it? (if it's the latter then the notifications won't work)

I mean to say when we stop use of app and closed the app in that situation.

i have question for push is we have to configure APN cert. for push works well?

No, you don't. App developer have to deal with APNS certificate (as it's linked to the distributed app) and deploy that certificate on the XMPP Push Service (in Siskin's case that's push.tigase.im).

Okay understood.

and i'm successfully receiving push messages on Conversations Android with same server!!!!

That's all good and well, but those contact to the different XMPP Push Services.

If you could share your JID (and possibly device-id / entries from ejabberd table) then we could check the logs.

yep my JID is [email protected] and device-id is 9d7c4745691b482668043c4f0ba1d1daa3ffd8a3 and my device token is 068B31DA945B82CBACE4BDE3DA4BA3C84500D4428FB4E8946ABDA4669CED6796

RaviVarsani avatar Mar 26 '21 11:03 RaviVarsani

@RaviVarsani Are you using Siskin IM from the AppStore or from TestFlight?

hantu85 avatar Mar 26 '21 12:03 hantu85

@hantu85 Neither from AppStore nor Testflight. I have clone Siskin IM and build my own app that dosen't working.

I have earlier test Siskin IM from AppStore and using with my own server; that working well.

RaviVarsani avatar Mar 26 '21 13:03 RaviVarsani

@hantu85 Neither from AppStore nor Testflight. I have clone Siskin IM and build my own app that dosen't working.

And that is the cause of the issue. According to the Apple rules for APNS, an APNS certificate for notifications must have the same "bundle id" as the application to which it is sending notifications. In your case, your application (not SiskinIM, it is an application created from SiskinIM sources!) has a different bundle id and due to that, it will not work with the push notifications component for XMPP provided by us.

You would need to deploy your own push notifications component (with your own APNS certificate) and adjust your application to use it.

Bottom line: In this case, SiskinIM and its push notifications component are behaving correctly.

hantu85 avatar Mar 26 '21 13:03 hantu85

@hantu85, in my case 3 people with iPhones use Siskin IM from AppStore. I'm not aware how do they minimize the app, but with Monal it works either way.

ValdikSS avatar Mar 26 '21 13:03 ValdikSS

@ValdikSS Can you provide their JIDs and device tokens so I could check logs? Otherwise it's impossible to know why it's not working for them.

hantu85 avatar Mar 26 '21 13:03 hantu85

@hantu85

You would need to deploy your own push notifications component (with your own APNS certificate) and adjust your application to use it.

Thanks for quick reply and clearly understanding. i have already created my APNS certificate. now please can you more clarify how can i make my own push notifications component?

RaviVarsani avatar Mar 26 '21 13:03 RaviVarsani

First of all - this is off-topic so just last comment regarding this:

now please can you more clarify how can i make my own push notifications component?

You should either implement xep-0357 or use any of the available implementations (we do tigase-push but please keep in mind that it's not open-source and requires licence)

woj-tek avatar Mar 29 '21 16:03 woj-tek

If I have the app closed out then I will get a push just saying "New Message!" but if I have the app open or in the background then I get a push with the correct message in the push but then also another message saying "New Message!".

deckberg-quantumdigital avatar Nov 19 '21 16:11 deckberg-quantumdigital

@deckberg-quantumdigital That is not an issue and is off-topic. That is caused by your XMPP server sending push notifications without the content of the message but instead sending no content or "New Message!".

To "deal with this" other clients are reconnecting to the XMPP server on each new push notification received to fetch the content of the message. That drains the battery of your phone and due to that Siskin IM is not reconnecting - displaying a placeholder message instead.

hantu85 avatar Nov 19 '21 17:11 hantu85

Thanks for the follow up! We're using Prosody for the server. Do you know how to enable sending the content of the message in the push? It would be nice to have that be an option you can turn on to enable that reconnection like other clients do and just warn that it may lower your battery. Though it they are only reconnecting after receiving a new push it probably won't affect battery much unless you're extremely popular! ;)

deckberg-quantumdigital avatar Nov 22 '21 16:11 deckberg-quantumdigital

@deckberg-quantumdigital better ask in xmpp:[email protected]?join

...and those should be "encrypted push messages" so you don't leak everything in plaintext to Google and Apple!

licaon-kter avatar Nov 22 '21 16:11 licaon-kter