Android: after upgrading to 4.95, the TEMPORARY_FOR_MIGRATION placeholder is sent to Google as an app
Fleet versions
- Discovered: 4.95.0 RC (rc-minor-fleet-v4.95.0, f4c34e5bbf), upgraded from 4.94.0 RC (7dcab65fcd)
- Reproduced:
Web browser and operating system:
💥 Actual behavior
The 4.95 migration (20261102142138_AddHostAndroidSoftwareInstalls) adds a placeholder row with the app ID TEMPORARY_FOR_MIGRATION for every existing Android host. Its job is to make Fleet re-send each phone's app list once after the upgrade, because Fleet didn't track which apps it had sent before 4.95.
On the first app sync after the upgrade, Fleet sends that placeholder to Google as if it were a real app, twice per Android host:
In the host's app list (policy update), as an AVAILABLE app. In a removePolicyApplications request: {"packageNames": ["TEMPORARY_FOR_MIGRATION"]}. Google returned 200 for both, and the real apps behaved correctly, so nothing broke. But a fake app ID shouldn't reach Google.
🛠️ Expected behavior
The placeholder still forces the one-time re-send, but it's never included in what Fleet sends to Google.
🧑💻 Steps to reproduce
These steps:
- [ ] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [x] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- On a 4.94 server, turn on Android MDM and enroll an Android phone (I used a personal Pixel with a work profile).
- Add a few Google Play apps to the phone's fleet.
- Upgrade the server to 4.95 and run the migrations.
- Within about 30 seconds of starting the server, the app sync runs. Check what was sent:
SELECT created_at, status_code, COALESCE(JSON_EXTRACT(payload, '$.policy.applications[*].packageName'), JSON_EXTRACT(payload, '$.packageNames')) AS apps FROM android_policy_requests WHERE payload LIKE '%TEMPORARY_FOR_MIGRATION%' ORDER BY created_at; - You'll see two requests: the app list including TEMPORARY_FOR_MIGRATION, then a remove request for it.
🕯️ More info (optional)
- My results: app list ["com.microsoft.skydrive", "com.Slack", "us.zoom.videomeetings", "TEMPORARY_FOR_MIGRATION", "com.fleetdm.agent"] (200), then {"packageNames": ["TEMPORARY_FOR_MIGRATION"]} (200).
- Likely cause: since #57752, the app sync treats any install row that isn't in the host's app list as "to remove". It adds those apps back to the app list and then sends a remove request for them. Nothing skips the placeholder row, so it goes through the same path.
- Google's docs for removePolicyApplications say unknown entries are ignored, so the remove request is harmless. It's not clear whether an unknown package in the app list could cause any noise on the device, for example a non-compliance report.
- Low impact: it happens once per Android host, right after the upgrade. Discussed with Jonathan and Andrey; both agree it's a harmless bug, to be triaged.
- Found while testing #33062.