GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(desktop): 修复预览页面加载失败时的 IPC 异常 by uiliugang · Pull Request #123 · uiliugang/t3code

Conversation

@uiliugang

@uiliugang uiliugang commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Problem

桌面内置浏览器导航到无法访问的页面时,Chromium 会发出主 frame 的 did-fail-load,同时拒绝 loadURL()。页面错误已经通过 LoadFailed 状态上报,但后一个拒绝仍被包装成 PreviewOperationError 并穿过 IPC,用户因此看到 Error invoking remote method 'desktop:preview-navigate'。

使用旧代码和真实 Electron 44.10.1,已在连接被拒绝时复现用户提供的同类报错。

Change

导航期间记录主 frame 已确认的加载失败。只有 loadURL() 的错误码与该失败一致时,才交给现有页面错误状态展示,避免重复抛出 IPC 异常。

保留跳转中断、阻止离开页面及真正的 WebContents 操作错误的现有语义;导航结束后移除临时监听器。

Scope

仅修改桌面预览管理层及现有测试,覆盖地址栏和通过该管理层导航的内置浏览器入口。Web、移动端、通信契约与权限策略无需变更。本修复处理明确可复现的错误传播缺陷。

Verification

  • vp run check:changed:格式、lint、knip、受影响包类型检查及 72 项预览管理测试通过。
  • 扩展现有用例:连接拒绝、DNS 和证书错误保留具体页面诊断;子 frame 失败、未确认的加载错误、阻止离开页面和 WebContents 异常不会被误吞。
  • 隔离的真实 Electron 验收使用源码中的 PreviewManager、预览 IPC handler 和 DesktopIpc,从渲染进程调用实际 desktop:preview-navigate。旧代码复现相同 IPC 异常;修复后返回正常,保留 ERR_CONNECTION_REFUSED (-102) 状态,同一 WebContents 随后导航并渲染正常页面。
  • 真实 Electron 验证 beforeunload 仍会拒绝导航。

运行日志和恢复页面截图已在本地保留。内置浏览器工具打开失败地址时返回 ERR_CONNECTION_REFUSED;为验证新源码,另外运行了独立 Electron 验收实例,未修改正在使用的桌面安装或用户数据。

通过内置浏览器打开 GitHub 页面时超时,截图附件未上传;本地证据未提交到仓库。

模型:gpt-6.1-sol;运行工具:Codex harness。

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
liugang59
fix(desktop): 修复预览页面加载失败时的 IPC 异常
184cfbd
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S labels Nov 14, 2026
@uiliugang
uiliugang merged commit 5f40255 into main Nov 14, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@uiliugang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.