capture: 0 assets cataloged when the cookie banner click reloads the page
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start at the capture entry point used by npx hyperframes capture and trace captureScrollScreenshots, catalogAssets, and their page.evaluate calls. Reproduce with the command and a site whose consent click reloads the page, then compare the catalog and asset-download results across runs. Done means the reload no longer leaves cataloging with an empty page or the observed null error.
由索引模型根据 Issue 内容生成。
描述
On some sites hyperframes capture downloads no images at all. The JSON output has one warning:
"Asset catalog is empty — no images will be downloaded. The page may use non-standard image loading."
The images are plain <img src> tags, so that's not it. The page reloads in the middle of the capture.
Still happens on 0.8.113 (latest today), default flags, 5 runs on the same URL:
- 2 runs: "Asset catalog is empty"
- 1 run: capture failed with
Cannot read properties of null (reading 'innerHTML'), which looks like the same reload hitting a different step - 1 run: 15 images but no logo
- 1 run: everything, logo included
What I see (traced on 0.8.20, the consent click and the catalog step look the same in 0.8.113):
captureScrollScreenshotsclicks consent buttons before scrolling. On the site I tested,[class*="consent"] buttonmatches the close button of the cookie dialog (an "acconsento" banner), and clicking it reloads the page.- The next
page.evaluatein the screenshot step throws because of the navigation. The error isn't a timeout, so it gets swallowed and the step returns nothing ("0 scroll screenshots captured"). catalogAssetsthen runs on the reloading page. I added a probe before each step: 21<img>right after navigation, 0 when the catalog runs (body scrollHeight 0), 20 again a few seconds later at "Extracting HTML & CSS".
extracted/page.html comes out complete, which made this confusing at first. Only the catalog sees the empty page.
On 0.8.20 it's worse: 0 of 5 runs catalog anything. It's a race, and on this site the reload usually wins.
This one line before progress("design", "Cataloging assets...") fixes the catalog for me on 0.8.20, 33 assets in 5 of 5 runs (I haven't patched 0.8.113):
await page1.waitForNetworkIdle({ idleTime: 500, timeout: 15e3 }).catch(() => {});
Waiting for the navigation right after the consent clicks would probably be cleaner. I haven't tried that.
A second thing I hit on the same site, possibly separate: with the default 120 s --capture-budget, core extraction sometimes uses the whole budget. The page has four videos, one of them 4K, and my guess is the video download eats it, but I didn't measure that. The assets phase then reports degraded with remainingMs: 0 and downloads nothing, even after the fix above. With the fix plus --capture-budget 300000, 0.8.20 got images and the logo in 3 of 3 runs. It might help to download images before videos, since images are small and the logo is often the thing people want.
Repro:
npx [email protected] capture --json --skip-vision -o out <url>
I can share the URL privately if that helps. It's a client's site.
- 主要语言
- TypeScript
- 星标
- 54.1k
- 派生
- 4.9k
- 平均合并
- 7 小时 29 分钟
- 30 天内合并 PR
- 778
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
heygen-com/hyperframes 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
heygen-com/hyperframes#5027 ·
维护者通常 1 天内回复
-
fix(producer): propagate useGpu to HDR layered streaming encoder可能已有人在做 @Monster-GM 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 87/100
heygen-com/hyperframes#5002 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
heygen-com/hyperframes#4702 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Studio catalog prompt editor has no accessible name可能已有人在做 @lorenzozanee 于 12 天前认领。 未关闭bug difficulty/easy triage/ready
难度 2/5 1-3 小时 新手友好度 78/100
heygen-com/hyperframes#4384 ·
维护者通常 1 天内回复
-
lint: validate composition variables declared on supported root elements可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug difficulty/easy triage/ready
难度 2/5 1-3 小时 新手友好度 88/100
heygen-com/hyperframes#4383 ·
维护者通常 1 天内回复
查看 heygen-com/hyperframes 的全部 Issue
相似的 Issue
-
dx hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
cloudflare/agents#2498 ·
维护者通常 1 天内回复
-
Missing repro Platform: Android
难度 2/5 1-3 小时 新手友好度 78/100
software-mansion/react-native-reanimated#10816 · 2 条评论 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
维护者通常 1 天内回复