Skip to content
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

SSLError randomly with France TV Slash replays #1161

Open
1 of 7 tasks
nonobio opened this issue Jun 11, 2023 · 20 comments
Open
1 of 7 tasks

SSLError randomly with France TV Slash replays #1161

nonobio opened this issue Jun 11, 2023 · 20 comments

Comments

@nonobio
Copy link

nonobio commented Jun 11, 2023

⚠️ Please try the last beta version and check existing issues before issuing a bug. ⚠️

Describe the bug

A clear and concise description of what the bug is:

When I want to play replay video on France TV Slash, I have an SSLError notification.

To Reproduce

Steps to reproduce the behaviour:

  1. Start Catch-up-TV-and-More
  2. Go to Télévision de trattrapage
  3. Go to France, France TV, Chaînes, France tv Slash, Séries
  4. Try to open Skam france

Expected behaviour

A clear and concise description of what you expected to happen:

Content should be listed: Toutes les saison, Toutes les vidéos, etc.

Actual behaviour

Tell us what happens instead:

A notification SSLError is displayed and there isn't content listed.

Your environment

  • Android

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Other

  • Operating system version/name: Windows 10 22H2

  • Kodi version: 20.1

  • Catch-up TV & More version: 0.2.39~beta7

  • Installation method: beta repository

Additional context

Add any other context about the problem here:

I think I have the issue every evening, but when I try to reproduce it to create a log, the morning or afternoon, the issue isn't present!

Debug log

If you can, please add your debug log information (Tutorial available here: https://kodi.wiki/view/Log_file/Easy):

I will try :)

@joaopa00
Copy link
Contributor

20H43. Pas de problème pour moi.

@nonobio
Copy link
Author

nonobio commented Jun 13, 2023

Hi,

Not easy to generate a log, every time I wanted to do it, it worked ;)!

But I finally succeeded: here is the log which includes the launch of Kodi, access to my favorite Skam France, and the famous SSLError message. I then just closed Kodi.

Thanks :)

@wawa79
Copy link

wawa79 commented Jul 3, 2023

Hi,
Same issue here with CatchupTV 0.2.39-beta28: I reinstalled Kodi 20.2 from scratch (deleted all user data), running Windows 10.

Note that :

  1. CatchupTV plays properly FranceTV replay from a 2nd PC running Kodi 20.2, whereas from my main PC it reports a SSLError (so it is not an external / provider or network issue).
  2. CatchupTV plays properly FranceTV after I open/close https::/francetv.fr in Chrome. No Idea if it is related or just some kind of accident.

Attached is log in debug mode of the error.

catchuptv_log.txt

@joaopa00
Copy link
Contributor

joaopa00 commented Jul 4, 2023

Le certificat est valide
Vériication du certificat

Puisque cela ne se passe que pour des utilisateurs de WIndows, je me demande si vous n'avez pas une fait une installation personnelle de Python. SI c'est le cas, mettez à jour votre installation de Python.

@nonobio
Copy link
Author

nonobio commented Jul 4, 2023

Salut,

Que veux tu dire par une installation personelle de python ? Une installation du programme windows en dehors de Kodi ?
Non, je n'ai pas fait ça.

J'ai l'impression que ça fonctionne mieux en journée, genre le matin ou midi, et que ça déconne presque toujours le soir...

@wawa79
Copy link

wawa79 commented Jul 4, 2023

Bonsoir,
Ce midi, le replay FranceTV fonctionnait sur mes 2 PC et ce soir, il ne fonctionne que sur mon PC portable et pas sur mon PC fixe à l'origine de ce post
J'ai mis à jour Python de 2.7.13 vers 2.7.18 puis carrément désinstallé Python et... ça ne change rien : toujours l'erreur de certificat SSL.

@darodi
Copy link
Contributor

darodi commented Jul 5, 2023

J'ai mis à jour Python de 2.7.13 vers 2.7.18 puis carrément désinstallé Python et... ça ne change rien : toujours l'erreur de certificat SSL.

De mémoire, Kodi embarque la version de python.
Kodi >19 est en python 3.8
ça ne sert donc à rien de mettre à jour l'autre version.

