Overview ======== Back-navigation gets stuck in infinite loading under some circumstances when the Cross-Origin-Opener-Policy header is in use. This bug seems to impact only iOS and iPadOS 15.2, using any browser (e.g. we tried on Safari, Brave and Firefox). It seems like the COOP header was not supported before this version (https://webkit.org/blog/12140/new-webkit-features-in-safari-15-2/) Steps to reproduce ================== Here is a page which allows to reproduce the issue: https://fmarier.org/coop-safari/link.html (Thank you Francois) The flow is the following: - 'Site 1' sets the COOP header (either with value 'same-origin-allow-popups' or 'same-origin') - User navigates to 'site 2' from 'site 1' (e.g. in this case Instagram, which is how we discovered the issue in the first place) - User navigates backward from 'site 2' to 'site 1', but the loading gets stuck. Expected result =============== It should be possible to navigate backward from 'site 2' to 'site 1' without the browser getting stuck loading. Additional information ====================== Removing the COOP header from 'site 1' results in back-navigation working as expected. Speculation =========== It is not 100% clear what is causing this issue, but it seems to happen in some cases when 'site 1' and 'site 2' both define a COOP header, and user tries to navigation back from 'site 2' to 'site 1'. Build Date & Hardware ===================== The version of iOS where the issue was observed is 15.2.1 (19C63), the same issue appears on iPadOS 15.2 as well. We could not reproduce on the previous iOS version nor on the desktop version of Safari.
<rdar://problem/87948317>
I am able to reproduce. Thank you for the bug report, I will investigate shortly.
Created attachment 449878 [details] API Test reproducing the issue From the output it appears we keep launching new WebProcesses in a loop when we get in the bad state.
Created attachment 449957 [details] Patch
Created attachment 449965 [details] Patch
Comment on attachment 449965 [details] Patch r=me
Committed r288605 (246424@main): <https://commits.webkit.org/246424@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449965 [details].
*** Bug 237137 has been marked as a duplicate of this bug. ***
*** Bug 237566 has been marked as a duplicate of this bug. ***