Skip to content
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

Closing the application when go to the chat from notifications #5682

Closed
Den4ik92 opened this issue May 25, 2024 · 17 comments
Closed

Closing the application when go to the chat from notifications #5682

Den4ik92 opened this issue May 25, 2024 · 17 comments

Comments

@Den4ik92
Copy link

Description:

On the Android version single-server, when you go to chat from notifications (clicking on a message in the notification shade), the application closes completely.

Environment Information:

  • Rocket.Chat Server Version: 6.8.0
  • Rocket.Chat App Version: 4.48.0.1 single-server
  • Device Name: Motorola g84 (andoid 14), emulator pixel (android 14)
  • OS Version: andoid 14

Steps to reproduce:

  1. We receive a message notification
  2. Go to the notification shade and click on the message
  3. The RocketChat application tries to open and immediately closes.
@dnlsilva
Copy link
Contributor

dnlsilva commented Jun 7, 2024

I tested it here and couldn't reproduce it.
Can you reproduce it by building directly from the single server branch? Or just from your custom app?

@Den4ik92
Copy link
Author

Den4ik92 commented Jun 7, 2024 via email

@dnlsilva
Copy link
Contributor

dnlsilva commented Jun 7, 2024

Which setting? video conference?

@mmaxgit
Copy link

mmaxgit commented Jun 14, 2024

No, where change settings Push fcm legacy API to HTTP v1 API

@sanyappc
Copy link

I have the same problem when using Google FCM API Credentials

@Denis-Kirichenko
Copy link

I have the same problem when using Google FCM API Credentials

And how did you fix it?

@sanyappc
Copy link

sanyappc commented Jun 19, 2024

And how did you fix it?

Back to the old API

@AndrewChau
Copy link

AndrewChau commented Jun 19, 2024

Same issue for me. The "legacy notification provider" is officially downgraded as of today - https://firebase.google.com/support/faq#fcm-23-deprecation

Some references:
wix/react-native-notifications#835
wix/react-native-notifications#951

Stack trace:

Exception java.lang.RuntimeException:
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4164)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4322)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:139)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:96)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8919)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.clone()' on a null object reference
  at com.wix.reactnativenotifications.core.notification.PushNotificationProps.asBundle (PushNotificationProps.java:26)
  at chat.rocket.reactnative.CustomPushNotification.onOpened (CustomPushNotification.java:111)
  at com.wix.reactnativenotifications.RNNotificationsPackage.callOnOpenedIfNeed (RNNotificationsPackage.java:108)
  at com.wix.reactnativenotifications.RNNotificationsPackage.onActivityCreated (RNNotificationsPackage.java:65)
  at android.app.Application.dispatchActivityCreated (Application.java:387)
  at android.app.Activity.dispatchActivityCreated (Activity.java:1460)
  at android.app.Activity.onCreate (Activity.java:1770)
  at androidx.core.app.ComponentActivity.onCreate (ComponentActivity.java:86)
  at androidx.activity.ComponentActivity.onCreate (ComponentActivity.java:353)
  at androidx.fragment.app.FragmentActivity.onCreate (FragmentActivity.java:249)
  at com.facebook.react.ReactActivity.onCreate (ReactActivity.java:45)
  at chat.rocket.reactnative.MainActivity.onCreate (MainActivity.java:20)
  at android.app.Activity.performCreate (Activity.java:8975)
  at android.app.Activity.performCreate (Activity.java:8944)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1456)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4146)

Side note: I notice that the notification has some visual differences with the legacy API notification. The legacy notifications also appear as a toast message at the top when the notification first arrives but the new one doesn't.

Screenshot_20240620_014938_Gmail

@diegolmello
Copy link
Member

Does this happen on Rocket.Chat app from Google Play?
If it doesn't happen, it's a configuration issue on your side.

Pay attention to Site_Url setting on admin panel.
Make sure it's the correct url.

@Den4ik92
Copy link
Author

@diegolmello I will check it

@Den4ik92
Copy link
Author

@diegolmello
In the version from the GooglePlay, notifications do not arrive at all

@diegolmello
Copy link
Member

Are you trying to send push notifications from your whitelabel workspace to our official app or you signed in on our cloud?
You'll have to use our gateway in order to use our official app's push notifications.

@diegolmello
Copy link
Member

You can also create two users on https://open.rocket.chat and create a thread between them on #general

@Den4ik92
Copy link
Author

@diegolmello Got it, then it’s clear why there are no push notifications in the official application) I will continue to look for a solution.

@dnlsilva
Copy link
Contributor

I managed to replicate the error, I will work on a fix.

@dnlsilva
Copy link
Contributor

#5753

The fix was updated in the single server branch, I will close the issue for now.
If the error occurs again, please report it here.

@Den4ik92
Copy link
Author

@GleidsonDaniel Thank you very much, everything works great)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants