Skip to content

v0.16.6 - FCM crypto-key padding fix

Choose a tag to compare

@bvis bvis released this 17 Jun 23:28
88eb7ce

Fixed

  • FCM client no longer shuts down on a malformed push (#21) — some Fermax FCM data messages carry a crypto-key/encryption header whose base64 value is not a multiple of 4. Upstream firebase-messaging pads the stored key material before decoding but not these per-message headers, so urlsafe_b64decode raised binascii.Error: Incorrect padding inside the _listen loop; the library's catch-all then shut the whole FcmPushClient down, taking push notifications offline until the watchdog restarted it (and re-killing it if the message was redelivered). The integration now right-pads both headers before the upstream decrypt runs, so the affected messages decrypt normally instead of crashing the listener.

Confirmed in the wild by the reporter and verified end-to-end on a live instance.

Known issues still open: a separate FCM connectivity problem on some networks (#25) and the streaming symptom downstream of it (#22).