v18 [bug] cURL unable to connect to any url starting with https
#16
Since it's Ubuntu 16.04, is it this old python-cryptography and python-openssl bug: https://bugs.launchpad.net/ubuntu/+sourc...ug/1636573 ? It causes really strange behaviors like this.See also: 304613 (thread)
Reply
#17
(2018-09-27, 20:16)yasij Wrote: Since it's Ubuntu 16.04, is it this old python-cryptography and python-openssl bug: https://bugs.launchpad.net/ubuntu/+sourc...ug/1636573 ? It causes really strange behaviors like this.See also: 304613 (thread)
 What a star you are !!  After reading the thread and checking apt-cache for the versions I already had installed and seeing that if I broke something by upgrading those packages I could easily revert them again, I updated both of them.  Downloaded and installed YT.  Downloaded BBC iPlayer (usually at this point downloading anything from the repo would fail).  Opened Youtube, did a search, played a video came out of it and opened a streaming radio link (https stream).  All appears working fine, so thank you so much !!!

Having checked on the 64bit machine, cryptography is already at 1.7.1-3  . Dunno where that got installed but it's obviously the reason the issue isn't on that machine.

Once again, thanks for pointing me to that Angel
Learning Linux the hard way !!
Reply
#18
Can we implement a check for this? It seems to come up again and again and always takes time to find the root cause ...

Is it enough to check the pyopenssl version?
Reply
#19
According to this https://github.com/pyca/pyopenssl/issues/542 , upgrading to pyOpenSSL 16.2 is a workaround and the underlying issue is fixed by upgrading python-cryptography.  I upgraded from 14.04 to 16.04 specifically because I wanted V18 on that machine but it never entered my head that it could be an underlying OS issue.  No clue why Canonical won't backport it to Xenial, given that it still has 3 years to EOL.

