Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): report synchronous HTML browser spawn failures #21782

ClosedScottN-PV(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/21782/headopened View on GitHub

Showing 2 changed files with 70 additions and 1 deletion.

x
0 of 2 viewed, 2 left
63 additions and 1 deletionapps/server/src/htmlRender/HtmlRender.test.tsModified
View file
@@ -1,11 +1,12 @@
// @effect-diagnostics nodeBuiltinImport:off - plain local servers stand in for LAN services.
import * as NodeServices from "@effect/platform-node/NodeServices";
-import { describe, expect, it } from "@effect/vitest";
+import { assert, describe, expect, it } from "@effect/vitest";
import { EnvironmentId, ProviderInstanceId, ThreadId } from "@t3tools/contracts";
import * as McpProviderSessions from "@t3tools/provider-core/server/McpProviderSessions";
import * as HostProcess from "@t3tools/shared/HostProcess";
import * as Deferred from "effect/Deferred";
import * as Effect from "effect/Effect";
+import * as Exit from "effect/Exit";
import * as Base64 from "effect/encoding/Base64";
import * as Fiber from "effect/Fiber";
import * as FileSystem from "effect/FileSystem";
@@ -19,6 +20,7 @@
import { resolveAttachmentPathById } from "../attachmentStore.ts";
import * as ServerConfig from "../config.ts";
import * as HtmlRender from "./HtmlRender.ts";
+import { HtmlRenderBrowserError } from "./headlessChrome.ts";
import * as PreviewBrowser from "../preview/PreviewBrowser.ts";
​
const TEST_BROWSER_ENV = "T3CODE_TEST_HEADLESS_SHELL";
@@ -287,6 +289,66 @@
}),
​
+ // Windows reports ENOENT asynchronously for this path instead of throwing ENOTDIR.
+ describe.skipIf(HostProcess.Platform.defaultValue() === "win32")(
+ "when the browser spawn throws synchronously",