Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Browser Preview leaks WebView2 temp profiles: 5,577 folders / 46.5 GB in %LOCALAPPDATA%\Temp\github-app-browser-previews filled the system drive

未关闭
#3,874 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
desktop

调研方向

从 canvas 和 preview 面板使用的 Browser Preview 生命周期入手,然后跟踪 %LOCALAPPDATA%\Temp\github-app-browser-previews\github-app-browser-preview-* 目录的创建。重现多个预览,并验证关闭这些预览或退出应用时会删除其 WebView2 配置文件;还要检查启动时是否会处理因崩溃而遗留的目录。

由索引模型根据 Issue 内容生成。

描述

Summary

Browser Preview leaks its temporary WebView2 profile directory on every use. Each preview creates a new %LOCALAPPDATA%\Temp\github-app-browser-previews\github-app-browser-preview-XXXXXX\EBWebView\ folder (~20 MB) and never deletes it when the preview is closed or when the app exits. On my machine this accumulated 5,577 folders / 46.5 GB in ~3 days and filled the system drive to 0 bytes free, which broke unrelated software (a game could no longer write save files).

Environment

Field Value
App version 1.1.20 (%LOCALAPPDATA%\Programs\GitHub Copilot\github.exe)
OS Windows 10 Pro 25H2 (build 26200)
WebView2 Runtime 152.0.4191.66
Disk C: 200 GB, was at 0 bytes free when discovered

Steps to reproduce

  1. Use the app normally with Browser Preview (canvas / preview panels) over a few sessions.
  2. Open %LOCALAPPDATA%\Temp\github-app-browser-previews\.
  3. Observe one github-app-browser-preview-<random> folder per preview, each containing a full EBWebView profile (cache, IndexedDB, GPU cache, etc.), none of which are removed.

Measurements

PS> (Get-ChildItem "$env:LOCALAPPDATA\Temp\github-app-browser-previews" -Force).Count
5577

PS> Get-ChildItem "$env:LOCALAPPDATA\Temp" -Force | sort by size
   GB Name                        Modified
----- --------------------------- --------------------
46.47 github-app-browser-previews 9/14/2026 9:02:17 PM
 0.51 DLSS5-Swapper
 0.18 Highlights
 ...

Every folder had a LastWriteTime between 2026-09-11 and 2026-09-14, i.e. this is ~12 GB/day of growth under normal use. Each folder is roughly 20 MB and contains only EBWebView\ (the WebView2 user-data dir).

Deleting all folders older than 30 minutes freed 47.7 GB and the app kept working normally, so nothing in there is needed after the preview is closed.

Expected behavior

  • Closing a Browser Preview (or exiting the app) should delete its github-app-browser-preview-* user-data directory.
  • Ideally, on startup the app should also sweep stale directories left over from a crash.
  • Alternatively, reuse a single persistent user-data dir per app instance instead of creating a new one per preview.

Actual behavior

Directories are created per preview and never removed. Disk usage grows unbounded until the system drive is full.

Workaround

Get-ChildItem "$env:LOCALAPPDATA\Temp\github-app-browser-previews" -Force |
  Where-Object { $_.LastWriteTime -lt (Get-Date).AddMinutes(-30) } |
  Remove-Item -Recurse -Force

Filed by Copilot on behalf of the user, from a Copilot chat session that diagnosed the full disk.

主要语言
没有语言数据
星标
2.1k
派生
157
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/app 的其他 Issue

查看 github/app 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。