fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.07k stars 426 forks source link

MacOS device stuck on failed status unable to remove policy that is no longer applied #21713

Open BillysCoolJob opened 1 month ago

BillysCoolJob commented 1 month ago

Fleet version: 4.55.1

Web browser and operating system: Chrome 127.0.6533.89 on Windows 11


💥  Actual behavior

Occasionally, when removing a MacOS .mobileconfig file from a device, the profile is unable to be removed and returns the following error: Failed to remove: MDMClientError (89): Profile with identifier 'profile.name.here' not found.

🧑‍💻  Steps to reproduce

  1. Add .mobileconfig file to machine through the Controls > OS Settings > Custom Settings
  2. Remove .mobileconfig file quickly before it has fully applied to device.
  3. Clicking resend on the profile immediately fails.

🕯️ More info (optional)

I believe this is happening because the profile has not yet been fully applied to the device before it is attempted to be removed.

georgekarrv commented 1 month ago

Thanks for adding this, we will take a look into fixing this soon!

BillysCoolJob commented 1 month ago

Workaround is to apply an empty policy with the same name and identifier, wait for it to apply fully, then remove.