-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Consider using Truststore to expose system certificate stores #3793
Comments
If it's affecting add-ons, I imagine it's affecting things like pasting of images into the editor as well. I wonder if the issue is a recent regression? https://gitlab.com/alelec/pip-system-certs/-/issues/27 Do you have a sense of how widespread the issue is? Wondering which group is more affected: those using custom certs from e.g. school/work, or those who are getting this error. |
Re Python 3.10, I'd like to see us move off PyOxidizer this year, as it's already bitrotting, and we're too far behind Python releases at this point. |
That's right. I just reproduced this on Windows Sandbox.
The issue with add-ons has been here since 24.04 was released. AnkiHub actually got a report of the issue in the first day: https://community.ankihub.net/t/trouble-logging-into-ankihub/196142 We used to get daily reports in April last year. I feel I'm seeing less reports of it, but as I'm saying that I found the most recent report is hours ago: https://community.ankihub.net/t/add-on-error/396244 On Windows, the 24.04 issue appears to affect new installations, and I suspect it goes away after installing the latest updates.
It does appear people who are getting this error are more affected, but I'm curious why there are not many reports of it on the forums (as far as I can tell) despite the fact that it breaks image pasting. |
So the issue goes away once the user installs Windows updates? And it affects both Windows 10 and 11 users? I'm hoping to get another rc build going isoon, so as a stop-gap solution, I might try catching this error and nudging the user to update Windows. |
@abdnh does running 'certutil -syncWithWU' in the sandbox shell fix the issue? |
It affects Windows 10 and 11 users. I used to instruct users to download the certificate manually and install it as a quick workaround: https://community.ankihub.net/t/trouble-logging-into-ankihub/196142/14 Running @echo off
setlocal
:: Set the directory where your .crt files are located
set "CERT_DIR=C:\path\to\your\certs"
:: Loop through all .crt files in the directory
for %%f in ("%CERT_DIR%\*.crt") do (
echo Installing certificate: %%f
certutil -addstore "Root" "%%f"
)
endlocal
pause So installing updates should fix the issue. |
I played around with this for a while and got it working, but we'd need to deal with UAC prompts and systems where PS execution is disabled, so I think I'll just take the easy route and add a message for this release, and we can add a better solution down the line (or wait until we update Python) |
#3050 patches
requests
usingpip-system-certs
to force it to not rely oncertifi
. I noticed this is causing problems in add-ons (e.g. AnkiHub) with some Windows users (probably with fresh OS installations) where any request fails with this:Unfortunately passing
verify=certifi.where()
to requests to get the old behavior doesn't work with the pip-system-certs patch in place. I had to switch tohttpx
in one add-on to work around the issue.Truststore offers a clean solution but we have to wait until we upgrade to Python 3.10.
The text was updated successfully, but these errors were encountered: