Repository navigation
fix: [SDK-5682] release non-OneSignal FCM broadcasts without waiting for the deadline - #2832
Merged
Merged
Conversation
…for the deadline A data message without a custom key made getOSNotificationIdFromJson pass null into JSONObject, which throws a NullPointerException on Android. The ingress handoff then never finished and the broadcast was held until the 8s deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
📊 Diff Coverage ReportDiff Coverage Report (Changed Lines Only)Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff). Changed Files Coverage
Overall (aggregate gate)3/3 touched executable lines covered (100.0% — requires ≥ 80%) |
abdulraqeeb33
left a comment
Contributor
There was a problem hiding this comment.
approve-with-nits
The null guard is the right place, and the missing-custom path now finishes the ordered broadcast instead of waiting out the deadline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abdulraqeeb33
approved these changes
Nov 5, 2026
abdulraqeeb33
left a comment
Contributor
There was a problem hiding this comment.
The debug log is in 6bf7920. A missing custom field now finishes the broadcast and leaves a debug line.
Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Release non-OneSignal FCM broadcasts immediately instead of holding them for the 8s deadline.
Details
Motivation
Fixes #2831. Since 5.11.0, an FCM data message without a
customkey makesgetOSNotificationIdFromJsonpassnullintoJSONObject, which throws a NullPointerException on Android. The helper only catchesJSONException, sosuspendifyOnIngressswallows the NPE and skipsonSuccess, andFCMBroadcastReceiverholds the ordered broadcast until the 8sBroadcastCompletiondeadline. Apps with their ownFirebaseMessagingService(e.g. VoIP call pushes) receive their messages 8s late. 5.10.2 avoided this with a null-safeisOneSignalBundlecheck that #2712 removed.Scope
getOSNotificationIdFromJsonStringreturnsnullfor a null string, sopersistFcmreturnsfalseand the receiver finishes right away without aborting.customkey is no longer a failure, so that policy doesn't apply.Testing
Unit testing
NotificationFormatHelperTests: id fromcustom, missingcustom, non-JSONcustom,isOneSignalBundlewithoutcustom.NotificationIngressTests: FCM input without a OneSignal payload is rejected without journaling or scheduling.customtests fail with the reported NPE without the fix.Manual testing
Not tested on device. The change is a null guard covered by unit tests.
Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code