[Bug] can't click "Accept the risk and continue" on secure connection failed page
from https://bugzilla.mozilla.org/show_bug.cgi?id=1696841
Connect to a site that gives you the secure connection failed error page (I don't have an example that is likely to work for everyone but someone must know an example page that does this). Click Advanced and then try to click "accept risk and continue", it does not work. Putting the page in desktop mode does not fix it but changes the layout.
┆Issue is synchronized with this Jira Task
From the bugzilla ticket: Connect to a site that gives you the secure connection failed error page (I don't have an example that is likely to work for everyone but someone must know an example page that does this). Click Advanced and then try to click "accept risk and continue", it does not work. Putting the page in desktop mode does not fix it but changes the layout.
Hey, I was unable to reproduce on current Nightly, Pixel 3xl (Android 10) Could we get some more info on this, maybe some steps to reproduce?
Tested using self signed server.
https://user-images.githubusercontent.com/60002907/111164033-514d0700-85a6-11eb-915b-fcffc4ed4185.mp4
Goto https://lando.services.mozilla.com/D108516/ you should get an error page. Click advanced and then accept the risk. I am unable to tap on accept the risk. I can reproduce on Pixel 2 as well as Moto E5 Play. It even reproduces when I put the page into desktop mode (which changes the layout).
I tested in nightly as well on the Pixel 2, same issue.
Confirmed. I'm able to reproduce the issue on https://lando.services.mozilla.com/D108516/ on Nightly. Very odd.
Master branch Nightly build vs Master branch debug build:
https://user-images.githubusercontent.com/60002907/111309884-1067f780-8665-11eb-9ee1-eb66cdf9396d.mp4
...
After some more investigations, and some help from my colleagues, it turns out that the issue stems from lowMediumErrorPages.js, specifically the addCertException method:
async function acceptAndContinue(temporary) {
try {
await document.addCertException(temporary);
location.reload();
} catch (error) {
console.error("Unexpected error: " + error);
}
};
This results in : Unexpected error: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.
After running document.addCertException(true) in GeckoViewExample, I got the same exception:

As document.addCertException is a GeckoView method I will post this on the relevant Bugzilla issue.
@codrut-topliceanu Can you add the bugzilla ticket here?
Sure thing, it's the one from the original comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1696841
this bug has been driving me crazy for a lot of time today i tried to make some investigation i found that it happens only with sites that have old TLS versions e.g 1.0 and 1.1 here is an example to reproduce: http://tls-v1-0.badssl.com:1010/. it happens on all firefox branches: stable, beta, nightly and even fennec.
i hope this will be fixed soon because it is very annoying
When ErrorType.ERROR_SECURITY_SSL, we shouldn't show "Advanced..." button. (See https://bugzilla.mozilla.org/show_bug.cgi?id=1696841#c11). This error page is in a-c.
Thanks for your help @makotokato ❤️
Will be fixed by https://github.com/mozilla-mobile/android-components/issues/10588 and its PR : https://github.com/mozilla-mobile/android-components/pull/10589
By Fixed I mean this :
When ErrorType.ERROR_SECURITY_SSL, we shouldn't show "Advanced..." button.
Still reproducible on the latest Nightly (91.0a1 - 2021-07-14T05:06:58.101). Will be retested tomorrow.
Device used: Google Pixel 4 (Android 11).
Verified as fixed on the 92.0a1 Nightly build from 7/21 with https://expired.badssl.com/ page with the following devices:
- Google Pixel (Android 10),
- Samsung Galaxy Tab A6 (Android 5.1.1), and
- HTC 10 (Android 8).