-
Notifications
You must be signed in to change notification settings - Fork 13
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
SSL Problems on Windows #54
Comments
Hello @mlbrack - does the problem still occur? If yes, then could you please take this to QGIS Cloud Support? |
Yes, still fails. Thanks. Just started a ticket. |
It seems that setting This is how I set the
The path might be slightly different for you, since you probably installed QGIS somewhere else. But this workaroudn only works in the upcomming QGIS version 3.22.0. |
Interesting. So this is a known problem?
I have two machines that are identical in OS and QGIS installs. One is failing. One is not.
Thanks for the info.
|
I just found this workaround today. I don't know if this is a known problem.
Are you sure that the QGIS versions are identical? Can you send a screenshot of both Version dialogs? |
My QGIS versions aren’t identical anymore from various installs/uninstalls to test.
This occurred in 3.16 updated to 3.20 to try to resolve. Updated, uninstalled, reinstalled cloud plugin.
In jpgs, the 3.20.3 is the machine that is getting the python error.
|
Similar past problem on OSX, due to missing cert.pem file in package: #36 |
@HusseinKabbout suggest, that this might be related to qgis/QGIS#45377 but I think that's a different problem (namely version.qgis.org having a mess with their certificates). |
According to @HusseinKabbout this is the problem: |
@mlbrack could you please test if the new development build https://qgis.org/downloads/QGIS-OSGeo4W-3.22.0-1.msi fixes your problem? |
I have tested both QGIS 3.16.12 and QGIS 3.22.0 and they are working now for me. @mlbrack can you confirm this and close this issue? |
I have uninstalled all and reinstalled 3.22.0 All returns the same set of errors. An error has occurred while executing Python code: urllib.error.URLError: During handling of the above exception, another exception occurred: Traceback (most recent call last): Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] Python Path: |
After uninstalling QGIS make sure that the directory, where QGIS was previously installed, is empty. I have had some cases where the QGIS uninstaller didn't clean up all files/dlls. @mlbrack |
Uninstalled again removing all QGIS related and reinstalled. Still getting error. |
How are you installing QGIS?I have tested the newest QGIS releases (https://qgis.org/en/site/forusers/download.html) 3.22.0 / 3.16.12 again and it still works for me. I installed QGIS via the standalone installer. |
I've installed with both the standalone and the network installer. |
When you say that you deleted all QGIS related, do you mean only your QGIS projects or also the QGIS installtion directory? For example what I did is the following:
With this it should work with both QGIS 3.22.0 and QGIS 3.16.12. I have tested this with multiple machines (Windows 10). |
Aside from going into the registry, deleting all QGIS related files and folders. |
The point of the matter is: is there a library left from previous installations, that gets used? As far as I understand the issue, the problem is that OSGEO's build for QGIS 3.20 was misconfigured and produced libraries that broke openssl's certificate search path. Thus when making a HTTPS connection from the QGIS Cloud Plugin, openssl would not find the CA certificates required to verify the certificate presented by qgiscloud.com. Further on, when re-installing QGIS, the (de)installer would not properly deinstall the misbuilt openssl libraries. Therefore, even if you deinstalled QGIS 3.20 a subsequent QGIS 3.16 or 3.22 installation would still use the misbuild libraries from the previous - nominally deinstalled - QGIS 3.16 installation. Unfortunately I have no access to a Windows Installation, thus I can not give you precise instructions, but the idea would be to see if there are anywhere old openssl libraries or libraries from the QGIS installation still lying around in your filesystem and if there are, then delete those, before reinstalling another QGIS. That's roughly the idea. |
That's what I've interpreted from all the techno-talk. I am at a loss to understand/find what could be "anywhere old openssl libraries or libraries from the QGIS installation still lying around in your filesystem" I am manually deleting all of the QGIS-related files and folders that I know of. I don't know what else to do. |
Hi, also have this SSL Problems with QGIS version 3.22.2 (msi installation) on windows 11 best greetings from Berlin |
@RalfWessel : unfortunately we don't know when this problem appears. We don't have that problem on all our windows machines, but it is something which pops up frequently. It would be great to have the possibility to look on a machine where that happens to better undestand what the problem is. Would you be available for a jitsi video session where you could share your screen? Please contact me by mail ( mhugent at sourcepole dot ch) |
It works now for Ralf, but unfortunately we don't know why :-( |
Got this in 3.26.2. Installed on two computers and one worked and one failed. The difference was that I ticked everything on the setup screen on the failing computer.
|
@aviborg - wow, thanks a lot for documenting - and thoroughly documenting - the workaround!!! @mlbrack and @ralfWessels : are you able to get your setup working with @aviborg 's workaround? Cc: @mhugent & @HusseinKabbout !!! |
Hi, My Environmental variables include one that is called Pythonpath, which is not included in my son's environmental variables. I am showing my current settings as I changed them in the screen shot, but it didn't work without changing them. Everything else works using the variables as they appear in the screen shot, i.e. postgres, pyqgis, etc are working. Everything but the QGIS cloud plugin works. urllib.error.URLError: During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Hi @tzehl,
It seems like something with QGIS' (de)installation of openssl or certificates seems to be subtly broken somewhere. So now you have one laptop where it works and one where it doesn't, which is "ideal" because we at Sourcepole have not been able to reproduce the problem yet. I imagine there can be two things that could be going awry here:
I think either 1. or 2. is different between the two installations. So if you wan't to get to the root of the problem and fix it, then you "only" shoud need to compare those two things between the two installations. On Linux you would So could you please take "Process Monitor" and have a look at:
on both machines and compare the two and let us know about the results? |
Seems to be a problem with the SSL-configuration on your system and could happen after an upgrade of QGIS 3.xx. The following steps helped to solve the SSL-problems in the almost cases:
Now all QGIS stuff should be removed. As the last step, please install QGIS 3.28 or higher again and let us know if it works now. |
Hello @tpo and @hdus, |
@tzehl Thanks for the hint with the brand new Windows User. |
Hallo, I am also having an SSL connection error when using the QGIS SCP plugin. I was trying many things to fix it (including to manualy set the SSL_CERT_FILE and reinstalling QGIS) but nothing worked so fare. Are there any further suggestions how to fix this problem? |
Hello, Thanks a lot! |
It would be useful to know what exactly the error is. |
Hallo tpo, The exact error on the QGIS window under Version 3.32 when trying to load Sentinel 2 Data with the SCP plugin is: Thank you very much! |
@tpo, |
@MarlonSchwienbacher - could you search in your explorer a directory named "openssl". Where is it? |
@tpo the openssl directory is in within the Qt5/certs directory. |
Hi,
|
One day, Cloud Plugin worked, next day it didn't.
Returning python error on attempted logon.
Uninstalled all QGIS and python. Reinstalled. Plugin still failing.
Error info:
An error has occurred while executing Python code:
urllib.error.URLError:
Traceback (most recent call last):
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 1253, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 1299, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 1248, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 1008, in _send_output
self.send(msg)
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 948, in send
self.connect()
File "C:\OSGeo4W\apps\Python39\lib\http\client.py", line 1422, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\OSGeo4W\apps\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: A failure in the SSL library occurred (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py", line 411, in check_login
raise e
File "C:\Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudplugindialog.py", line 331, in check_login
login_info = self.api.check_login(
File "C:\Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudapi\qgiscloudapi.py", line 161, in check_login
content = request.post(resource, data)
File "C:\Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudapi\qgiscloudapi.py", line 596, in post
return self.request(resource, method='POST', data=data)
File "C:\Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgiscloud\qgiscloudapi\qgiscloudapi.py", line 684, in request
response = urllib.request.urlopen(req).read()
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 517, in open
response = self._open(req, data)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError:
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.20.3-Odense Odense, 495fbaec
Python Path:
C:/OSGeo4W/apps/qgis/./python
C:/Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGeo4W/apps/qgis/./python/plugins
C:\OSGeo4W\bin\python39.zip
C:\OSGeo4W\apps\Python39\DLLs
C:\OSGeo4W\apps\Python39\lib
C:\OSGeo4W\bin
C:\OSGeo4W\apps\Python39
C:\OSGeo4W\apps\Python39\lib\site-packages
C:\OSGeo4W\apps\Python39\lib\site-packages\win32
C:\OSGeo4W\apps\Python39\lib\site-packages\win32\lib
C:\OSGeo4W\apps\Python39\lib\site-packages\Pythonwin
C:/Users/mbrack/AppData/Roaming/QGIS/QGIS3\profiles\default/python
The text was updated successfully, but these errors were encountered: