-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chromium: Show error pages when errors happen #1669
base: main
Are you sure you want to change the base?
Conversation
Currently when errors happen when loading a website, Wolvic with Chromium backend just returns a blank page. This fix allows Wolvic with Chromium backend to return an error page customized to each error. Fix Igalia#1615
@svillar @felipeerias (and other maintainers) Currently my approach is use the existing error page we have in https://github.com/Igalia/wolvic/blob/main/app/src/main/res/raw/error_pages.html, and customize the page for each Chromium error code. I learned that this page is already customized for each Gecko error code in https://github.com/Igalia/wolvic/blob/main/app/src/common/shared/com/igalia/wolvic/utils/InternalPages.java, and Chromium error codes can be found in the I tested with For the going back option, I can't understand why it doesn't work here, since we use the standard
For the accepting bad cert option, we use
I found out this function is from Gecko: https://searchfox.org/mozilla-central/source/dom/webidl/Document.webidl#353 It seems like Chromium has a window.certificateErrorPageController.proceed() function to load a page with bad cert: https://github.com/Igalia/wolvic-chromium/blob/7b1b3d75379c95b9021b7385d813fc886875602f/components/security_interstitials/core/common/resources/interstitial_common.js#L65However I tried this and it didn't worked either. Could you help me figure out how to make both options (going back or accepting the bad cert) work here? Also I found out Chromium actually has its security interstitials component: https://github.com/Igalia/wolvic-chromium/tree/wolvic/components/security_interstitials Should we somehow use this for our Chromium errors instead of the existing error page we're using for Gecko? |
First of all, nice research @haanhvu !
Yeah that's weird. I'd suggest to use remote debugging and check the console errors in the inspector.
Yeah, it's very likely that we still have gecko only stuff in the common code. My suggestion would be to change the JS code. We can check whether addCertException() exists before calling it. If it does not exist then it's because we're running Chromium and then we'd have to use another call.
Hmm, those components are for internal use in Chrome, I doubt we can access to them in Wolvic. If possible I think we should keep the current architecture because it's the one that requires less changes and maximizes code sharing. |
Currently when errors happen when loading a website, Wolvic with Chromium backend just returns a blank page. This fix allows Wolvic with Chromium backend to return an error page customized to each error.
Fix #1615