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

[BUG] Invalid encrypted push notification payload #1590

Open
Maartinsh opened this issue May 27, 2024 · 1 comment
Open

[BUG] Invalid encrypted push notification payload #1590

Maartinsh opened this issue May 27, 2024 · 1 comment
Labels
Communication - Chat customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@Maartinsh
Copy link

Maartinsh commented May 27, 2024

Describe the bug

I can receive push-notification in onMessageReceived#FirebaseMessagingService, but I cannot access the data. There's something inside the message, but mosty gibberish kind of data - not what I'd expect such as title/content.

Exception or Stack Trace

Not sure if this error is related, but the only thing that I see in console (might be related)
java.lang.RuntimeException: Failed to parse push notification payload: java.lang.RuntimeException: Invalid encrypted push notification payload. Dropped the request!

To Reproduce
Steps to reproduce the behavior: Happens all the time.

Code Snippet

if (remoteMessage.data.isNotEmpty()) {
    val chatPushNotification = ChatPushNotification()
        .setPayload(remoteMessage.data)

         notificationManager.azureChatNotificationReceived(
             "New Chat Message",
             "You Just Received A New Message!",
             chatPushNotification
         )
}

and later on I call:

chatThread.handlePushNotification(notification)

Expected behavior
I'd expect that I can access notification title and content with ease, but for some reason all I see is gibberish data.

Screenshots
4a23qCpL

Setup (please complete the following information):

  • OS: Android
  • IDE : Android Studio
  • Version of the Library used: v2.0.3

Additional context

Not sure why calling "chatThread.handlePushNotification(notification)" returns Exception. I think it might be related that the notification that comes in is incorrectly formatted?

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 27, 2024
@Maartinsh
Copy link
Author

@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Communication - Chat customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants