1

Connecting to one website. After typing login and password values, when clicked on Sign IN button, seeing the below error on the UI.

Secure Connection Failed

An error occurred during a connection to wgateway-fit.nj.adp.com. Peer’s certificate has an invalid signature. Error code: SEC_ERROR_BAD_SIGNATURE

We are using Selenium c#. Firefox Browser 66

FirefoxOptions option = new FirefoxOptions();
//option.BrowserExecutableLocation = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe";   
option.BrowserExecutableLocation = @"C:\Users\buskarna\AppData\Local\Mozilla Firefox\firefox.exe";
option.AcceptInsecureCertificates = true;
option.SetPreference("browser.helperApps.neverAsk.saveToDisk", "text/html;charset=iso-8859-1,application/dat,application/pdf,text/plain,text/csv,application/x-msexcel,application/excel,application/x-excel,application/octet-stream,application/download,text/x-csv");
option.SetPreference("browser.helperApps.neverAsk.openFile", "text/html;charset=iso-8859-1,application/dat,application/pdf,text/plain,text/csv,application/x-msexcel,application/excel,application/x-excel,application/octet-stream,application/download,text/x-csv");
option.SetPreference("browser.download.folderList", 2);
option.SetPreference("browser.download.dir", "C:\\Temp\\");
option.SetPreference("plugin.disable_full_page_plugin_for_types", "application/pdf,application/vnd.fdf");
option.SetPreference("browser.download.manager.alertOnEXEOpen", false);
option.SetPreference("browser.download.manager.useWindow", false);
option.SetPreference("browser.download.manager.showAlertOnComplete", false);
option.SetPreference("browser.download.manager.closeWhenDone", true);
option.SetPreference("browser.helperApps.alwaysAsk.force", false);
option.SetPreference("pdfjs.disabled", true);
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Narasimha Rao
  • 11
  • 1
  • 1
  • 3

1 Answers1

1

I have noticed that random pages are being blocked by Firefox - SEC_ERROR_BAD_SIGNATURE is displayed. Other browsers were fine.

SOLUTION

Renaming two files has 'reset' firefox files and resolved the above issue.

  • cert8.db to cert8.db.old
  • cert9.db to cert9.db.old

Windows 10 directory: C:\Users\YOURUSERNAME\AppData\Roaming\Mozilla\Firefox\Profiles\yuic7va7.default

where YOURUSERNAME is the name of your Windows profile
and

yuic7va7.default is a default, and probably random, name of the Firefox profile.

The above worked on 69.0.1 (64-bit) Firefox, Windows 10 and Windows 7 computers.

Artog
  • 1,132
  • 1
  • 13
  • 25
tojazenn
  • 11
  • 1