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

App no longer receives push after updating to 6.0.5 - (Related: App crashes on Android 14 when receiving chat push message) #5019

Closed
fn-jsonjuliane opened this issue Oct 23, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@fn-jsonjuliane
Copy link

fn-jsonjuliane commented Oct 23, 2023

Describe the bug
After upgrading to 6.0.5, Android 14 devices are no longer receiving push notification.
Might be related to: #4995

SDK version

  • 6.0.5

To Reproduce
Steps to reproduce the behavior:

  1. Test push notification on device (with Android 14) that is using sdk version 6.0.3, the app will crash upon receiving push notification.
  2. Test push notification on device (with Android 14) that is using SDK version 6.0.5, the app will no longer receive push notification.

Expected behavior

  1. The app should be able to receive push notification without crashing on Android 14

Device:

  • Vendor and model: Emulated device
  • Android version: Android 14
@fn-jsonjuliane fn-jsonjuliane added the bug Something isn't working label Oct 23, 2023
@DanielNovak
Copy link
Contributor

Thank you for reporting the issue. We will look into it today.

@DanielNovak
Copy link
Contributor

We are not able to reproduce it. But we are seeing some cases where the messages get delivered with a delay of even few minutes (this could be the result of FCM de-prioritisation based on usage patterns / testing: https://firebase.google.com/docs/cloud-messaging/android/message-priority#using_high_priority_messages_for_android).

Do you maybe have logs from the device? When you send the message - do you see any log movement on the device which isn't receiving the push message? (I was wondering if maybe the push message is received but for some reason dropped).

@fn-jsonjuliane
Copy link
Author

May I ask if you got any specifics on what to look for in the logs or at least some filter I can utilize?

I've recorded my testing, please refer to the scenario below.

  1. Used stream version 6.0.3
PN.-.Crash.mp4

Scenario:

  1. Received a push notificaion

  2. Crash with android.app.InvalidForegroundServiceTypeException: Starting FGS with type none callerApp=ProcessRecord{9c477c0 959:xxxxxxxxxxxxxxx/u0a650} targetSDK=34 has been prohibited

  3. Used stream version 6.0.4

PN.-.No.Crash.mp4

Scenario:

  1. No push notification received
  2. Able to receive events through client.subscribe()

I'll follow up with the logs, I just need to know more info on what to look for.

@DanielNovak
Copy link
Contributor

Can you try the same test with 6.0.5 but with the application in background? We don't process or display push notifications if the application is in foreground since 6.0.4. Here is the change: #4979. This behaviour can be changed in NotificationConfig but in general and for performance reason the default setting makes more sense because if the application is in foreground and the websocket is connected then the same messages are also delivered through the websocket.

public data class NotificationConfig @JvmOverloads constructor(
...
    /**
     * Push notifications are ignored and not displayed when the user is online (when there is an
     * active WebSocket connection). Set to false if you would like to receive and handle push
     * notifications even if user is online. Default value is true.
     */
    val ignorePushMessagesWhenUserOnline: Boolean = true,
...

@fn-jsonjuliane
Copy link
Author

@DanielNovak, apologies for missing this part of the update. Everything works as expected now, we can close this thread.
Thanks a lot for the help!

@DanielNovak
Copy link
Contributor

No worries. We could have communicated the change a bit better :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants