fenix icon indicating copy to clipboard operation
fenix copied to clipboard

[Bug] can't click "Accept the risk and continue" on secure connection failed page

Open agi opened this issue 5 years ago • 14 comments

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

agi avatar Mar 11 '21 17:03 agi

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.

amedyne avatar Mar 12 '21 21:03 amedyne

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

codrut-topliceanu avatar Mar 15 '21 13:03 codrut-topliceanu

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).

tnikkel avatar Mar 15 '21 21:03 tnikkel

I tested in nightly as well on the Pixel 2, same issue.

tnikkel avatar Mar 15 '21 21:03 tnikkel

Confirmed. I'm able to reproduce the issue on https://lando.services.mozilla.com/D108516/ on Nightly. Very odd.

codrut-topliceanu avatar Mar 16 '21 08:03 codrut-topliceanu

Master branch Nightly build vs Master branch debug build:

https://user-images.githubusercontent.com/60002907/111309884-1067f780-8665-11eb-9ee1-eb66cdf9396d.mp4

...

codrut-topliceanu avatar Mar 16 '21 12:03 codrut-topliceanu

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:

image

As document.addCertException is a GeckoView method I will post this on the relevant Bugzilla issue.

codrut-topliceanu avatar Mar 17 '21 11:03 codrut-topliceanu

@codrut-topliceanu Can you add the bugzilla ticket here?

amedyne avatar Mar 17 '21 14:03 amedyne

Sure thing, it's the one from the original comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1696841

codrut-topliceanu avatar Mar 17 '21 14:03 codrut-topliceanu

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

xmansyx avatar Mar 18 '21 13:03 xmansyx

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.

makotokato avatar Jul 13 '21 04:07 makotokato

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.

codrut-topliceanu avatar Jul 13 '21 11:07 codrut-topliceanu

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).

SoftVision-LorandJanos avatar Jul 14 '21 13:07 SoftVision-LorandJanos

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).

lobontiumira avatar Jul 21 '21 12:07 lobontiumira