NO_CERTIFICATE_OR_CRL_FOUND errors preventing any https connection (from addons at least)

  • This started happening a few days ago, I don't remember having done anything special to trigger this.

    Hardware: Orange Pi PC Plus (Allwinner H3)
    OS: LibreElec 12.0.0

    All plugins needing https connections now display something like this in the log file:

    The file /run/libreelec/cacert.pem looks normal.

  • Have a search in the YouTube add-on support thread in the Kodi forum. Most likely Google fiddled with their API's and something needs tweaking in the add-on and there'll be some discussion.

  • I submitted the bug and had the answer here: https://github.com/anxdpanic/plugin.video.youtube/issues/837

    Quote

    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.

    Help welcome!

  • Judging by the reguarly changing list of garbage search terms my kids are using the YouTube add-on daily without issues (and it works here for me in random tests/checks) so the add-on is 'working' generally. The latest LE12 nightly has an updated cacert.pem file in the last week or so, but this is unlikely to be the cause or fix of your problem as changes in root certs are rare and coordinated to avoid large scale internet breakage. There are technical reasons (the use of CDN infrastructure) which mean the certs that Google infrastructure presents to you will be different to the ones presented to me, but Google generally does a reasonable job of ensuring its services work so that's unlikely to be the cause either; and breakage on their side is normally temporary not persistent.

    Have you deployed a custom cert locally? .. something that would append to the default (embedded) cacert.pem file?

  • No, I haven't any additional certs. I tested to wget the 1st URL, and there doesn't seem to be a certificate issue:

    Code
    # 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

    If it was a CDN or certs issue, wget would also fail, right? Maybe a python only issue? Any more ideas?

    If it was just to fix the issue, I could backup kodi settings, erase all data inside /storage then reboot and restore? But maybe it's worth digging?

  • It's worth taking a backup, resetting, then unpack the backup and only restore the minimum userdata items like sources/passwords and add-on settings data; everything else should be clean installed. Don't just restore the backup, as if the issue is something gone bad, you'll end up restoring it and negating the clean reset.

    I'm fairly confident it's something local to your install or environment. If the add-on was generally broken we'd see complaints from more users, and we're not.

  • Just FYI, I got help from the YT plugin people here.

    The file inside ~/.kodi/addons/script.module.certifi/lib/certifi/cacert.pem was messed up. Replaced it from git repo.

    It saved me reinstalling LE and restoring settings.