preuve dans le log, le module python est dans le répertoire de Kodi
idem pour le module ssl

   Traceback (most recent call last):
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 703, in urlopen
	   httplib_response = self._make_request(
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 386, in _make_request
	   self._validate_conn(conn)
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 1042, in _validate_conn
	   conn.connect()
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 414, in connect
	   self.sock = ssl_wrap_socket(
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
	   ssl_sock = _ssl_wrap_socket_impl(
	 File "C:\Users\nonob\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
	   return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
	 File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 500, in wrap_socket
	   return self.sslsocket_class._create(
	 File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1040, in _create
	   self.do_handshake()
	 File "C:\Program Files\Kodi\system\python\Lib\ssl.py", line 1309, in do_handshake
	   self._sslobj.do_handshake()
   ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1136)

Je suis malheureusement géobloqué pour France TV, je ne peux pas aider plus.

@wawa79
Copy link

wawa79 commented Jul 5, 2023

Ok, merci. Je n'ai qu'une version 2.x.x de Python sur cette machine et pas de version 3.x.x en parallèle. Je suppose que la version de Python installée avec Kodi 20.2 est à jour...

@wawa79
Copy link

wawa79 commented Aug 11, 2023

Hello,
The issue is still open and access to FranceTV replay is still not working. Any way I can help n troubelshooting this? Any advice?

@darodi
Copy link
Contributor

darodi commented Aug 11, 2023

@wawa79

try pip install certifi and test if it works?

I wouldn't recommend using python 2.7 unless you really need it.
it reached end of life in 2020.
https://www.python.org/doc/sunset-python-2/
https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html

@wawa79
Copy link

wawa79 commented Aug 11, 2023

@wawa79

try pip install certifi and test if it works?

@wawa79

try pip install certifi and test if it works? I wouldn't recommand using python 2.7 unless you really need it. it reached end of life in 2020. https://www.python.org/doc/sunset-python-2/ https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html

I am a bit lost : I read earlier that Kodi was running its own Python engine installed in the Kodi folder. I suppose I should install the certifi lib "in Python runnning inside Kodi"? Or is it in an external Python release you are referring to?

I am aware of the Python 2.x out of support ;-) But it is still the core for Eventghost so need to keep installed. Having Python 3..7 also is not a problem : I am installing it right now

@wawa79
Copy link

wawa79 commented Aug 11, 2023

The issue is all the harder to troubelshoot that it is random. From my laptop, FranceTV replay never raised the issue. From the mediacenter PC, it happens randomly. And my feelng is that once the SSL certificate has been accepted once, then it keeps connecting for 'a while' (don't know how long, don't know under what circumstances). A reboot of the PC "keeps the certificate valid". And I cannot find an obvious difference between my laptop and the mediacenter PC: I have swapped the cacert.pem files with no effect... And no much verbosity from the log to understand what is exactly causing the exception.

@darodi
Copy link
Contributor

darodi commented Aug 11, 2023

I am a bit lost : I read earlier that Kodi was running its own Python engine installed in the Kodi folder. I suppose I should install the certifi lib "in Python runnning inside Kodi"? Or is it in an external Python release you are referring to?

Kodi uses it's own python indeed but I don't know how certificates are used, and if both python versions share the same certificates.
certify could update your certificates if they are obsolete and were installed by your python 2 version and shared with python 3

installing python 3 after python 2 could fix the certificates too

@wawa79
Copy link

wawa79 commented Aug 11, 2023

installing python 3 after python 2 could fix the certificates too

Well, for sure it won't hurt. I'll give it a try :-)

@darodi
Copy link
Contributor

darodi commented Aug 11, 2023

I have swapped the cacert.pem files with no effect... And no much verbosity from the log to understand what is exactly causing the exception.

:(

@wawa79
Copy link

wawa79 commented Aug 11, 2023

Done. Hard to confirm if that works as the issue happens randomly. If the issue occurs again, I will overwrite the cacert.pem from Kodi by the one from verifi in case Kodi is not getting certificates from the right store. I will keep you posted. Thank you!

@wawa79
Copy link

wawa79 commented Sep 12, 2023

Hello,
Last findings about this issue. I tried to find the differences between the install of Kodi running on my laptop which never crashes on France TV replay and the install of Kodi running on my HTPC which raises the issue.

Might it be some kind of interference between 2 Kodi tasks using SSL certificates:
2023-09-12 18:49:42.636 T:3128 error <general>: CCurlFile::XFILE::CCurlFile::Stat - <http://mirrors.kodi.tv/addons/nexus/script.module.codequick/resources/icon.png> Failed: SSL peer certificate or SSH remote key was not OK(60)
which uses the cacert.pem files, one in %Program%\Kodi\system\certs

and Catch-up-TV itself which uses the cacert.pem files, found in %AppData%\Roaming\Kodi\addons\script.module.certifi\lib\certifi.

On the laptop, the 2 files are identical and the issue never happens.
After replacing the 2 files on the HTPC with the latest cacert.pem file from the certifi Python package, the issue has gone... temporarily at least as this SSLError is totally random on the HTPC

I will confirm later if this fixes the problem.

@nonobio
Copy link
Author

nonobio commented Sep 12, 2023

Thanks

@wawa79
Copy link

wawa79 commented Nov 27, 2023

Hello,
Well, I am still having the issue. One [user unfriendly] workaround anyway:

  1. Close Kodi,
  2. Open FranceTV website in Chrome, and click any link on the website then close Chrome,
  3. Restart Kodi

Then the SSL error does not occur in Kodi. I would love to understand where does this magic come from :-)

I automated that workaround using Eventghost (hiding Chrome with a splash screen topmost window during "the magic"). For sure, a clean Windows reinstall might fix this.

@wawa79
Copy link

wawa79 commented Feb 8, 2024

Hi,

I fully reinstalled Windows 10 from scratch, and Kodi 21 beta2. And after 2 or 3 days that made me believe that the issue was gone, the issue is back.

So the problem was not an inconsistent Windows 10 installation. Any help or troublesooting guide is appreciated.

I am really the only one to experience this?

[En français au cas où ça accroîtrait mes chances d'être aidé :-) ]
J'ai complètement réinstallé Windows 10, Kodi 21 beta2. Et après 2 ou 3 jours ou l'ai réellement cru que le problème était réglé, le bug est de retour.

Donc le problème n'a rien a voir avec une installation foireuse de Windows 10. Une idée de comment trouver l'origine du problème.

Sachant qu'il me suffit d'ouvrir le site FranceTV dans un navigateur (Edge), de relancer Kodi pour que l'erreur disparaisse...

Suis-je vraiment le seul à avoir des pbs avec le replay FranceTV ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants