Skip to content

Commit 033111e

Browse files
committed
fix(webui): keep the Mini App fixture's socket path inside the limit
A unix socket path has a hard limit — 104 bytes on macOS — and the Mini App's owner socket sits four directories below the data directory. macOS's own temporary directory is long enough that the socket path overflowed it, the bind failed with `EINVAL`, and the run reported a Mini App that could not start rather than the path that was too long. The fixture's data directory now goes to the short temporary root. Windows names the endpoint with a pipe, so its path does not matter there.
1 parent d81ceb1 commit 033111e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎packages/webui/test/integration/miniapp-real-flow-support.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ export async function closeAllBootedHosts(): Promise<void> {
6767
export async function bootRealHost(
6868
options: { readonly dev?: boolean; readonly serveBuiltClient?: boolean } = {},
6969
): Promise<Booted> {
70-
const dataDir = await mkdtemp(join(tmpdir(), "webui-miniapp-flow-"));
70+
// The Mini App's owner socket sits four directories below the data
71+
// directory, and a unix socket path has a hard limit — 104 bytes on macOS.
72+
// macOS's own temporary directory is already long enough that the socket path
73+
// overflows it, and the bind fails with `EINVAL`, so the fixture's data
74+
// directory goes to the short temporary root instead. Windows names the
75+
// endpoint with a pipe, so its path does not matter there.
76+
const dataDir = await mkdtemp(join(process.platform === "win32" ? tmpdir() : "/tmp", "wmf-"));
7177
const workspaceDir = join(dataDir, "workspace");
7278
await mkdir(workspaceDir, { recursive: true });
7379
// A config file that already exists stops `ensureConfigFile()` from copying the

0 commit comments

Comments
 (0)