fix(logging): silence AUTHENTICATION_FAILED and INTERNAL_SERVER_ERROR from Bugsnag - #1437
Open
bmc08gt wants to merge 1 commit into
Open
fix(logging): silence AUTHENTICATION_FAILED and INTERNAL_SERVER_ERROR from Bugsnag#1437bmc08gt wants to merge 1 commit into
bmc08gt wants to merge 1 commit into
Conversation
… from Bugsnag
FirebaseMessaging.getToken() fails inside Play Services with
IOException("AUTHENTICATION_FAILED") or IOException("INTERNAL_SERVER_ERROR"),
wrapped as IOException("FCM Registration failed!") -> ExecutionException.
Neither code was in gmsTransientMessages, so FirebasePushTokenProvider reported
every failure. Bugsnag 6a9df0a95ab98605a9dfcb88 has 57 events from 4 devices
on 2026.8.5, 17 of them from one phone relaunching mid-onboarding.
Both strings come from GMS on the device, not app code. INTERNAL_SERVER_ERROR
is one Firebase's GmsRpc already treats as retryable. Add both, Firebase's
alternate spelling InternalServerError, and PHONE_REGISTRATION_ERROR, which
appeared once in the same group on 2026.8.4. Behaviour is unchanged: the
provider already resumes null and updateFcmToken() returns early.
isGmsTransientError is now internal so the nested exception shape is covered
by ErrorUtilsTest.
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.
Bugsnag 6a9df0a95ab98605a9dfcb88 picked up on 2026.8.5 internal: 57 events from 4 devices in three days, 17 of them from one Samsung SM-A556E relaunching mid-onboarding. The inner cause is
IOException("AUTHENTICATION_FAILED")(47) orIOException("INTERNAL_SERVER_ERROR")(10) thrown by Play Services out ofFirebaseMessaging.getToken(), wrapped by the SDK asIOException("FCM Registration failed!")->ExecutionException.ErrorUtils.gmsTransientMessagesalready dropsSERVICE_NOT_AVAILABLE,FIS_AUTH_ERROR,MISSING_INSTANCEID_SERVICEandTOO_MANY_REGISTRATIONS, each added by an earlier round of this triage (#943 and predecessors). These two codes were never added, soFirebasePushTokenProviderreports them throughErrorUtils.handleErroron every login.This is not a regression. 2026.8.5 ships Firebase BOM 34.17.0, the same as 2026.8.2 through 2026.8.4, out since Aug 20. The 34.18.0 bump is not in any tagged release. The same codes show up in the older, unwrapped groups on builds back to 2025.7.4, and
INTERNAL_SERVER_ERRORis one Firebase's ownGmsRpc.isErrorMessageForRetryableErrorretries on.Changes:
AUTHENTICATION_FAILED,INTERNAL_SERVER_ERROR, Firebase's alternate spellingInternalServerError, andPHONE_REGISTRATION_ERROR(seen once in the sibling group on 2026.8.4) togmsTransientMessages.isGmsTransientErrorinternal and cover the nestedFCM Registration failed!shape plus a negative case inErrorUtilsTest.Behaviour for users is unchanged. The provider already resumes
nullon failure andupdateFcmToken()returns early, so push stays unregistered until a later login succeeds.