Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

capture: 0 assets cataloged when the cookie banner click reloads the page

Đang mở
#4,923 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@santhiprakash đang làm issue này rồi.

Từ ngày 3/10/2026.

  • #4949 của @santhiprakash — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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):

  1. captureScrollScreenshots clicks consent buttons before scrolling. On the site I tested, [class*="consent"] button matches the close button of the cookie dialog (an "acconsento" banner), and clicking it reloads the page.
  2. The next page.evaluate in 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").
  3. catalogAssets then 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.

Ngôn ngữ chính
TypeScript
Star
54.1k
Fork
4.9k
Merge trung bình
7 giờ 29 phút
Pull request đã merge (30 ngày)
778

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của heygen-com/hyperframes

Tất cả issue của heygen-com/hyperframes

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.