Kodi Community Forum

Full Version: Kodi 19 - Always [SSL: CERTIFICATE_VERIFY_FAILED], can't get it fixed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I am trying to load a file all the time. The certificate of the domain is correct, it has been checked several times, but again and again I get this error. What can do there?

I have already tried to append |verifypeer=false after the URL. No success. It doesn't matter if I use http:// or https://.

Code:
 Error Type: <class 'urllib.error.URLError'>
                                                   Error Contents: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)>
                                                   Traceback (most recent call last):
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 1350, in do_open
                                                       h.request(req.get_method(), req.selector, req.data, headers,
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 1255, in request
                                                       self._send_request(method, url, body, headers, encode_chunked)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 1301, in _send_request
                                                       self.endheaders(body, encode_chunked=encode_chunked)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 1250, in endheaders
                                                       self._send_output(message_body, encode_chunked=encode_chunked)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 1010, in _send_output
                                                       self.send(msg)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 950, in send
                                                       self.connect()
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/http/client.py", line 1424, in connect
                                                       self.sock = self._context.wrap_socket(self.sock,
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
                                                       return self.sslsocket_class._create(
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/ssl.py", line 1040, in _create
                                                       self.do_handshake()
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
                                                       self._sslobj.do_handshake()
                                                   ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)
                                                   
                                                   During handling of the above exception, another exception occurred:
                                                   
                                                   Traceback (most recent call last):
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/addons/script.cuetv.install/main.py", line 14, in <module>
                                                       script.get_packages()
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/addons/script.cuetv.install/resources/lib/script.py", line 68, in get_packages
                                                       response = urllib.request.urlopen(url)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
                                                       return opener.open(url, data, timeout)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 531, in open
                                                       response = meth(req, response)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 640, in http_response
                                                       response = self.parent.error(
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 563, in error
                                                       result = self._call_chain(*args)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
                                                       result = func(*args)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 755, in http_error_302
                                                       return self.parent.open(new, timeout=req.timeout)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 525, in open
                                                       response = self._open(req, data)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 542, in _open
                                                       result = self._call_chain(self.handle_open, protocol, protocol +
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
                                                       result = func(*args)
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 1393, in https_open
                                                       return self.do_open(http.client.HTTPSConnection, req,
                                                     File "/data/user/0/org.xbmc.kodk/cache/apk/assets/python3.8/lib/python3.8/urllib/request.py", line 1353, in do_open
                                                       raise URLError(err)
                                                   urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1123)>
                                                   -->End of Python script error report<--

python:
url = 'http://SEITE.cc/tv/data.zip|verifypeer=false'
response = urllib.request.urlopen(url)

Am grateful for any help.
The url you posted has an INVALID (self signed) certificate, chrome rejects it.
openssl rejects it too:
Code:
openssl s_client -connect seite.cc:443 -CApath /etc/ssl/certs/
CONNECTED(00000003)
depth=0 CN = TRAEFIK DEFAULT CERT
verify error:num=18:self signed certificate
verify return:1
 
(2021-03-31, 19:43)Sumale.my Wrote: [ -> ]It doesn't matter if I use http:// or https://.

The site itself redirects http to https.
'certificate is not yet valid' - may indicate date/time issue on whatever device you are using.

org.xbmc.kodk "kodK" raises suspicion, what crap exactly are you running and where did you get it from? Official version is org.xbmc.kodi

Do NOT post logs to the forum.
Do NOT post snippets, only full Debug Log via a link to a paste site such as http://paste.kodi.tv