Host record exists in some places but not others
Fleet version: 4.73.1
Web browser and operating system: Chrome 139 on macOS 26
💥 Actual behavior
customer-gispen reports that the record in Fleet for one of their offline hosts is inaccessible. This host has been offline for ~4 months, and was accessible until recently. The host is still showing up in searches, but the actual page (i.e. the equivalent of https://dogfood.fleetdm.com/hosts/1272/details for customer-gispen's host) returns a 404 . We see a series of the following error messages for this host, which are possibly related:
{"component":"http","err":"get host mdm lock/wipe status: get unlock reference script result: : HostScriptResult <result_UUID> was not found in the datastore","level":"error","method":"GET","took":"146.512973ms","ts":"2025-09-16T21:12:13.720105842Z","uri":"/api/v1/fleet/hosts/identifier/<host_UUID>","user":"<user_email>"}
🛠️ To fix
Timebox TBD at estimation
🧑💻 Steps to reproduce
- Lock and shut down host on Fleet ~4.70.
- Upgrade Fleet to 4.73.1.
- Attempt to navigate to the host's details.
🕯️ More info (optional)
Link to folder with screenshots of the error details: https://drive.google.com/drive/folders/1NrcBSrdlkTtmLv8Jh5yZiRHsvFLyGq_C?usp=sharing
Reviewed on standup 9/18/25.
I will try and reproduce after we ship 4.73.2 and 4.74.0
@PezHub This looks similar to this older issue, which contains some more info on how to potentially reproduce this state: https://github.com/fleetdm/fleet/issues/29086
@mason-buettner A question for you if you know, would be helpful in figuring out what/how it happened, do you know what OS the host is running? I couldn't find the info in the screenshots or the unthread convo. The ticket mentions macOS but I think that's where the browser / fleet UI was running.
@mna the host is running Ubuntu 24.10, macOS was where we observed the bug in the console.
Seems like we're making assumptions on whether lock/wipe script results are going to stick around, and eventually those activities can age out. @mason-buettner does the customer have activity retention settings set to purge activities after X days?
@iansltx gispen has no customizations to clear activities that I'm aware of, but I will ask to make 100% sure. They're in managed cloud, so much of the configuration is managed by Fleet.
For the record here, no activity expiration, so our initial theory on what's going on here is likely incorrect.
I could not replicate this - see here
Perhaps this was fixed in https://github.com/fleetdm/fleet/issues/29086 ?
@juan-fdz-hawa FYI for #29086 it was specifically for Windows hosts, this one seems to be for a Linux host. Also it seems it was for a lock/unlock, and resulted in a 404 on the host's page, while the other one was for a Wipe and resulted in a 500. But the underlying cause seems similar (a host_mdm_actions row with references to command uuid/ script uuid that does not exist anymore).
Hi @juan-fdz-hawa, I'll circle back with gispen to see if they're still observing this issue. If they are, I can see about setting up a call with their team to investigate further.
Peer our discussion, closing this for now since is not reproducible.
Lost host in the cloud, Fix will guide it back home, Fleet's light shines more proud.
Re-opening this as the bug is still present for the host. It seems like the underlying issue is that we seem to be in a situation where the script results are missing in the datastore:
HostScriptResult <result_UUID> was not found in the datastore
We'll timebox it to 3 points to root cause and fix.
IIRC the issue was that one of the API calls on the details page failed due to missing records (like the host script result shown above) and that failure caused us to show a 404 in the frontend. This might have been the activities API trying to join to a non-existent record.