惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
H
Help Net Security
腾讯CDC
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
D
Docker
V
V2EX
Last Week in AI
Last Week in AI
G
Google Developers Blog
IT之家
IT之家
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(browser): ignore handled route navigation races · ope...
steipete · 2026-04-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai

1313
1414

### Fixes

1515
16+

- Browser/Playwright: ignore benign already-handled route races during guarded navigation so browser-page tasks no longer fail when Playwright tears down a route mid-flight. (#68708) Thanks @Steady-ai.

1617

- Browser/Linux: detect Chromium-based installs under `/opt/google`, `/opt/brave.com`, `/usr/lib/chromium`, and `/usr/lib/chromium-browser` before asking users to set `browser.executablePath`. (#48563) Thanks @lupuletic.

1718

- MCP/CLI: retire bundled MCP runtimes at the end of one-shot `openclaw agent` and `openclaw infer model run` gateway/local executions, so repeated scripted runs do not accumulate stdio MCP child processes. Fixes #71457.

1819

- OpenAI/Codex image generation: canonicalize legacy `openai-codex.baseUrl` values such as `https://chatgpt.com/backend-api` to the Codex Responses backend before calling `gpt-image-2`, matching the chat transport. Fixes #71460.

Original file line numberDiff line numberDiff line change

@@ -345,6 +345,34 @@ describe("pw-session createPageViaPlaywright navigation guard", () => {

345345

expect(pageClose).not.toHaveBeenCalled();

346346

});

347347
348+

it("ignores already-handled route races during guarded navigation", async () => {

349+

const { pageGoto, pageClose, getRouteHandler, mainFrame } = installBrowserMocks();

350+

const route = createMockRoute({

351+

continue: vi.fn(async () => {

352+

throw new Error("Route is already handled");

353+

}),

354+

});

355+

pageGoto.mockImplementationOnce(async () => {

356+

await dispatchMockNavigation({

357+

getRouteHandler,

358+

mainFrame,

359+

url: "https://example.com",

360+

route,

361+

});

362+

return null;

363+

});

364+
365+

const created = await createPageViaPlaywright({

366+

cdpUrl: "http://127.0.0.1:18792",

367+

url: "https://example.com",

368+

});

369+
370+

expect(created.targetId).toBe("TARGET_1");

371+

expect(route.continue).toHaveBeenCalledTimes(1);

372+

expect(pageGoto).toHaveBeenCalledTimes(1);

373+

expect(pageClose).not.toHaveBeenCalled();

374+

});

375+
348376

it("propagates unsupported redirect protocols as navigation errors", async () => {

349377

const { pageGoto, pageClose, getRouteHandler, mainFrame } = installBrowserMocks();

350378

mockBlockedRedirectNavigation({

Original file line numberDiff line numberDiff line change

@@ -818,6 +818,18 @@ export async function assertPageNavigationCompletedSafely(

818818

}

819819

}

820820
821+

async function continueRouteSafely(route: Route): Promise<void> {

822+

try {

823+

await route.continue();

824+

} catch (err) {

825+

const message = err instanceof Error ? err.message : "";

826+

if (message.includes("Route is already handled")) {

827+

return;

828+

}

829+

throw err;

830+

}

831+

}

832+
821833

export async function gotoPageWithNavigationGuard(

822834

opts: {

823835

cdpUrl: string;

@@ -841,7 +853,7 @@ export async function gotoPageWithNavigationGuard(

841853

const isSubframeDocument =

842854

!isTopLevel && isSubframeDocumentNavigationRequest(opts.page, request);

843855

if (!isTopLevel && !isSubframeDocument) {

844-

await route.continue();

856+

await continueRouteSafely(route);

845857

return;

846858

}

847859

try {

@@ -859,7 +871,7 @@ export async function gotoPageWithNavigationGuard(

859871

}

860872

throw err;

861873

}

862-

await route.continue();

874+

await continueRouteSafely(route);

863875

};

864876
865877

await opts.page.route("**", handler);