[PR #3391] Update NotificationPayload to handle null values #4192

Closed
opened 2025-11-26 23:41:29 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/3391

State: closed
Merged: Yes


🎟️ Tracking

N/A

📔 Objective

This PR resolves a crash found in Crashlytics:

    Fatal Exception: kotlinx.serialization.MissingFieldException: Fields [Id, RevisionDate] are required for type with serial name 'com.x8bit.bitwarden.data.platform.manager.model.NotificationPayload.SyncCipherNotification', but they were missing at path: $
       at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:95)
       at kotlinx.serialization.json.Json.decodeFromString(Json.kt:165)
       at com.x8bit.bitwarden.data.platform.manager.PushManagerImpl.onMessageReceived(PushManagerImpl.kt:347)
       at com.x8bit.bitwarden.data.platform.manager.PushManagerImpl.onMessageReceived(PushManagerImpl.kt:125)
       at com.x8bit.bitwarden.data.push.BitwardenFirebaseMessagingService.onMessageReceived(BitwardenFirebaseMessagingService.kt:23)
       at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(FirebaseMessagingService.java:243)
       at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(FirebaseMessagingService.java:193)
       at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(FirebaseMessagingService.java:179)
       at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(FirebaseMessagingService.java:168)
       at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$com-google-firebase-messaging-EnhancedIntentService(EnhancedIntentService.java:82)
       at com.google.firebase.messaging.EnhancedIntentService$$ExternalSyntheticLambda1.run(D8$$SyntheticClass)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.3.0:2)
       at java.lang.Thread.run(Thread.java:1012)
        

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes
**Original Pull Request:** https://github.com/bitwarden/android/pull/3391 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking N/A ## 📔 Objective This PR resolves a crash found in Crashlytics: ``` Fatal Exception: kotlinx.serialization.MissingFieldException: Fields [Id, RevisionDate] are required for type with serial name 'com.x8bit.bitwarden.data.platform.manager.model.NotificationPayload.SyncCipherNotification', but they were missing at path: $ at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:95) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:165) at com.x8bit.bitwarden.data.platform.manager.PushManagerImpl.onMessageReceived(PushManagerImpl.kt:347) at com.x8bit.bitwarden.data.platform.manager.PushManagerImpl.onMessageReceived(PushManagerImpl.kt:125) at com.x8bit.bitwarden.data.push.BitwardenFirebaseMessagingService.onMessageReceived(BitwardenFirebaseMessagingService.kt:23) at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(FirebaseMessagingService.java:243) at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(FirebaseMessagingService.java:193) at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(FirebaseMessagingService.java:179) at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(FirebaseMessagingService.java:168) at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$com-google-firebase-messaging-EnhancedIntentService(EnhancedIntentService.java:82) at com.google.firebase.messaging.EnhancedIntentService$$ExternalSyntheticLambda1.run(D8$$SyntheticClass) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.3.0:2) at java.lang.Thread.run(Thread.java:1012) ``` ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
GiteaMirror added the pull-request label 2025-11-26 23:41:29 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#4192