Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Mobile Push Notifications not working properly

Open richardwlu opened this issue 10 years ago • 51 comments

Your Rocket.Chat version: 0.24

The mobile push notifications on both iOS and Android aren't pushing for some reason. Push notifications are enabled for the app on the phone and on the Rocketchat website.

Is anyone else noticing this?

richardwlu avatar Apr 04 '16 15:04 richardwlu

@richardwlu just curious if you restart the server do they start to deliver again?

geekgonecrazy avatar Apr 04 '16 15:04 geekgonecrazy

@geekgonecrazy I gave the server a restart but no changes

richardwlu avatar Apr 04 '16 16:04 richardwlu

Also have had no mobile notifications for quite a while.

twhiting avatar Apr 04 '16 16:04 twhiting

What version of the mobile app are you using? What happens when you try the test button on the admin panel?

engelgabriel avatar Apr 04 '16 20:04 engelgabriel

we are using android primarily, when I click the test button we get a "Your push was sent to one device" without a notification ever actually reaching it. I've also heard complaints about not receiving notifications on our windows electron app. (We are running via docker, could that be the issue? no idea.)

Edit: i've also tried setting up the Google cloud messaging, to no avail.

twhiting avatar Apr 04 '16 22:04 twhiting

Did you turn on DEBUG and looked into the View Logs?

engelgabriel avatar Apr 05 '16 02:04 engelgabriel

Here is what the logs said:

Push: Send message "@twhiting" via query { userId: 'xxxx...' } I20160405-17:40:11.214(0) send to token { gcm: 'xxxx...' }

Then nothing, no errors or anything.

twhiting avatar Apr 05 '16 17:04 twhiting

We are going to have to do a joint test, so we can look at the logs on our gateway to try to pin point the failure.

Can you guys upgrade to 0.25.0 before that?

engelgabriel avatar Apr 05 '16 19:04 engelgabriel

Yes, I'll update to 0.25.0 and will let you all know once its complete.

richardwlu avatar Apr 05 '16 19:04 richardwlu

I was already on .25 what do you need from me @engelgabriel ?

twhiting avatar Apr 06 '16 17:04 twhiting

Can you send a screenshot of your Push Notifications settings from the admin, blurring any keys, obviously.

engelgabriel avatar Apr 06 '16 17:04 engelgabriel

capture

capture2

This is what I've found following the guide I've found in the wiki. https://github.com/RocketChat/Rocket.Chat/wiki/Mobile-Notifications-Gateway-Configuration

GCM might require me to authenticate my server? I've tried to do this via the meta Google Site Verification setting, but with no luck. Another way to verify is to put an html page google generates in the root directory (https://chat..com/google-verify.html) but how would I go about doing that via a docker container?

twhiting avatar Apr 06 '16 18:04 twhiting

I figured out my issue. I was referencing my server as a gateway when I do not have it set up correctly to be one. Using https://rocket.chat as a gateway fixed the issue for me and push notifications now work. I'm not sure if it fixes the other guy's problem to tho. (Found answer in issue #2431)

twhiting avatar Apr 07 '16 17:04 twhiting

Thanks @twhiting! Glad to hear that!

Hey @richardwlu can you send a screenshot of your Push Notifications settings from the admin, blurring any keys, obviously.

engelgabriel avatar Apr 07 '16 17:04 engelgabriel

@engelgabriel Sure thing! Sorry, I've been pressed on available time.

screen shot 2016-04-07 at 12 54 28 pm

2016-04-07 17:45:21 586: [methods] push_test -> userId: xxx , arguments: {} 2016-04-07 17:45:22 210: Push: Send message "@richlu" via query { userId: 'xxx' } 2016-04-07 17:45:22 211: send to token { apn: 'xxx' }

The Test Push Notification To My User works as I am receiving it on my iOS device; however, notifications are not working besides test push. We tried direct messages and setting push notifications to All

richardwlu avatar Apr 07 '16 17:04 richardwlu

Can confirm, neither are any other push notifications working on our end besides just a test push. I didn't think to check that once I had a successful test push.

twhiting avatar Apr 07 '16 18:04 twhiting

This sounds odd, but try to click the Logout from other logged in locations under My Account->Profile. Then log in via your phone, go offline, actually close your opened instance of Rocket.chat, and then have someone private message you. Just to see if for some reason there is an open session which is causing you to not get the notifications since the test push is working.

graywolf336 avatar Apr 07 '16 18:04 graywolf336

@graywolf336 Ok, we tried that and found out:

  1. Logging out of the other instances, logging back into mobile app, and closing the web browser session pushes to iOS successfully from a direct message
  2. After that successful push, I opened a web browser session and a push from a direct message was unsuccessful
  3. Then, I closed the web browser session and another push from a direct message was unsuccessful

richardwlu avatar Apr 07 '16 18:04 richardwlu

So that is working correctly. You are not expected to get push notification when you are already online on other devices.

engelgabriel avatar Apr 07 '16 19:04 engelgabriel

@engelgabriel When we used Slack, if you didn't recieve a notification on your computer (whether you were running it or not) eventually it would send a push notification to your phone to notify you since we are obviously away from our computer at that point. This type of behaviour would be highly appreciated for us. We never log out of rocket.chat on our computers because they are on all the time (so we can remote into them from home) therefore, we will never get push notifications.

twhiting avatar Apr 07 '16 19:04 twhiting