New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing push notification #770

Closed
ageru opened this Issue May 14, 2017 · 151 comments

Comments

Projects
None yet
@ageru

ageru commented May 14, 2017

Hi,

Sorry to create yet another bug about push...

Setup

  • Server: prosody .9.12 with CA-signed TLS certificate
  • Relevant modules: cloud_notify, smacks, pinger, carbons, mam, csi, filter_chatstates, throttle_presence.
  • IPhone SE with latest iOS. Low battery mode off, all is ON in General Settings > ChatSecure.
  • Chatsecure 4.0.8

Steps to reproduce

  1. Install Chatsecure, log to server
  2. Send a couple of messages to user on iPhone, they reach him, OMEMO works... Everything looks clear.
  3. Confirmed push is active in the app's interface
  4. Leave the app.

Actual result

  • Quickly, the iPhone user shows as away on other devices, then as offline.
  • Messages don't reach the device unless the iPhone's user starts the app
  • The iPhone's user has to specifically open the app to get the sent messages
  • Relevant portions of the server log:
    • Successfully initiating push (it seems):
      May 14 HH:MM:SS [alphanum characters] info Push notifications enabled for [ID]@[chatdomain.tld]/chatsecure (pubsub.chatsecure.org<A3486BB3-6442-4945-84E2-[more alphanum characters])

    • When trying to send a message to offline device (the last number increments with every try of the server):
      May 14 HH:MM:SS [chatdomain.tld]:cloud_notify info Got error of type 'cancel' (not-allowed) for identifier 'pubsub.chatsecure.org<A3486BB3-6442-4945-84E2-[alphanum characters]': error count for this identifier is now at 1

Expected Result
If iPhone is connected to the Internet, the iPhone user gets a notification straight away.

Bonus questions

  • What does mod_pinger do? I can make an educated guess looking at the name and bits of its code, but I'm not 100% certain.
  • Would it be possible to get a wiki of FAQ detailing exactly what modules in prosody are needed to use all the features of ChatSecure? @chrisballinger gives a few times his config in threads here and there, but that's hardly discoverable and probably not comprehensive or up to date.

Many thanks.

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 15, 2017

Member

Thanks for the thorough investigation. I've never seen that error message before from the push module. It looks like the code has been updated recently: https://hg.prosody.im/prosody-modules/file/tip/mod_cloud_notify/mod_cloud_notify.lua#l73

Perhaps try rolling back mod_cloud_notify to a (much older) commit?

Member

chrisballinger commented May 15, 2017

Thanks for the thorough investigation. I've never seen that error message before from the push module. It looks like the code has been updated recently: https://hg.prosody.im/prosody-modules/file/tip/mod_cloud_notify/mod_cloud_notify.lua#l73

Perhaps try rolling back mod_cloud_notify to a (much older) commit?

@KingKili

This comment has been minimized.

Show comment
Hide comment
@KingKili

KingKili May 15, 2017

I have the same issue with https://trashserver.net/

KingKili commented May 15, 2017

I have the same issue with https://trashserver.net/

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru May 15, 2017

