EveryListedPageBecomesInteractiveWithoutAnError fails on WebKit when the PDF viewer starts a fetch while it is left

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

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

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

Từ ngày 2/12/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

HostE2ETests.EveryListedPageBecomesInteractiveWithoutAnError fails on WebKit in WebAssembly now and then, on both tries, when it leaves the PDF viewer (job 143529478062, v-11.0.0 as released):

/e2e/pdf-viewer: raised an error while it was left (Fetch API cannot load http://localhost:5290/samples/pdf-not-a-pdf.pdf due to access control checks.)

#15565 was the same failure. Its fix excuses this message only for a request the browser reported failing after the navigation away began (cutOff), but in this case the browser reports no request at all.

Cause: WebKit's own behavior. While the navigation away is provisional, WebKit fails any load the page being left starts before it reaches the network (CachedResource::load, "Failed security check -- state is provisional"). CachedResourceLoader::requestResource then turns that synchronous cancellation into an access control error ("Synchronous cancellations are likely due to access control"), which DocumentThreadableLoader logs as "Fetch API cannot load ... due to access control checks". On a slow runner the PDF viewer page is still starting its sample fetches when it is left, sometimes before the navigation request and sometimes after.

Evidence

  • A targeted test holds the next document's response back for 3 s, so the navigation stays provisional, and has the page being left call fetch('/samples/pdf-not-a-pdf.pdf?diag').catch(...):
    • WebKit (run 46936271863): no request event at all; pageerror Fetch API cannot load http://localhost:5290/samples/pdf-not-a-pdf.pdf?diag due to access control checks.; and the page's own handler logs fetch rejected TypeError: Load failed. So the rejection is caught, and the message comes from WebKit, not from an unhandled error in the page. The same fetch on a page that stays loads normally (200).
    • Chromium (run 46936279997): the same fetch during the provisional navigation is requested and resolves 200.
  • Logging every request around the PDF viewer's visit in three full WebKit/wasm runs (46924848553, 46924857191, 46924865823, all passing) shows the viewer starts its two pdf-not-a-pdf.pdf fetches 40 to 550 ms after the test sets off. Those fetches were either cut off in flight ("Load request cancelled", no console error) or finished just before the navigation request. When one starts a little later, the navigation is already provisional, and WebKit refuses it as above.
  • The component is not at fault: BitPdfViewer catches the failed fetch (LoadAsync), and the message appears even for a fetch whose rejection the page handles.

Fix (test only). An error naming a fetch with WebKit's "cannot load ... due to access control checks" is also taken for one cut off when it is raised while the page is being left (after the test set off and before the next page commits) and the browser has reported no request for that address since the test set off. A fetch that failed for real went to the network and was reported, so it is still caught.

Flaky rather than broken: the WebKit/wasm shard holding this test failed in 2 of the last 7 full runs (the nights of 2026-11-30 and 2026-12-02). It passed on 2026-11-28, 2026-12-01, and in the three diagnostic runs above.

Ngôn ngữ chính
C#
Star
1.4k
Fork
264
Merge trung bình
5 giờ 40 phút
Pull request đã merge (30 ngày)
489

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 bitfoundation/bitplatform

Tất cả issue của bitfoundation/bitplatform

Issue tương tự

Thêm issue về C#

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.