chatwoot / chatwoot-mobile-app

Mobile app for Chatwoot - React Native
https://www.chatwoot.com/mobile-apps
MIT License
584 stars 262 forks source link

Push Notifications Not Working in Custom Mobile App with Self-Hosted Server #778

Open avinash-marsdevs opened 1 month ago

avinash-marsdevs commented 1 month ago

Describe the Bug Push notifications are not working in our custom Chatwoot mobile app connected to a self-hosted Chatwoot server. Despite updating the ANDROID_BUNDLE_ID, setting the ENABLE_PUSH_RELAY_SERVER environment variable to true/false, and updating the FCM_SERVER_KEY and Google services JSON for Android, push notifications fail to be received.

To Reproduce Steps to reproduce the behavior:

  1. Update the server with the new FCM_SERVER_KEY, ANDROID_BUNDLE_ID, and set ENABLE_PUSH_RELAY_SERVER to true.
  2. Update the mobile app with the new Google services JSON.
  3. Send a message to trigger a push notification.
  4. Notice that the notification does not appear on the device.

Expected Behavior Expected that the push notifications would be received on the device whenever a new message is sent or received in the app.

Observed Behavior No push notifications are received on the device. No relevant error messages appear in the server logs, indicating a silent failure or misconfiguration.

Environment

Additional Context All required configurations and environmental variables have been updated as per the documentation.

linear[bot] commented 1 month ago

PR-1074 Push Notifications Not Working in Custom Mobile App with Self-Hosted Server

gicellamare commented 1 week ago

Same problem here

fabioginzel commented 1 week ago

+1

avinash-marsdevs commented 1 week ago

its started working fine after I did ENABLE_PUSH_RELAY_SERVER = false

then its started working fine. but now FCM was deprecated so need to upgrade 3.10.0. will have to check again anyhow

muhsin-k commented 1 week ago

If you're using the official mobile app, push notifications should function without problems. Be sure that the environment variable ENABLE_PUSH_RELAY_SERVER is set to true. In the latest version 3.10, we've included FCM HTTP v1 updates. Additionally please upgrade the mobile app to version 1.0.41.

laianeramos commented 1 week ago

Hi! In version 3.10 and mobile app 1.0.41, do I just need to set ENABLE_PUSH_RELAY_SERVER to true? Or do I need do add FCM_SERVER_KEY and ANDROID_BUNDLE_ID too? Where can I get this ids/keys? thank you

If you're using the official mobile app, push notifications should function without problems. Be sure that the environment variable ENABLE_PUSH_RELAY_SERVER is set to true. In the latest version 3.10, we've included FCM HTTP v1 updates. Additionally please upgrade the mobile app to version 1.0.41.

muhsin-k commented 1 week ago

@laianeramos FCM changes are only necessary for users who have a custom-branded mobile app. A detailed guide for this will be created soon.