All the modules are automatically updated weekly on my server (and I didn't have any ChatSecure user before the past week-end) so that would be consistent with your theory. As a temporary fix, rolling back to an earlier commit should be possible, I just hope it won't break things with the users running Conversations.

Would you be able to let me know what commit of this module you are using, or alternatively to date it?

By the way, when I noticed the issue, I installed mod_pinger to try to fix it, since you seemed to be using it. Is it in any way necessary to have it installed for ChatSecure and Push to work properly?

ageru commented May 15, 2017

All the modules are automatically updated weekly on my server (and I didn't have any ChatSecure user before the past week-end) so that would be consistent with your theory. As a temporary fix, rolling back to an earlier commit should be possible, I just hope it won't break things with the users running Conversations.

Would you be able to let me know what commit of this module you are using, or alternatively to date it?

By the way, when I noticed the issue, I installed mod_pinger to try to fix it, since you seemed to be using it. Is it in any way necessary to have it installed for ChatSecure and Push to work properly?

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 15, 2017

Member

mod_pinger shouldn't be required. Not sure the exact mod_cloud_notify commit, but I'll figure that out and test against the latest commit. Push is still working fine as of a few minutes ago on my personal server configuration.

Member

chrisballinger commented May 15, 2017

mod_pinger shouldn't be required. Not sure the exact mod_cloud_notify commit, but I'll figure that out and test against the latest commit. Push is still working fine as of a few minutes ago on my personal server configuration.

@paskalito

This comment has been minimized.

Show comment
Hide comment
@paskalito

paskalito May 16, 2017

could this be avoided using this push mechanism ?
#650 (comment)

paskalito commented May 16, 2017

could this be avoided using this push mechanism ?
#650 (comment)

@beeloo42

This comment has been minimized.

Show comment
Hide comment
@beeloo42

beeloo42 May 18, 2017

I'm also encountering this issue
I tried the 5 latest mod_cloud_notify versions without success...

beeloo42 commented May 18, 2017

I'm also encountering this issue
I tried the 5 latest mod_cloud_notify versions without success...

@afriedmanGlacier

This comment has been minimized.

Show comment
Hide comment
@afriedmanGlacier

afriedmanGlacier May 22, 2017

Contributor

We are using eJabber and have changed a bit of the underlying functionality of push, but just thought I'd chime in and say push still works ok for us. However...

@chrisballinger the one problem I have seen lately, I thought I'd add here just in case it is relevant to these issues is that our RubDub has died unexpectedly a few times. Haven't figured out why yet (and we also haven't updated to the RubDub with Rollbar yet). When this happened, eJabber could not connect to it and push stopped working. Have you seen this at all Chris? I'm not sure if you guys use the same RubDub and ChatSecure-Push-Server setup as is available on github?

If you have not had this problem, we'll just monitor it on our end, but just thought I'd add this here in case it is relevant.

Contributor

afriedmanGlacier commented May 22, 2017

We are using eJabber and have changed a bit of the underlying functionality of push, but just thought I'd chime in and say push still works ok for us. However...

@chrisballinger the one problem I have seen lately, I thought I'd add here just in case it is relevant to these issues is that our RubDub has died unexpectedly a few times. Haven't figured out why yet (and we also haven't updated to the RubDub with Rollbar yet). When this happened, eJabber could not connect to it and push stopped working. Have you seen this at all Chris? I'm not sure if you guys use the same RubDub and ChatSecure-Push-Server setup as is available on github?

If you have not had this problem, we'll just monitor it on our end, but just thought I'd add this here in case it is relevant.

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 22, 2017

Member

Yeah it does sometimes, but I re-provisioned our server don't see this anymore. I have an external port monitor that emails me when it goes down, and it hasn't had an issue since then. (Ubuntu 16.04 and latest Node PPA.)

Member

chrisballinger commented May 22, 2017

Yeah it does sometimes, but I re-provisioned our server don't see this anymore. I have an external port monitor that emails me when it goes down, and it hasn't had an issue since then. (Ubuntu 16.04 and latest Node PPA.)

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 May 23, 2017

Exactly the same problem I encounter with two of my contacts who use ChatSecure 2.0.8 (while I am using Conversations 1.18.4). All of us are using jabber.de (prosody >0.9.10)

  • At iOS devices Push is active and running (as ChatSecure me confirmed).
  • For about 1-2 days delivering messages to the iOS-devices works perfectly:
    • I compose a message (Conversations) while iOS-users are displayed as offline
    • triggered by the typing-notifier iOS-users are shown as "online" for some seconds
    • i send the message some time later, iOS again return to "online", receives the message, send an delivery-notifier - perfect!
  • But after 2-3 days this does not work anymore and the iOS user has to reopen ChatSecure to get Push activated again (which is not very userful for long-term conversations....), otherwise the message never will be delivered.

I think it is the same problem than stated above, but I could not provide any logfile but are eager to help solving this problem.

Is the reason now already undrestood or is it still a mystery, why/when/where this happens?

I hope the best for a fix in the next release....cheers, Robert

therob84 commented May 23, 2017

Exactly the same problem I encounter with two of my contacts who use ChatSecure 2.0.8 (while I am using Conversations 1.18.4). All of us are using jabber.de (prosody >0.9.10)

  • At iOS devices Push is active and running (as ChatSecure me confirmed).
  • For about 1-2 days delivering messages to the iOS-devices works perfectly:
    • I compose a message (Conversations) while iOS-users are displayed as offline
    • triggered by the typing-notifier iOS-users are shown as "online" for some seconds
    • i send the message some time later, iOS again return to "online", receives the message, send an delivery-notifier - perfect!
  • But after 2-3 days this does not work anymore and the iOS user has to reopen ChatSecure to get Push activated again (which is not very userful for long-term conversations....), otherwise the message never will be delivered.

I think it is the same problem than stated above, but I could not provide any logfile but are eager to help solving this problem.

Is the reason now already undrestood or is it still a mystery, why/when/where this happens?

I hope the best for a fix in the next release....cheers, Robert

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 23, 2017

Member
Member

chrisballinger commented May 23, 2017

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 May 23, 2017

therob84 commented May 23, 2017

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 23, 2017

Member
Member

chrisballinger commented May 23, 2017

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 May 24, 2017

@chrisballinger
Anwser from jabber.de-guys are:

  • "Server is restarted about once a month" ....so I don't think this is the explanation for me (but can't say for sure)
  • they "can't find the ability for storing a session" (I guess in mod_cloud_notify)
  • but they updated today the module Cloud_Notify (don't know between which versions) and I will check if it is improved (should the ChatSecure-Apps be restarted or should they use the new modul version automatically in background?)

Any more suggestion about the problem from your side?
For my information: is anywhere written how the ChatSecure-Push-Servers are working together with the iOS devices and with the jabber-servers? I can't understand how it works in principle until now...

Edit1:
5 days after the Cloud_Notify module was updated at jabber.de it seems the situation is improved (I can reach 3 contacts reliable within the last 5 days) But it is too early to say anything for long-term-stability.

Edit2:
2 weeks later I can NOT confirm any success in reaching my iOS-contacts. Only one contact is reachable anymore. But I think this is connected to the problem that ChatSecure/push-service is not restarted automatically after "restartingOS/swiping CS away/kill CS"... Which is a very deadly drawback and makes CS nearly unusable by iOS-contacts which do not care that much about "always checking if CS is launched and running" ......... :-(

therob84 commented May 24, 2017

@chrisballinger
Anwser from jabber.de-guys are:

  • "Server is restarted about once a month" ....so I don't think this is the explanation for me (but can't say for sure)
  • they "can't find the ability for storing a session" (I guess in mod_cloud_notify)
  • but they updated today the module Cloud_Notify (don't know between which versions) and I will check if it is improved (should the ChatSecure-Apps be restarted or should they use the new modul version automatically in background?)

Any more suggestion about the problem from your side?
For my information: is anywhere written how the ChatSecure-Push-Servers are working together with the iOS devices and with the jabber-servers? I can't understand how it works in principle until now...

Edit1:
5 days after the Cloud_Notify module was updated at jabber.de it seems the situation is improved (I can reach 3 contacts reliable within the last 5 days) But it is too early to say anything for long-term-stability.

Edit2:
2 weeks later I can NOT confirm any success in reaching my iOS-contacts. Only one contact is reachable anymore. But I think this is connected to the problem that ChatSecure/push-service is not restarted automatically after "restartingOS/swiping CS away/kill CS"... Which is a very deadly drawback and makes CS nearly unusable by iOS-contacts which do not care that much about "always checking if CS is launched and running" ......... :-(

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 May 30, 2017

Two more questions I want to raise:

  • how does ChatSecures push-functionality behaves, after CS is activley "swiped out" in taskmanager or even forced killed?
  • Or if iOS is freshly restarted an ChatSecure is not yet launched manually by user interaction?

--> Will CS (re-)establish a Push-Session in this scenarios or is there first an user activity needed (which would not be that relieable and practicable)?

therob84 commented May 30, 2017

Two more questions I want to raise:

  • how does ChatSecures push-functionality behaves, after CS is activley "swiped out" in taskmanager or even forced killed?
  • Or if iOS is freshly restarted an ChatSecure is not yet launched manually by user interaction?

--> Will CS (re-)establish a Push-Session in this scenarios or is there first an user activity needed (which would not be that relieable and practicable)?

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 30, 2017

Member
Member

chrisballinger commented May 30, 2017

@mimi89999

This comment has been minimized.

Show comment
Hide comment
@mimi89999

mimi89999 May 30, 2017

Zom-iOS has the same issues, right?

mimi89999 commented May 30, 2017

Zom-iOS has the same issues, right?

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 30, 2017

Member
Member

chrisballinger commented May 30, 2017

@mimi89999

This comment has been minimized.

Show comment
Hide comment
@mimi89999

mimi89999 May 31, 2017

But how does Facebook, Twitter, Snapchat, etc. work then? They don't do VoIP and users are still able to get notifications after swiping the app and after a [re]boot.

mimi89999 commented May 31, 2017

But how does Facebook, Twitter, Snapchat, etc. work then? They don't do VoIP and users are still able to get notifications after swiping the app and after a [re]boot.

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 31, 2017

Member
Member

chrisballinger commented May 31, 2017

@mimi89999

This comment has been minimized.

Show comment
Hide comment
@mimi89999

mimi89999 May 31, 2017

Can't we send you have unread messages. Please open the app to see them or something similar then?

mimi89999 commented May 31, 2017

Can't we send you have unread messages. Please open the app to see them or something similar then?

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 31, 2017

Member
Member

chrisballinger commented May 31, 2017

@mimi89999

This comment has been minimized.

Show comment
Hide comment
@mimi89999

mimi89999 May 31, 2017

@chrisballinger It would be a huge UX improvement. Users won't need to remember not to swipe the app from recent or to launch it after [re]boot.

As for presence, status, etc. smacks does that very well. We could also check for the <body> tag in the stanza in the cloud_notify module and send a push message only if there is one.

mimi89999 commented May 31, 2017

@chrisballinger It would be a huge UX improvement. Users won't need to remember not to swipe the app from recent or to launch it after [re]boot.

As for presence, status, etc. smacks does that very well. We could also check for the <body> tag in the stanza in the cloud_notify module and send a push message only if there is one.

@mimi89999

This comment has been minimized.

Show comment
Hide comment
@mimi89999

mimi89999 Jun 5, 2017

@chrisballinger Will it require a lot of work to implement those high priority push notifications in the app and on the node?

mimi89999 commented Jun 5, 2017

@chrisballinger Will it require a lot of work to implement those high priority push notifications in the app and on the node?

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 Jun 7, 2017

I just edited my comment above, about only updating the Cloud_Notify module on the prosody-server (of jabber.de) can NOT solve the problem that ChatSecure/push-service is not restarted automatically after "restartingOS/swiping CS away/kill CS"... And thus is a very deadly drawback and makes CS nearly unusable by iOS-contacts which do not care that much about "always checking if CS is launched and running" ......... :-(

therob84 commented Jun 7, 2017

I just edited my comment above, about only updating the Cloud_Notify module on the prosody-server (of jabber.de) can NOT solve the problem that ChatSecure/push-service is not restarted automatically after "restartingOS/swiping CS away/kill CS"... And thus is a very deadly drawback and makes CS nearly unusable by iOS-contacts which do not care that much about "always checking if CS is launched and running" ......... :-(

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger Jun 7, 2017

Member

@therob84 I have plans to improve this in an upcoming release. Going to take the approach of sending generic foreground "New Message" notifications and possibly "Someone is typing..." as well.

Member

chrisballinger commented Jun 7, 2017

@therob84 I have plans to improve this in an upcoming release. Going to take the approach of sending generic foreground "New Message" notifications and possibly "Someone is typing..." as well.

@paskalito

This comment has been minimized.

Show comment
Hide comment
@paskalito

paskalito Jun 16, 2017

@chrisballinger
Hi that's sounds so great to me!! thank you!
i wanted to post a bounty on this, but i somehow could not find the issue there.. - did you stop supporting bountysource? ( looks like the last push bounty didn't end well..)
btw. is the project on gratipay (couldn't find it) or liberpay?

paskalito commented Jun 16, 2017

@chrisballinger
Hi that's sounds so great to me!! thank you!
i wanted to post a bounty on this, but i somehow could not find the issue there.. - did you stop supporting bountysource? ( looks like the last push bounty didn't end well..)
btw. is the project on gratipay (couldn't find it) or liberpay?

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger Jun 17, 2017

Member

@paskalito You can now set up a monthly donation via in-app purchase within the app. I also have PayPal and Bitcoin options if you'd like to give a little extra:

Thanks for your support!

Member

chrisballinger commented Jun 17, 2017

@paskalito You can now set up a monthly donation via in-app purchase within the app. I also have PayPal and Bitcoin options if you'd like to give a little extra:

Thanks for your support!

@therob84

This comment has been minimized.

Show comment
Hide comment
@therob84

therob84 Jun 18, 2017

@chrisballinger: I saw your announcment for beta-testing 4.1.0 at twitter (with http-upload and inline images) - great !!!!!!
Could you also include already some improvments about behaviour of push messages (after restart,kill-app etc.) in this release?
Great work, chris!

therob84 commented Jun 18, 2017

@chrisballinger: I saw your announcment for beta-testing 4.1.0 at twitter (with http-upload and inline images) - great !!!!!!
Could you also include already some improvments about behaviour of push messages (after restart,kill-app etc.) in this release?
Great work, chris!

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger Jun 18, 2017

Member
Member

chrisballinger commented Jun 18, 2017

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru Dec 1, 2017

Just had a brain fart: would the Prosody team maybe accept to include this altered version of mod_cloud_notify in their community repo as a module on its own (mod_cloud_notify_ios_hack or something along those lines) ? Since this alternate module might be needed for a while, it would at least make discoverability and maintenance less difficult for server administrators (although I acknowledge it might be a pain to maintain outside of github for you Chris)

Anyway, it's just a thought, I leave the smell test to you ;)

ageru commented Dec 1, 2017

Just had a brain fart: would the Prosody team maybe accept to include this altered version of mod_cloud_notify in their community repo as a module on its own (mod_cloud_notify_ios_hack or something along those lines) ? Since this alternate module might be needed for a while, it would at least make discoverability and maintenance less difficult for server administrators (although I acknowledge it might be a pain to maintain outside of github for you Chris)

Anyway, it's just a thought, I leave the smell test to you ;)

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger Dec 1, 2017

Member

It should probably just be merged into the regular mod_cloud_notify because they already have some references to my patch in there.

Member

chrisballinger commented Dec 1, 2017

It should probably just be merged into the regular mod_cloud_notify because they already have some references to my patch in there.

@andreygursky

This comment has been minimized.

Show comment
Hide comment
@andreygursky

andreygursky Dec 1, 2017

@chrisballinger, thanks for pointing to the repo! So these couples of lines should make a true wonder:

--- prosody-modules.hg/mod_cloud_notify/mod_cloud_notify.lua    2017-10-17 19:39:18.970486913 +0200
+++ prosody-modules.git/mod_cloud_notify/mod_cloud_notify.lua   2017-11-04 20:02:15.516762311 +0100
@@ -14,6 +14,7 @@ local hashes = require"util.hashes";
 local xmlns_push = "urn:xmpp:push:0";
 
 -- configuration
+local include_priority = module:get_option_boolean("push_notification_with_priority", true);
 local include_body = module:get_option_boolean("push_notification_with_body", false);
 local include_sender = module:get_option_boolean("push_notification_with_sender", false);
 local max_push_errors = module:get_option_number("push_max_errors", 50);
@@ -270,6 +271,13 @@ local function handle_notify_request(sta
                        if stanza and include_body then
                                form_data["last-message-body"] = stanza:get_child_text("body");
                        end
+                       if stanza and include_priority then
+                               if stanza:get_child("body") or stanza:get_child("encrypted", "eu.siacs.conversations.axolotl") then
+                                       form_data["last-message-priority"] = "high"
+                               else
+                                       form_data["last-message-priority"] = "low"
+                               end
+                       end
                        push_publish:add_child(push_form:form(form_data));
                        if stanza and push_info.include_payload == "stripped" then
                                push_publish:tag("payload", { type = "stripped" })

andreygursky commented Dec 1, 2017

@chrisballinger, thanks for pointing to the repo! So these couples of lines should make a true wonder:

--- prosody-modules.hg/mod_cloud_notify/mod_cloud_notify.lua    2017-10-17 19:39:18.970486913 +0200
+++ prosody-modules.git/mod_cloud_notify/mod_cloud_notify.lua   2017-11-04 20:02:15.516762311 +0100
@@ -14,6 +14,7 @@ local hashes = require"util.hashes";
 local xmlns_push = "urn:xmpp:push:0";
 
 -- configuration
+local include_priority = module:get_option_boolean("push_notification_with_priority", true);
 local include_body = module:get_option_boolean("push_notification_with_body", false);
 local include_sender = module:get_option_boolean("push_notification_with_sender", false);
 local max_push_errors = module:get_option_number("push_max_errors", 50);
@@ -270,6 +271,13 @@ local function handle_notify_request(sta
                        if stanza and include_body then
                                form_data["last-message-body"] = stanza:get_child_text("body");
                        end
+                       if stanza and include_priority then
+                               if stanza:get_child("body") or stanza:get_child("encrypted", "eu.siacs.conversations.axolotl") then
+                                       form_data["last-message-priority"] = "high"
+                               else
+                                       form_data["last-message-priority"] = "low"
+                               end
+                       end
                        push_publish:add_child(push_form:form(form_data));
                        if stanza and push_info.include_payload == "stripped" then
                                push_publish:tag("payload", { type = "stripped" })
@ThomasLeister

This comment has been minimized.

Show comment
Hide comment
@ThomasLeister

ThomasLeister Feb 24, 2018

Me and many other XMPP server admins I know would very much appreciate if this patch was also merged onto the official mod_cloud_notify version on modules.prosody.im! If someone has skills and time to maintain this thing - please go for it! :-)

ThomasLeister commented Feb 24, 2018

Me and many other XMPP server admins I know would very much appreciate if this patch was also merged onto the official mod_cloud_notify version on modules.prosody.im! If someone has skills and time to maintain this thing - please go for it! :-)

@tmolitor-stud-tu

This comment has been minimized.

Show comment
Hide comment
@tmolitor-stud-tu

tmolitor-stud-tu Feb 25, 2018

@ThomasLeister I won't merge the patch because the last-message-priority field isn't specified in XEP-0357.

But: if the last-message-body field is set, Rubdub (the appserver used by ChatSecure) interpretes the push as "high priority", too.
I recently talked to @weiss (ejabberd developer) and we agreed to add a new config option to include a dummy message in last-message-body (something like "New message").

This way we won't break the standard, but still give you the functionality you need.

tmolitor-stud-tu commented Feb 25, 2018

@ThomasLeister I won't merge the patch because the last-message-priority field isn't specified in XEP-0357.

But: if the last-message-body field is set, Rubdub (the appserver used by ChatSecure) interpretes the push as "high priority", too.
I recently talked to @weiss (ejabberd developer) and we agreed to add a new config option to include a dummy message in last-message-body (something like "New message").

This way we won't break the standard, but still give you the functionality you need.

@dholl

This comment has been minimized.

Show comment
Hide comment
@dholl

dholl Mar 9, 2018

For anyone else still wrestling with push notifications even after implementing all the fine wisdom in this thread, also check for cipher suite compatibility issues noted in #822, such as ECDHE curves prime256v1 vs secp384r1...

dholl commented Mar 9, 2018

For anyone else still wrestling with push notifications even after implementing all the fine wisdom in this thread, also check for cipher suite compatibility issues noted in #822, such as ECDHE curves prime256v1 vs secp384r1...

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru Mar 9, 2018

Thank you for reporting this here @dholl . I still seem to be missing one piece of the puzzle, but whatever my problem is, now this curve/cipher issue is not part of it any more :)

ageru commented Mar 9, 2018

Thank you for reporting this here @dholl . I still seem to be missing one piece of the puzzle, but whatever my problem is, now this curve/cipher issue is not part of it any more :)

@tmolitor-stud-tu

This comment has been minimized.

Show comment
Hide comment
@tmolitor-stud-tu

tmolitor-stud-tu Apr 1, 2018

FYI: I just pushed my proposed changes to modules.prosody.im over here: https://hg.prosody.im/prosody-modules/rev/df86ce6bb0b4

(the one I talked about over here: #770 (comment))

tmolitor-stud-tu commented Apr 1, 2018

FYI: I just pushed my proposed changes to modules.prosody.im over here: https://hg.prosody.im/prosody-modules/rev/df86ce6bb0b4

(the one I talked about over here: #770 (comment))

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru Apr 9, 2018

Hi @tmolitor-stud-tu and everyone,

So just to be sure I get everything right...

Currently, as a Prosody server admin, if I want my Chatsecure users to get notifications of new messages, I need to:

  • Check for cipher suite compatibility, as per #822, and adapt cipher settings accordingly
  • Install the latest version of mod_cloud_notify
  • Insert a value for "push_notification_important_body", or is it not mandatory?
  • Have MAM activated?
  • ... (anything else I'm forgetting?)
  • PROFIT?

Thanks again for all your contributions on this issue.

ageru commented Apr 9, 2018

Hi @tmolitor-stud-tu and everyone,

So just to be sure I get everything right...

Currently, as a Prosody server admin, if I want my Chatsecure users to get notifications of new messages, I need to:

  • Check for cipher suite compatibility, as per #822, and adapt cipher settings accordingly
  • Install the latest version of mod_cloud_notify
  • Insert a value for "push_notification_important_body", or is it not mandatory?
  • Have MAM activated?
  • ... (anything else I'm forgetting?)
  • PROFIT?

Thanks again for all your contributions on this issue.

@tmolitor-stud-tu

This comment has been minimized.

Show comment
Hide comment
@tmolitor-stud-tu

tmolitor-stud-tu Apr 9, 2018

@ageru Yes, push_notification_important_body has to be set to some text like "New Message".
But to be honest it can be anything because ChatSecure's AppServer strips the text off when sending the notification via APNS.
It's just needed for the AppServer to know the push is a high priority one.

tmolitor-stud-tu commented Apr 9, 2018

@ageru Yes, push_notification_important_body has to be set to some text like "New Message".
But to be honest it can be anything because ChatSecure's AppServer strips the text off when sending the notification via APNS.
It's just needed for the AppServer to know the push is a high priority one.

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger Apr 10, 2018

Member

@ageru @tmolitor-stud-tu Please don't send us message content, make sure to replace it with something static.

Member

chrisballinger commented Apr 10, 2018

@ageru @tmolitor-stud-tu Please don't send us message content, make sure to replace it with something static.

@ldvc

This comment has been minimized.

Show comment
Hide comment
@ldvc

ldvc Apr 10, 2018

In #770 (comment):

I recently talked to @weiss (ejabberd developer) and we agreed to add a new config option to include a dummy message in last-message-body (something like "New message").

@weiss is this "dummy message" still planned for ejabberd?

ldvc commented Apr 10, 2018

In #770 (comment):

I recently talked to @weiss (ejabberd developer) and we agreed to add a new config option to include a dummy message in last-message-body (something like "New message").

@weiss is this "dummy message" still planned for ejabberd?

@weiss

This comment has been minimized.

Show comment
Hide comment
@weiss

weiss Apr 10, 2018

@weiss is this "dummy message" still planned for ejabberd?

Yes, I'll add this soon™.

weiss commented Apr 10, 2018

@weiss is this "dummy message" still planned for ejabberd?

Yes, I'll add this soon™.

@Lyokovic

This comment has been minimized.

Show comment
Hide comment
@Lyokovic

Lyokovic Apr 11, 2018

Hi,

Just a comment to say that after updating my prosody modules and adding the push_notification_important_body option, push notifications now work for me.

Thanks for your work!

Lyokovic commented Apr 11, 2018

Hi,

Just a comment to say that after updating my prosody modules and adding the push_notification_important_body option, push notifications now work for me.

Thanks for your work!

@danielreuther

This comment has been minimized.

Show comment
Hide comment
@danielreuther

danielreuther Apr 11, 2018

@weiss Sounds great. In case you have a development branch that contains it, I'd be happy to try it out.

danielreuther commented Apr 11, 2018

@weiss Sounds great. In case you have a development branch that contains it, I'd be happy to try it out.

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru Apr 12, 2018

I was despairing a bit after Lyokovic's message, since I was still getting the same "cancel" message as before.

So I tested a few things this evening, and it seems what did the trick for me was to activate S2S, which had been off until then. Does it means that S2S is required for the connection to pubsub.chatsecure.org to happen? Is that expected behaviour? This is a completely candid question, as I was expecting S2S to be for pure messaging only, not in this context.

Here is the config that was successful:

  • ChatSecure 4.3
  • Conversation 2.0.0 on the other side of the conversation
  • Prosody 0.10.0
  • All that cipher jazz set properly
  • main modules enabled: mam (internal), smacks, smacks_offline, pep_vcard_avatar, csi, filter_chatstates, throttle_presence, cloud_notify...
  • ...and S2S enabled as of a few minutes ago.

I'll keep testing in the next few day. Please do chip in with your insights and your own experience.

Fingers crossed I'm closing this one soon...

ageru commented Apr 12, 2018

I was despairing a bit after Lyokovic's message, since I was still getting the same "cancel" message as before.

So I tested a few things this evening, and it seems what did the trick for me was to activate S2S, which had been off until then. Does it means that S2S is required for the connection to pubsub.chatsecure.org to happen? Is that expected behaviour? This is a completely candid question, as I was expecting S2S to be for pure messaging only, not in this context.

Here is the config that was successful:

  • ChatSecure 4.3
  • Conversation 2.0.0 on the other side of the conversation
  • Prosody 0.10.0
  • All that cipher jazz set properly
  • main modules enabled: mam (internal), smacks, smacks_offline, pep_vcard_avatar, csi, filter_chatstates, throttle_presence, cloud_notify...
  • ...and S2S enabled as of a few minutes ago.

I'll keep testing in the next few day. Please do chip in with your insights and your own experience.

Fingers crossed I'm closing this one soon...

@weiss

This comment has been minimized.

Show comment
Hide comment
@weiss

weiss Apr 12, 2018

Does it means that S2S is required for the connection to pubsub.chatsecure.org to happen? Is that expected behaviour?

Yes.

weiss commented Apr 12, 2018

Does it means that S2S is required for the connection to pubsub.chatsecure.org to happen? Is that expected behaviour?

Yes.

@weiss

This comment has been minimized.

Show comment
Hide comment
@weiss

weiss Apr 17, 2018

@danielreuther

@weiss is this "dummy message" still planned for ejabberd?

Yes, I'll add this soon™.

Sounds great. In case you have a development branch that contains it, I'd be happy to try it out.

It's in the master branch, now. In order to enable it:

    modules:
      mod_push:
        include_body: "New message"

weiss commented Apr 17, 2018

@danielreuther

@weiss is this "dummy message" still planned for ejabberd?

Yes, I'll add this soon™.

Sounds great. In case you have a development branch that contains it, I'd be happy to try it out.

It's in the master branch, now. In order to enable it:

    modules:
      mod_push:
        include_body: "New message"
@antonyablonsky

This comment has been minimized.

Show comment
Hide comment
@antonyablonsky

antonyablonsky May 12, 2018

Hi everyone! Is there way to make s2s connection between ejabberd server and pubsub.chatsecure.org if server was not configured with DNS records and domain name like "example.com"? it just lives on my static ip and I connect straightforward, like user@ip_adress. Thanks

antonyablonsky commented May 12, 2018

Hi everyone! Is there way to make s2s connection between ejabberd server and pubsub.chatsecure.org if server was not configured with DNS records and domain name like "example.com"? it just lives on my static ip and I connect straightforward, like user@ip_adress. Thanks

@chrisballinger

This comment has been minimized.

Show comment
Hide comment
@chrisballinger

chrisballinger May 12, 2018

Member
Member

chrisballinger commented May 12, 2018

mwlczk pushed a commit to mwlczk/docker-ejabberd that referenced this issue Jun 12, 2018

@Echolon

This comment has been minimized.

Show comment
Hide comment
@Echolon

Echolon Jul 28, 2018

Hi,

just started an EtherCalc Pad to collect information about your and others experience about push. Feel free to add your data or additional columns (suggest only to add columns where the information can be given from a normal user)

https://ethercalc.org/29iyo1nunqdp

Cheers

Echolon commented Jul 28, 2018

Hi,

just started an EtherCalc Pad to collect information about your and others experience about push. Feel free to add your data or additional columns (suggest only to add columns where the information can be given from a normal user)

https://ethercalc.org/29iyo1nunqdp

Cheers

@ageru

This comment has been minimized.

Show comment
Hide comment
@ageru

ageru Aug 8, 2018

For the past few months, I have been running Prosody 0.10.2, and my users have been running ChatSecure 4.3 and latest. Right now:

  • I don't get anything out of the ordinary in the logs
  • iOS users mostly get push messages.

I says "mostly" because there are still 2 instances when the ChatSecure users don't get messages

  • One is with group chat, but that's an issue with MAM on Prosody, and it impacts Android also.
  • due to iOS closing the app after some time, which is kind of an expected issue at this stage of ChatSecure's development.

But those are outside the scope of my initial issue, wich I consider solved, so I'm closing tis bug. Thanks everyone for participating!

Here is how my server is set up to allow for push, in case this is useful to anyone:

  • Running prosody 0.10.2, but should mostly work on the 0.9 branch
  • S2S enabled ("Server-to-server" refers to any communication between servers, not just the transmission of messages between users on different servers. So it needs to be on for push to work, as push involves server-to-server communication.
  • dialback doesn't need to be enabled
  • TLS Ciphers set-up in a very specific way, but hopefully this will be solved at some point.
  • main modules enabled: mam (internal), smacks, smacks_offline, pep_vcard_avatar, csi, filter_chatstates, throttle_presence, cloud_notify
  • users running Conversations, Xabber, ChatSecure.

ageru commented Aug 8, 2018

For the past few months, I have been running Prosody 0.10.2, and my users have been running ChatSecure 4.3 and latest. Right now:

  • I don't get anything out of the ordinary in the logs
  • iOS users mostly get push messages.

I says "mostly" because there are still 2 instances when the ChatSecure users don't get messages

  • One is with group chat, but that's an issue with MAM on Prosody, and it impacts Android also.
  • due to iOS closing the app after some time, which is kind of an expected issue at this stage of ChatSecure's development.

But those are outside the scope of my initial issue, wich I consider solved, so I'm closing tis bug. Thanks everyone for participating!

Here is how my server is set up to allow for push, in case this is useful to anyone:

  • Running prosody 0.10.2, but should mostly work on the 0.9 branch
  • S2S enabled ("Server-to-server" refers to any communication between servers, not just the transmission of messages between users on different servers. So it needs to be on for push to work, as push involves server-to-server communication.
  • dialback doesn't need to be enabled
  • TLS Ciphers set-up in a very specific way, but hopefully this will be solved at some point.
  • main modules enabled: mam (internal), smacks, smacks_offline, pep_vcard_avatar, csi, filter_chatstates, throttle_presence, cloud_notify
  • users running Conversations, Xabber, ChatSecure.

@ageru ageru closed this Aug 8, 2018

@Echolon

This comment has been minimized.

Show comment
Hide comment
@Echolon

Echolon Aug 8, 2018

Better leave this issue open

Echolon commented Aug 8, 2018

Better leave this issue open

@STPKITT

This comment has been minimized.

Show comment
Hide comment
@STPKITT

STPKITT Aug 9, 2018

iOS users mostly get push messages.
I says "mostly" because there are still 2 instances when the ChatSecure users don't get messages

due to iOS closing the app after some time, which is kind of an expected issue at this stage of ChatSecure's development.

But isn't iOS closing the app the issue what push was actually implemented for in the first place? That's the main tripping hazard the ordinary end user faces & ultimately the deal breaker which keeps them on proprietary instant messaging services.
So if this issue stays closed, which issue # is the relevant one for this remaining problem?

STPKITT commented Aug 9, 2018

iOS users mostly get push messages.
I says "mostly" because there are still 2 instances when the ChatSecure users don't get messages

due to iOS closing the app after some time, which is kind of an expected issue at this stage of ChatSecure's development.

But isn't iOS closing the app the issue what push was actually implemented for in the first place? That's the main tripping hazard the ordinary end user faces & ultimately the deal breaker which keeps them on proprietary instant messaging services.
So if this issue stays closed, which issue # is the relevant one for this remaining problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment