This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
Confirm whether uaids are being dropped on 404/410 from bridged servers. #1444
Labels
3
Estimate - m - This is a small change, but there's some uncertainty.
Based on this comment, it's my understanding that when the FCM server responds with a
404
or410
status code, the intended behavior of the autopush server is to drop the corresponding uaid record and all its subscriptions. The logic for doing so lives in_router_fail_err
here:autopush/autopush/web/base.py
Lines 336 to 346 in a459c88
It's not clear whether this logic is not triggering correctly.
Based on FxA server logs, we're definitely seeing
404
and/or410
responses when trying to send push messages to mobile clients, since FxA logs a specific "subscription expired" event in this case.I also took a look in grafana for events of type
autopush.notification.bridge.error[reason:recipient_gone]
, which would correspond to theFCMNotFoundError
error type:autopush/autopush/router/fcm_v1.py
Lines 177 to 183 in 2f08e88
I am able to see a small but steady rate of such errors. So I think it's clear that such errors are in fact happening.
However...
If I look in grafana for events of type
autopush.notification.bridge.error[reason:unregistered]
as would be emitted alongside thedrop_user
call above, I do not see any events at all forplatform:fcm
. In fact the only instances of such an event are forplatform:gcm
, which may be coming from this different codepath that emits a similarly-named event.I also believe that the current appservices push component would fail if its uaid record were to be discarded by the server, since I can't find any codepaths that would recover from such a state. But we haven't observed any devices that seem to be in such a state in the wild.
So I'm wondering if the
drop_user
logic linked above is working correctly, or whether it might be failing to trigger in practice. The observed behaviour of mobile push clients in the wild suggests some instances where the autopush server believes a subscription is valid but the FxA server does not, and a failure to drop subscriptions on404
/410
could explain that.The text was updated successfully, but these errors were encountered: