OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
608 stars 205 forks source link

[Bug]: Unsupported value: 'OSNotification' #761

Open Toolenaar opened 9 months ago

Toolenaar commented 9 months ago

What happened?

When trying to open the app from a grouped push message the app crashes, on both ios and android. The push is send from backend service using the node api. The crash happens when I set the thread_id and android_group. When I dont set these values the app opens correctly.

Steps to reproduce?

1. Send a push message setting the thread_id or android_group.
2. Open the app from this push message

What did you expect to happen?

The app opens and push messages are parsed correctly.

OneSignal Flutter SDK version

5.0.2

Which platform(s) are affected?

Relevant log output

Unsupported value: 'OSNotification{notificationExtender=null, groupedNotifications=null, androidNotificationId=0, notificationId='24219fdc-eae3-4493-8794-6a2887cc88a1', templateName='null', templateId='null', title='Getalenteerde Kangoeroe', body='Ddrt', additionalData={"contentId":"K1VWMmcNujf6f1wxXsor","type":"new_message"}, smallIcon='null', largeIcon='null', bigPicture='null', smallIconAccentColor='null', launchURL='null', sound='nil', ledColor='null', lockScreenVisibility=0, groupKey='K1VWMmcNujf6f1wxXsor', groupMessage='null', actionButtons=null, fromProjectNumber='451391240989', backgroundImageLayout=null, collapseId='null', priority=4, rawPayload='{"google.delivered_priority":"normal","google.sent_time":1696667473935,"google.ttl":259200,"google.original_priority":"normal","custom":"{\"a\":{\"contentId\":\"K1VWMmcNujf6f1wxXsor\",\"type\":\"new_message\"},\"i\":\"24219fdc-eae3-4493-8794-6a2887cc88a1\"}","grp":"K1VWMmcNujf6f1wxXsor","pri":"4","vib":"0","vis":"0","chnl":"{\"dscr\":\"Bubbel chat\",\"grp_nm\":\"Bubble Chat\",\"grp_id\":\"OS_387f188a-cd33-46a2-8920-7301e860d649\",\"id\":\"OS_e33b2ac9-a9f0-4f2c-a0dc-364818c87ca9\",\"nm\":\"bubbel-chat\"}","from":"451391240989","alert":"Ddrt","sound":"nil","title":"Getalenteerde Kangoeroe","google.message_id":"0:1696667473941092%9349fde9f9fd7ecd","google.c.sender.id":"451391240989"}'}' of type 'class com.onesignal.notifications.internal.Notification'

Code of Conduct

emawby commented 9 months ago

@Toolenaar Hello thank you for reporting, I am not able to reproduce this are you able to reproduce on 5.0.3? Does your app need to be in a particular state?

nasrulgunawan commented 8 months ago

I encountered the same issue. @emawby, here are the steps to reproduce it:

  1. Set android_group
  2. Push at least 2 notifications with the same group.
  3. Click on grouped notifications, and the mentioned error occurs.

OneSignal version: 5.0.3