RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
2.01k stars 1.17k forks source link

Message details not shown in push notifications anymore #5496

Closed paulchen closed 1 month ago

paulchen commented 9 months ago

Description:

The notifications on my Android phone do not show any message details anymore, just the text "You have a new message", despite the server being configured to deliver message details.

Environment Information:

Steps to reproduce:

  1. Configure the server like this (Workspace -> Settings -> Push -> Privacy):

Clipboard - January 18, 2024 23_19

  1. Wait for a push notification being shown on your mobile phone.

Expected behavior:

The message is shown on the push notification, including its details.

Actual behavior:

The push notification does not contain any message details:

Screenshot_20240118_231842

Additional context:

This issue is quite new, it must have been introduced in one of the most recent versions of the Rocket.Chat server or the app.

preeesha commented 9 months ago

Hey @paulchen, thanks for pointing out the issue

@GleidsonDaniel, can I work on this issue? My approach will be to first verify whether the issue belongs to this repository or the primary mono repo of Rocket.Chat. If this issue is in the app only then I will dive into the notification pushing process and update you with results.

Thanks for your time and consideration Prisha Gupta

dnlsilva commented 9 months ago

Hey @paulchen, thanks for pointing out the issue

@GleidsonDaniel, can I work on this issue? My approach will be to first verify whether the issue belongs to this repository or the primary mono repo of Rocket.Chat. If this issue is in the app only then I will dive into the notification pushing process and update you with results.

Thanks for your time and consideration Prisha Gupta

I don't recommend working on this issue. The notification flow is a very complex flow, and we are already working on this issue internally.

dnlsilva commented 9 months ago

Hey @paulchen, can you find out if this happened after updating the app or the server? Because testing here on some servers, I realized that the problem is intermittent, showing that the problem is not really in the mobile app, because if it were on the mobile it wouldn't work any of the time. On a private server (with very few users) with these same settings it worked 100% of the time.

I'm waiting for more information.

paulchen commented 9 months ago

Hey @paulchen, can you find out if this happened after updating the app or the server?

I noticed the problem on Jan 19 in the evening. The app on my mobile phone was last updated on Jan 16.

There was no update to the server on Jan 19, but I restarted the instance twice earlier that day (due to updating MongoDB from 6.0.12 to 6.0.13 and later Docker from 24.0.7 to 25.0.0). However, all the messages that triggered the problem were sent at a later time.

Because testing here on some servers, I realized that the problem is intermittent, showing that the problem is not really in the mobile app, because if it were on the mobile it wouldn't work any of the time.

Since I reported the issue, I have received some notifications that worked as expected while others didn't.

On a private server (with very few users) with these same settings it worked 100% of the time.

My instance is a small instance on the Starter plan with 18 registered users.

loopway commented 9 months ago

similar situation here: updated rocket.chat server (starter) on January 11 from 6.4.0 to 6.5.2 (and mongodb from 4.4.21 to 6.0.12). ios app got updated on January 17 to 4.45.0. all but one (!) push notifications did not show details.

dnlsilva commented 9 months ago

similar situation here: updated rocket.chat server (starter) on January 11 from 6.4.0 to 6.5.2 (and mongodb from 4.4.21 to 6.0.12). ios app got updated on January 17 to 4.45.0. all but one (!) push notifications did not show details.

Are you having this error on iOS too? Or is your device Android?

loopway commented 9 months ago

https://github.com/RocketChat/Rocket.Chat/issues/31493 - might be the same problem.

Vaxter commented 8 months ago

similar situation here: updated rocket.chat server (starter) on January 11 from 6.4.0 to 6.5.2 (and mongodb from 4.4.21 to 6.0.12). ios app got updated on January 17 to 4.45.0. all but one (!) push notifications did not show details.

Are you having this error on iOS too? Or is your device Android?

I do have the same issue on iOS, both on iPad and iPhone. For me this has started happening once I have signed up for this free preium thing. It’s A self hosted on site instance.

matbgn commented 8 months ago

Same problem here. This started from the day we bumped Rocket.Chat Server from version 6.4.X to 6.5.X

0ki commented 8 months ago

Same. After upgrade to 6.5 notification text disappeared. Any way to debug?

diegolmello commented 8 months ago

FYI we've been investigating this issue.

matheusbsilva137 commented 8 months ago

@paulchen are you also using the Starter plan on your workspace? Or is it running a Pro/Enterprise license? You can check this in Workspace > Administration > Subscription.

paulchen commented 8 months ago

@paulchen are you also using the Starter plan on your workspace? Or is it running a Pro/Enterprise license? You can check this in Workspace > Administration > Subscription.

Starter plan.

However, in the recent days I have not encountered the problem.

matbgn commented 8 months ago

Error still happening on iOS for information

0ki commented 8 months ago

Just started working today randomly. No update to app, nor the server.

Vaxter commented 8 months ago

Same for me a couple of days ago, but it’s Really random. Some notifications have preview, and some don’t.

diegolmello commented 8 months ago

I have a possible fix on https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5596 But I need help testing from all of you, @paulchen @loopway @Vaxter @matbgn @0ki .

Here's the link to TestFlight https://testflight.apple.com/join/3gcYeoMr Build version should be 4.47.0.58428.

Thanks! Let me know if you have any questions.

paulchen commented 8 months ago

Here's the link to TestFlight https://testflight.apple.com/join/3gcYeoMr Build version should be 4.47.0.58428.

Unfortunately, I'm unable to use TestFlight.

  • Device Name: ELE-L29 (Huawei P30)
  • OS Version: EMUI 12.0.0 (Android 11)
diegolmello commented 8 months ago

@paulchen I wasn't able to reproduce the issue on Android at all. Let me know if it happens again.

