tigase / siskin-im

(M) Public Project of Tigase Messenger for iOS devices based on Tigase Swift XMPP library.
GNU General Public License v3.0
173 stars 37 forks source link

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

Open Ged296123 opened 3 years ago

Ged296123 commented 3 years ago

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):

Additional context Add any other context about the problem here.

hantu85 commented 3 years ago

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 .

licaon-kter commented 3 years ago

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

Ged296123 commented 3 years ago

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 commented 3 years ago

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.

raspbeguy commented 3 years ago

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

ValdikSS commented 3 years ago

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

licaon-kter commented 3 years ago

@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)

ValdikSS commented 3 years ago

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.

licaon-kter commented 3 years ago

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

ValdikSS commented 3 years ago

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

RaviVarsani commented 3 years ago

@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.

licaon-kter commented 3 years ago

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

ValdikSS commented 3 years ago

@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.

RaviVarsani commented 3 years ago

@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!!!!

licaon-kter commented 3 years ago

@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 commented 3 years ago

@RaviVarsani any log entries server side?

That's Conversations from Play store, yes?

RaviVarsani commented 3 years ago

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

woj-tek commented 3 years ago

@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.

RaviVarsani commented 3 years ago

@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 nimesh@teleforce.in and device-id is 9d7c4745691b482668043c4f0ba1d1daa3ffd8a3 and my device token is 068B31DA945B82CBACE4BDE3DA4BA3C84500D4428FB4E8946ABDA4669CED6796

hantu85 commented 3 years ago

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

RaviVarsani commented 3 years ago

@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.

hantu85 commented 3 years ago

@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.

ValdikSS commented 3 years ago

@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.

hantu85 commented 3 years ago

@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.

RaviVarsani commented 3 years ago

@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?

woj-tek commented 3 years ago

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)

deckberg-quantumdigital commented 2 years ago

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!".

hantu85 commented 2 years ago

@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.

deckberg-quantumdigital commented 2 years ago

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! ;)

licaon-kter commented 2 years ago

@deckberg-quantumdigital better ask in xmpp:prosody@conference.prosody.im?join

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