I'm just annoyed with myself for not thinking of that and/or not doing enough research myself to discover it.  I'd also like to apologise to the team members in this thread for ultimately wasting their time but thank them for providing the support they did and attempting to help me find a resolution.
Learning Linux the hard way !!
Reply
#20
I should probably push a fix to our PPAs
Reply
#21
I did suspect an OS or installation issue from the beginning (because we've seen this behavior nowhere else and it worked on your other PC), but still this is really difficult to find.
So do a version check on python-cryptography?
Reply
#22
(2018-09-28, 10:20)yol Wrote: I did suspect an OS or installation issue from the beginning (because we've seen this behavior nowhere else and it worked on your other PC), but still this is really difficult to find.
So do a version check on python-cryptography?
 It would seem so, according to https://github.com/pyca/pyopenssl/issues...-312968275 although in my head, checking both would be a wise move.  That said, I couldn't upgrade one without the other as dpkg complained that upgrading either package broke the corresponding other package.  Upgrading both at the same time wasn't an issue.

wsnipex undoubtedly knows much better than me what to check.

At least my son will be learning how to use scp and dpkg tonight, to fix his netbook properly !
Learning Linux the hard way !!
Reply
#23
Can you check whether https://github.com/xbmc/xbmc/pull/14512 will disable python add-ons if you are on the "wrong" version?
Reply
#24
(2018-10-03, 16:21)yol Wrote: Can you check whether https://github.com/xbmc/xbmc/pull/14512 will disable python add-ons if you are on the "wrong" version?
 Yep, will do Smile
Learning Linux the hard way !!
Reply
#25
@yol , Yeah I can confirm that that does indeed work.  At startup I get
Code:
11:34:19.462 T:2987341888   DEBUG: ------ Window Init () ------
11:34:19.532 T:2683304768   ERROR: Python cryptography module version 1.2.3 is too old, at least version 1.7 needed

I then installed Yahoo! weather, followed by Youtube.  Once yt had installed it's dependencies, I got this in the log.
Code:
11:35:23.385 T:2683304768   DEBUG: CAddonMgr: enabled plugin.video.youtube
11:35:23.387 T:2683304768   DEBUG: LocalizeStrings: loaded 263 strings from file /home/gary/.kodi/addons/plugin.video.youtube/resources/language/resource.language.en_gb/strings.po
11:35:23.387 T:2756696896   DEBUG: CServiceAddonManager: starting plugin.video.youtube
11:35:23.387 T:2756696896   DEBUG: CPythonInvoker(0): waiting for python thread "unknown script" to stop
11:35:23.389 T:2605595456   DEBUG: Thread LanguageInvoker start, auto delete: false
11:35:23.390 T:2605595456    INFO: initializing python engine.
11:35:23.390 T:2605595456   ERROR: Python cryptography module version 1.2.3 is too old, at least version 1.7 needed

I also found I couldn't set the settings for the weather addon, so yes, it appears impossible to use any type of python script or plugin.

Tested with a fresh build of Kodi from master branch and XBPython.cpp + XBPython.h from pkerling:python-check-cryptography on a fresh install of Ubuntu 16.04.5

Full debug log https://pastebin.com/KtcpCVjx

**EDIT**

Would it be possible to throw a GUI error, perhaps on entry to the addon browser, informing users that they need to update python cryptography with maybe a link to a wiki page ?  Otherwise, users can happily install addons but may have no clue why none of them work.  That said, I'd have found it much sooner with the error in the log but I know not everyone looks at it.
Learning Linux the hard way !!
Reply
#26
@black_eagle We were considering to move the detection to the wrapper script and just exit on startup if the module version is too old. What do you think of that?
Reply
#27
(2018-10-07, 13:56)yol Wrote: @black_eagle We were considering to move the detection to the wrapper script and just exit on startup if the module version is too old. What do you think of that?
 So Kodi won't start if the libraries are too old ? It's a little 'harsh' in my view. I can understand why the team might want to do that, but it gives a user no clue as to why Kodi isn't starting.  Even if the wrapper writes an error message to stdout/stderror it might not be picked up if the machine the user is running is 'appliance-like' or starts Kodi as a service.

Better in my view is to give a GUI notification but I have no idea how easy or difficult that might be. I can see how changing the wrapper script would be relatively trivial and if it was just for me then that's where I would look first, but Kodi has many many users and if they don't get notified of the issue then they may well think 'Bah, it just doesn't work on my system' and not realise that there is a valid reason (that's fixable) for it.

Ultimately, I think if it's possible to flag up the problem in core then that's what I'd prefer, so users know there is an issue. Failing that I guess that failing in the wrapper is OK as long as some sort of error message or log is created to indicate what the issue is.  Just silently failing is never a good idea. Might be an edge case really as new users will probably use 18.04 rather than 16.04 so it won't arise, but people change OS's every day and doubtless someone else will get caught out with the same thing at some point.

If I had found some error message in the log indicating that python-cryptography ( and python-openssl ) needed updating, or had a GUI message indicating the same thing, then I wouldn't have needed to start this thread because I would have known where the issue was.
Learning Linux the hard way !!
Reply
#28
We have implemented an alternative solution that will open a message box on every start: https://github.com/XBMC-Addons/service.x...ck/pull/18

It will be included in the next release beta/RC. Would be cool if you can check it out then and report back whether it works for you.
Reply
#29
@yol I will certainly test it.  I have a laptop that could do with upgrading to 16.04 so it'll make a perfect test bed.  However, I'm sure it'll work fine.  The dialog is a good idea and hopefully will alert anyone experiencing similar issues as to where to start looking.
Learning Linux the hard way !!
Reply
#30
Hi there,

I've posted this here (https://forum.kodi.tv/showthread.php?tid=160228&page=2) already but maybe I get someone to notice it here as the other thread is quite old Wink
(2018-11-05, 19:00)bluezed Wrote: Hi there,
since the last update of this addon a few days ago I'm getting a pop up message on starting Kodi that says:
"Your version 1.1.1 of the Python cryptography module is too old. You need at least version 1.7."

I've just checked with command line Python and that says it has version 1.9.

python:
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cryptography
>>> ver = cryptography.__version__
>>> ver
'1.9'

I'm running Kodi 17.6 on Ubuntu 18.04.1.

Any idea where the Version Check is getting version 1.1.1 from!?

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
[bug] cURL unable to connect to any url starting with https0