WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
276773
[GTK] page load is getting load cancelled error due to resourceError after continuous loading of page
https://bugs.webkit.org/show_bug.cgi?id=276773
Summary
[GTK] page load is getting load cancelled error due to resourceError after co...
suresh.ramamurthy
Reported
2024-07-18 04:45:01 PDT
Hi, We use webkitgtk based browser to run our app for login and logout authentication events. We have a requirement to clear cache/cookies/history/certificates on login/logout. So, on login event we try to first to load about:blank in the webkitgtk based browser and then do clear/cache/cookies/history/certificates and we load our initial page in the browser using webkitgtk. The same process is followed during logout event as well. When we run an automated test of login/logout continuously with 30 seconds gap between the two events, we are hit with load cancelled error like say after 1 hour 15 minutes or 2 hours. We see that m_mainResource->resourceError() error is set, and we think this is related to some memory issue while loading the page. In this void DocumentLoader::notifyFinished(CachedResource& resource, const NetworkLoadMetrics&) method, mainReceivedError(m_mainResource->resourceError()); is called and error is set. And in this method void FrameLoader::checkLoadCompleteForThisFrame(), framestate comes back to provisional state for initial page url or about:blank after framestate being set to committed. And in framestate provisional, as mainDocumentError is set to resourceError, it doesn't return here and go and calls dispatchDidFailProvisionalLoad(*protector, error);, which leads to load cancelled error. case FrameState::Provisional: { const ResourceError& error = protector->mainDocumentError(); if (error.isNull()) return; if (!protector->isLoadingInAPISense() || protector->isStopping()) { dispatchDidFailProvisionalLoad(*protector, error); Can you please help us fixing this issue? Thank you. Thanks Suresh R
Attachments
Add attachment
proposed patch, testcase, etc.
suresh.ramamurthy
Comment 1
2024-07-31 07:10:43 PDT
We found that loading about:blank and clear cache and immediately loading the start page is creating the load failure. We are doing clear cache using webkit_web_context_clear_cache which gets cache data from MemoryCache and DiskCache classes and the resourceError we are seeing points to MemoryCache class. So, we believe synchronization issue occurs in the internals of WebKit. Please advise for any possible solution. Thank you.
suresh.ramamurthy
Comment 2
2024-08-02 06:49:25 PDT
Hi, I tried adding a delay after doing clear cache. So, after the delay I'm loading the start page. This seems to be working fine. thanks. But very much appreciate your inputs for any other solution.
suresh.ramamurthy
Comment 3
2024-09-02 04:51:28 PDT
Added call back method to the removeData call in webkit_web_context_clear_cache method. After adding the callback and sleep of 2 seconds after startPageURL load fixes the issue. The 2 seconds sleep after startPageURL load is required because of our html/js page is consuming more time to complete the load. Thanks.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug