-
Notifications
You must be signed in to change notification settings - Fork 475
PushError$MalformedMessage: parsing encrypted message failed: java.util.NoSuchElementException: Key body is missing in the map. #6415
Comments
@jonalmeida Saw that happen in a Beta migration build. Since it is "info" level I am not sure if we need to act on it? |
Sentry issue: FENIX-FENNEC-BETA-2A |
Yes, this is the same as I mentioned here: #6418 (comment) |
@jonalmeida seeing a lot of this in regular Fenix builds (https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/7577599/) - are you sure this is normal? Seems like a mismatch of expectations to me. |
The errors say we received a valid AutoPush message (because it containers the 'chid' value) but we don't have a 'body'. We drop the messages at the push service level since we're not able to decrypt a message without a body. I can verify this with @jrconlin but I believe there's not much we can do with a message that does not have these three values, the other two are optional. If it was an optional value, following the code through to the native layer, we would hit this call which would lead to a TranscodingError when we try to base64 decode it first. In the Fenix 4.1 release, we have WebPush enabled so iirc, there are WebPush implementations in the wild that do not follow the standard, but that might just be one of many possibilities. I'll double-check this on Monday. |
Looking at the AutoPush FCM router, I think my memory is accurate. We need to always have |
Why are we getting push messages, from autopush, without |
So it turns out that there is the potential for an empty "tickle" push message. There are a few use cases for these (including encryption testing, since they can be delivered without any ECE encryption, and thus removing one thorny variable from the mix). The function of these "tickle" messages with the app is basically an empty "poke" event. This message should have no encryption header info, nor any body. I believe this could be resolved by having either the Kotlin or the lower rust code check to see if there is no header data and no body and return an empty binary array. |
At the least we should not report an info message and just ignore it otherwise this will go crazy on production. |
This should be fixed now. I'm monitoring sentry to see if the crashes go down when we have a new build for fenix. |
Looking at our crashes, the MalformedMessage no longer shows up in large amounts on Fenix nightly. Closing this as fixed with the changes that landed. We have also removed the nightly-only flag from WebPush integration: mozilla-mobile/fenix#9338 |
https://sentry.prod.mozaws.net/operations/firefox-beta/issues/7662509/
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: