diff --git a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx index 2c58616dd7..caf7de07a8 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx @@ -290,7 +290,12 @@ const DeviceUserPage = ({ // Only set timer if not already running if (!refetchStartTime) { - if (responseHost.status === "online") { + // Here and below: iOS/iPadOS refetches use MDM commands which can be slower/less predictable + // than osquery. Don't show an error, just reset and let the user try again. + const isIOSOrIPadOS = + responseHost.platform === "ios" || + responseHost.platform === "ipados"; + if (responseHost.status === "online" || isIOSOrIPadOS) { setRefetchStartTime(Date.now()); setTimeout(() => { refetchHostDetails(); @@ -306,7 +311,10 @@ const DeviceUserPage = ({ } else { const totalElapsedTime = Date.now() - refetchStartTime; if (totalElapsedTime < 180000) { - if (responseHost.status === "online") { + const isIOSOrIPadOS = + responseHost.platform === "ios" || + responseHost.platform === "ipados"; + if (responseHost.status === "online" || isIOSOrIPadOS) { setTimeout(() => { refetchHostDetails(); refetchExtensions(); @@ -319,11 +327,17 @@ const DeviceUserPage = ({ ); } } else { + // Timeout reached (3 minutes) resetHostRefetchStates(); - renderFlash( - "error", - "We're having trouble fetching fresh vitals for this host. Please try again later." - ); + const isIOSOrIPadOS = + responseHost.platform === "ios" || + responseHost.platform === "ipados"; + if (!isIOSOrIPadOS) { + renderFlash( + "error", + "We're having trouble fetching fresh vitals for this host. Please try again later." + ); + } } } } else {