Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(devices): keep devices listed when simulator discovery fails #25971

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 31 commits intomain fromrefs/pull/25971/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 13 changed files with 47 additions and 16 deletions (loading 10).

x
0 of 13 viewed, 13 left
2 additions and 0 deletionsapps/server/src/device/DeviceHost.tsModified
View file
@@ -110,6 +110,8 @@
readonly detail: string | undefined;
/** Some Android virtual devices could not be listed; the rest are. */
readonly androidDiscoveryIncomplete?: boolean;
+ /** Platforms that could not be listed; their last known devices stay listed. */
+ readonly incompletePlatforms?: ReadonlyArray<DevicePlatform>;
DeviceOperationError
44 additions and 15 deletionsapps/server/src/device/DeviceHubOperations.tsModified
View file
@@ -6,6 +6,7 @@
} from "@t3tools/contracts";
import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
+import * as Option from "effect/Option";
import * as Schema from "effect/Schema";
import { HttpClient, HttpClientError, HttpClientRequest, HttpClientResponse } from "effect/http";
​
@@ -13,6 +14,11 @@
​
const BOOT_TIMEOUT = Duration.minutes(3);
const SCREENSHOT_TIMEOUT = Duration.seconds(20);
+// Let the hub's 30 s simctl timeout report its cause first.
+const LIST_TIMEOUT_SECONDS = 40;
+// expo-device-hub 0.19.1 reports a failed simulator listing only as text; its error ids are hashes.
+const SIMULATOR_LIST_FAILED =