Bug 249329 - Safari cannot load a website
Summary: Safari cannot load a website
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Blocker
Assignee: Nobody
URL: https://disneycruise.disney.go.com
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-14 11:50 PST by Safwen
Modified: 2022-12-21 11:51 PST (History)
2 users (show)

See Also:


Attachments
Screenshot of the network tab that shows that the browser is stuck loading a css file (734.94 KB, image/png)
2022-12-14 11:50 PST, Safwen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Safwen 2022-12-14 11:50:44 PST
Created attachment 464048 [details]
Screenshot of the network tab that shows that the browser is stuck loading a css file

Hello,

Here are the steps to reproduce:


1. Go to https://disneycruise.disney.go.com
2. Execute the following code in the console
window.addEventListener('pagehide', async () => {
    const r = await fetch(location.href);
    console.log(r);
});
3. Click on "Sign in or Create an Account", this is in the header close to the search bar on the top right.
This should open a new page "https://disneycruise.disney.go.com/en/login?appRedirect=%2F
but here the browser will start requesting the document of the page and few other resources but stays stuck
while requesting "https://cdn3.parksmedia.wdprapps.disney.com/media/profile-spa/1.6.0-184/styles.7e26e406cfcd02d2aa32.css".
After this, the browser refuses to load this URL "https://cdn3.parksmedia.wdprapps.disney.com/media/profile-spa/1.6.0-184/styles.7e26e406cfcd02d2aa32.css"
even in new tabs, even in new windows, accessing this URL makes the browser stuck loading it. And the only solution
is to close the browser and re-open to be able to access "https://cdn3.parksmedia.wdprapps.disney.com/media/profile-spa/1.6.0-184/styles.7e26e406cfcd02d2aa32.css" again.
Comment 1 Safwen 2022-12-14 12:01:35 PST
I suspect that this is caused by zonejs, Promise is overridden by zonejs and the following code fixes the issue:

var iframe = document.createElement('iframe');
document.body.prepend(iframe);
window.addEventListener('pagehide', async () => {
    const purePromise = iframe.contentWindow!.Promise;
    const overriddenPromise = window.Promise;
    window.Promise = purePromise; // this makes the promise returned by fetch pure in the sense it is not touched by zonejs
    const r = await fetch(location.href);
    console.log(r);
    window.Promise = overriddenPromise;
});
Comment 2 Alexey Proskuryakov 2022-12-18 14:51:01 PST
Thank you for the report! Could you please elaborate on what the user impact is, and why yo believe this to be a WebKit bug?
Comment 3 Radar WebKit Bug Importer 2022-12-21 11:51:27 PST
<rdar://problem/103608219>