Open flimao opened 2 days ago
Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setStringPref]
"security.enterprise_roots.enabled": "true"
I guess it should be boolean rather than a string?
"security.enterprise_roots.enabled": true
@pavelfeldman, if I set the option exactly as you wrote it, Python throws a NameError
:
(...)
NameError: name 'true' is not defined. Did you mean: 'True'?
If I write it as a Python boolean instead ("security.enterprise_roots.enabled": True
), playwright throws the SEC_ERROR_UNKNOWN_ISSUER
error, apparently ignoring the Firefox setting.
Version
1.44.0
Steps to reproduce
pip install playwright
playwright install firefox
with sync_playwright() as pwobj: browser = pwobj.firefox.launch( headless = False, firefox_user_prefs = { "security.enterprise_roots.enabled": "true" } )
Actual behavior
I get an unhelpful error message
NS_ERROR_UNEXPECTED
:Additional context
I'm trying to scrape one of my company's internal web portal. The portal only works properly in Firefox and is only served through HTTPS. The company MITM's all SSL connections. I have the company's root CA installed in WSL.
If I remove the
firefox_user_prefs
argument, or if I set any other option infirefox_user_prefs
, like so:I get the
SEC_ERROR_UNKNOWN_ISSUER
as expected.I asked for help regarding this issue in StackOverflow. So for it has 20 views, but no comments or answers.
Environment