mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
7cb54ace75
[Playwright v1.61.0 adds support for ubuntu-26.04](https://github.com/microsoft/playwright/releases/tag/v1.61.0). When Lindsey created our arm64 runners (see https://github.com/vercel/next.js/pull/94870), [he picked the ubuntu-26.04 image](https://vercel.slack.com/archives/C01LN7C5QR5/p1781608258610389?thread_ts=1781118174.353839&cid=C01LN7C5QR5) (which is technically still [in preview](https://github.com/actions/runner-images#available-images), but IMO that's fine).
25 lines
1.5 KiB
Diff
25 lines
1.5 KiB
Diff
diff --git a/lib/coreBundle.js b/lib/coreBundle.js
|
|
index 1d36a373cb14a856c9a69e218df5183bb250d2f0..560bd6cc4fc3fd11937b6039279bbfcb08152172 100644
|
|
--- a/lib/coreBundle.js
|
|
+++ b/lib/coreBundle.js
|
|
@@ -60688,6 +60688,19 @@ var init_browserContext2 = __esm({
|
|
_onRequestFailed(request2, responseEndTiming, failureText, page) {
|
|
request2._failureText = failureText || null;
|
|
request2._setResponseEndTiming(responseEndTiming);
|
|
+ // PATCH (next.js): mirror what `_onRequestFinished` does for the
|
|
+ // response, so callers awaiting `response.finished()` don't hang on
|
|
+ // failed/canceled requests. The server side already resolves the
|
|
+ // server-side `_finishedPromise` from `_onLoadingFailed` (see
|
|
+ // chromium/crNetworkManager.js), but only the `requestFinished` IPC
|
|
+ // carries a response payload — `requestFailed` does not, so the
|
|
+ // client-side Response's `_finishedPromise` is otherwise never
|
|
+ // resolved. We look up the response via the existing async RPC and
|
|
+ // resolve it fire-and-forget; catch is a no-op so we never produce
|
|
+ // an unhandled rejection if the context tears down concurrently.
|
|
+ request2.response().then((response2) => {
|
|
+ if (response2 !== null) response2._finishedPromise.resolve(null);
|
|
+ }).catch(() => {});
|
|
this.emit(Events.BrowserContext.RequestFailed, request2);
|
|
if (page)
|
|
page.emit(Events.Page.RequestFailed, request2);
|