matbgn commented 8 months ago

Again it happened today. I'm personally on Android, I have a colleague who is on iOS but won't be able to help with TestFlight

Vaxter commented 8 months ago

I have a possible fix on https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5596

But I need help testing from all of you, @paulchen @loopway @Vaxter @matbgn @0ki .

Here's the link to TestFlight https://testflight.apple.com/join/3gcYeoMr

Build version should be 4.47.0.58428.

Thanks!

Let me know if you have any questions.

Installed on all of my devices. I'll give it a run for a couple of days and let you know.

0ki commented 8 months ago

I'd love to test, but the problem has fully disappeared on its own, so I'm afraid I might not be able to verify the fix atm.

Vaxter commented 8 months ago

@paulchen Still happening. Now when phone is unlocked I sometimes can see the sender and content, and when locked still the same. Notifications are set up to show everything even when locked. Same on my iPad.

diegolmello commented 8 months ago

@Vaxter Thanks for the feedback. It looks exactly what I described on known bugs there, but not only after boot https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5596

I'll have to investigate deeper. I'm going to let you all know once I have more info.

diegolmello commented 8 months ago

@Vaxter Try this workaround, but might be tricky to do:

If you do it, let me know if it works forever (or until you restart). That might be what happened to @0ki

harryb303 commented 8 months ago

@diegolmello also been experiencing this issue since updating to 6.5 around the middle of January. Happens whether my iPhone is locked or unlocked. Updated to 6.6.1 today but problem persists. Installed the TestFlight build.

harryb303 commented 8 months ago

@Vaxter Try this workaround, but might be tricky to do:

* Install app from App Store

* Restart device

* Receive a push only after device is unlocked

* App is going to reuse that same valid instance to fetch content

If you do it, let me know if it works forever (or until you restart). That might be what happened to @0ki

Just tried this, reinstalled the App Store build over the TestFlight build, restarted the phone, unlocked, waited for a push notification and it showed the message content, then locked the phone and received another notification with the message content. Will report back if the issue comes back.

diegolmello commented 8 months ago

Btw there's nothing that proves 6.5 is related to this issue. Our backend team took a look at this last week and couldn't find anything.

On iOS, it's related to how MMKV is handled by iOS when phone is locked (and other behaviors). On Android, I still need to investigate.

If this issue is something that's impacting your use case negatively, you should turn off the setting until we have a fix (or try the workaround above).

ulope commented 8 months ago

I've just updated (due to being forced, I've learned to never trust RC updates because something breaks every single damn time) from 6.4.2 to 6.6.1 and now notifications all of a sudden are missing content so I'd say it'd pretty clearly related to the server version.

diegolmello commented 8 months ago

@ulope Did you have the setting enabled before the update or was it enabled for you afterwards?

ulope commented 8 months ago

I can't really say. I definitely didn't change anything except updating.

paulchen commented 8 months ago

@paulchen I wasn't able to reproduce the issue on Android at all. Let me know if it happens again.

@diegolmello The issue did not occur recently, neither for me nor for any of my users.

diegolmello commented 8 months ago

6.5 moved some workspaces to the Starter plan, which means those workspaces now have access to almost all enterprise features. Since Secure Push Notifications is enabled by default and it used to be a paid feature, now you're actually using it on Starter.

Let me know if it makes sense.

matbgn commented 8 months ago

Really annoying in fact...

harryb303 commented 8 months ago

Issue has returned this morning. Have not restarted the phone or touched the app or our server.

0ki commented 8 months ago

Issue has magically returned this morning. No app updates, no server updates. What is this? Seems like a gateway issue?

ulope commented 8 months ago

Still seeing this here as well. Users are starting to notice and complain :/

diegolmello commented 8 months ago

https://github.com/RocketChat/Rocket.Chat.ReactNative/issues/5496#issuecomment-1969053810

If this issue is something that's impacting your use case negatively, you should turn off the setting until we have a fix

Workspace -> Settings -> Push -> Privacy

image
ulope commented 8 months ago

In our instance it's not possible to disable this setting.

The toggle is disabled:

diegolmello commented 8 months ago

@ulope What plan are you on right now?

ulope commented 8 months ago

@diegolmello no plan, community edition.

matheusbsilva137 commented 8 months ago

@ulope have you been on Starter plan (or any other Premium plan) at some point recently and disabled it? Or have you always been on community?

matbgn commented 8 months ago

Is there a way to fully switchback to community?

ulope commented 8 months ago

@matheusbsilva137 Yes the upgrade to 6.6.1 auto-enrolled us to the starter plan (which I did not at all appreciate btw, overbearing marketing dark patterns like this just suck, and probably are illegal in a good number of countries I might add).

@matbgn Yes, totally intuitively you have to click the "cancel subscription" at the bottom edge of the manage subscription screen.

0ki commented 8 months ago

Notifications have randomly started working properly again this evening. No changes to client or server on our part. About 1600-1700 UTC, I'd say.

Any ideas?

0ki commented 8 months ago

What did change, is that I rebooted my phone. Hmmm.

0ki commented 7 months ago

This started working randomly at one point and broke later that same day after I updated the Rocket Chat client on iOS. Hasn't been working since.

svenseeberg commented 7 months ago

This started working randomly at one point and broke later that same day after I updated the Rocket Chat client on iOS. Hasn't been working since.

The same for us. It seems that it works for some time after restarting the service but then breaks.

diegolmello commented 7 months ago

I'm going to send a new TestFlight version in a few days. Just need to finish testing something else first. I'll be in touch.

mdoesburg commented 6 months ago

@diegolmello Any update on this? Not being to able to see message details/previews anymore (on iOS) is getting really frustrating. 😂