Closed bolet closed 4 months ago
The issue looks specific to YT, other addons still work fine.
This has nothing to do with this plugin. There is something wrong with your system certificate store. Or maybe the certifi module.
You will need to check why your system certificate store does not contain the information that is required to verify/make a secure connection to the YouTube servers.
As a workaround you can disable https verification in the plugin advanced settings, but this is not a recommended course of action.
Or maybe the certifi module.
There is a regression in the current 2.32.x releases of the requests module itself, that causes it to not load the default certificates from the certifi module when the default adapter is not used.
This will generate the type of errors you are seeing, but this version of requests isn't available in the kodi repositories...
A debug log is required when opening bug reports. If you had provided this, it would have been immediately obvious if this was the cause of the problem and also identified if you were loading a version of requests from your system Python installation rather than the one provided by Kodi.
Either way you should be able to revert whatever changes you did to upgrade requests until they release a fixed version.
I thought the portion of log I sent was enough for this issue. Should I send more? The startup portion? I also raised the issue on LibreElec forum. Maybe it could be worth having a look? Meanwhile I also tried a wget on the 1st URL, and though it fails, the error code shows we passed the https cert phase:
# wget -O- "https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false"
Connecting to www.youtube.com (216.58.214.174:443)
wget: server returned error: HTTP/1.1 405 Method Not Allowed
Any new thoughts?
Info about creating a debug log is included when creating a bug report, but as I said before your problem doesn't have anything to do with this plugin specifically, I'm just trying to provide you with some info that you can use to resolve the problem yourself.
A debug log will be able to confirm whether what I'm guessing has happened (using an old version of LE12, with an old alpha version of Kodi v21 that has a bug with loading system python modules in preference to Kodi python modules, along with a new version of the requests module that has a regression associated with loading default certificates), has actually happened, but it's not something I have the time to look into for you.
Any new thoughts?
No, just what I have already advised - downgrade requests pip install --force-reinstall "requests<2.32"
Or upgrade LE.
Edit: I don't follow LE releases, but what I'm guessing has happened doesn't actually seem likely. You can try downgrading requests anyway, but it may still be an issue with the certifi module. Just too much missing information, and I'm not a fan of 20 questions
Ok, so here is the complete debug log since LE booted. LE is minimal and doesn't have pip, plus the filesystem is read-only, so downgrading requests is not an easy option. Note that other https requests are working in Kodi, typically sending https URL to an mp4 file will play it.
LE is minimal and doesn't have pip, plus the filesystem is read-only, so downgrading requests is not an easy option
True, so lets see if it is necessary first.
There is a difference between a debug log and a regular log.
To get the required information regarding which modules are being loaded you need a debug log.
https://kodi.wiki/view/Log_file/Easy
Note that other https requests are working in Kodi, typically sending https URL to an mp4 file will play it.
This will depend entirely on how the requests are being made. Your issue is related to the Python requests
module.
Indeed, the debug log is much larger, so I rebooted and reproduced and here it is.
Everything looks normal so you are back to this:
Or maybe the certifi module.
Uninstall and reinstall script.module.certifi
For whatever reason ~/.kodi/addons/script.module.certifi/lib/certifi/cacert.pem
seems to be borked on your system.
Thanks a lot, it works again! I can't figure out how it got messed up,
I ended up copying files from the git repository, because I couldn't find how to uninstall/reinstall from within LE.
Context
Please provide any relevant information about your setup
Expected Behavior
Play a YT video
Current Behavior
Login Error
Steps to Reproduce
The YT videos used to play fine, then suddenly there was this issue and I found those errors in the log. I can't remember having done anything special which could trigger the bug.
Please provide detailed steps for reproducing the issue.
Log
Additional Information
The error was originally happening on addon version 7.0.5. I updated to latest beta, error still happens. I deleted addon with its data, and re-install. Error still happens in the logfile as soon as the code tries to fetch a https url.
The issue looks specific to YT, other addons still work fine.