emilsvennesson / script.module.inputstreamhelper

A simple Kodi module that makes life easier for add-on developers relying on InputStream based add-ons and DRM playback.
MIT License
136 stars 48 forks source link

Negative download cases are unclear #564

Open helllamer opened 5 months ago

helllamer commented 5 months ago

Hello, @horstle!

$ uname -a
Linux tvpi4 6.6.33-1-rpi #1 SMP PREEMPT Wed Jun 12 13:43:34 MDT 2024 aarch64 GNU/Linux

$ dmesg | grep -i raspb
[    0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.2
[    0.064188] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-05-24T15:30:04, variant start
[    0.068201] raspberrypi-firmware soc:firmware: Firmware hash is 4942b7633c0ff1af1ee95a51a33b56a9dae47529

InputStreamHelper Installed from comment: https://github.com/emilsvennesson/script.module.inputstreamhelper/issues/563#issuecomment-2120916853

It fails to download libwidevinecdm.so with "See logs for more info" message.

kodi.log contains following:

2024-06-14 22:13:11.451 T:11401   debug <general>: CPythonInvoker(6, /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py): start processing
2024-06-14 22:13:11.524 T:11401   debug <general>: -->Python Interpreter Initialized<--
2024-06-14 22:13:11.524 T:11401   debug <general>:

2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6, /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py): the source file to load is "/var/lib/kodi/.kodi/addons/script.m
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6): full python path:
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):   custom python path:
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):     /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):   default python path:
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):     /usr/lib/python312.zip
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):     /usr/lib/python3.12
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):     /usr/lib/python3.12/lib-dynload
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):     /usr/lib/python3.12/site-packages
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6): adding args:
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):  default.py
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):  widevine_install
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6):  True
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6, /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py): entering source directory /var/lib/kodi/.kodi/addons/script.mod
2024-06-14 22:13:11.524 T:11401   debug <general>: CPythonInvoker(6, /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py): instantiating addon using automatically obtained id of "script.
2024-06-14 22:13:11.791 T:11263   debug <general>: PushCecKeypress - received key  b duration 382
2024-06-14 22:13:11.854 T:11401   debug <general>: [script.module.inputstreamhelper] Platform information: uname_result(system='Linux', node='tvpi4', release='6.6.33-1-rpi', version='#1 SMP PREEMPT Wed Ju
2024-06-14 22:13:11.885 T:11401 warning <general>: [script.module.inputstreamhelper] Recursively create directory '/var/lib/kodi/.kodi/cdm/'.
2024-06-14 22:13:11.888 T:11401   error <general>: [script.module.inputstreamhelper] Widevine CDM is not installed.
2024-06-14 22:13:11.892 T:11401   debug <CAddonSettings[0@script.module.inputstreamhelper]>: trying to load setting definitions from old format...
2024-06-14 22:13:11.892 T:11401   debug <CSettingsManager>: requested setting (label1) was not found.
2024-06-14 22:13:11.893 T:11401 warning <general>: [script.module.inputstreamhelper] Recursively create directory '/var/lib/kodi/.kodi/userdata/addon_data/script.module.inputstreamhelper/temp/'.
2024-06-14 22:13:11.894 T:11401   debug <general>: [script.module.inputstreamhelper] Found system architecture arm64
2024-06-14 22:13:11.894 T:11401   debug <general>: [script.module.inputstreamhelper] Acquiring Widevine EULA from x86 files.
2024-06-14 22:13:11.894 T:11401   debug <general>: [script.module.inputstreamhelper] Request URL: https://dl.google.com/widevine-cdm/versions.txt
2024-06-14 22:13:12.125 T:11401   debug <general>: [script.module.inputstreamhelper] Response code: 200

2024-06-14 22:13:15.524 T:11401 critical <general>: [script.module.inputstreamhelper] could not find any available cdm in repo
2024-06-14 22:13:15.548 T:11401   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'NoneType' object has no attribute 'get'
                                                   Traceback (most recent call last):
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py", line 8, in <module>
                                                       run(sys.argv)
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 15, in run
                                                       widevine_install(choose_version=params[2])
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 48, in widevine_install
                                                       Helper('mpd', drm='widevine').install_widevine(choose_version=choose_version)
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 39, in clean_before_after
                                                       result = func(self, *args, **kwargs)
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/__init__.py", line 230, in install_widevine
                                                       if not widevine_eula():
                                                              ^^^^^^^^^^^^^^^
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/widevine.py", line 40, in widevine_eula
                                                       cdm_version = latest_widevine_version(eula=True)
                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                     File "/var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/widevine.py", line 162, in latest_widevine_version
                                                       return latest_widevine_available_from_repo().get('version')
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                   AttributeError: 'NoneType' object has no attribute 'get'
                                                   -->End of Python script error report<--

2024-06-14 22:13:15.549 T:11401   debug <general>: onExecutionDone(6, /var/lib/kodi/.kodi/addons/script.module.inputstreamhelper/default.py)

Previously, in january 2024, inputstreamhelper is successfully downloaded library to /.kodi/cdm.chromerecover/libwidevinecdm.so and to other directories (erased after manual plugin update).

Well, so, ...:

  1. Some message on the screen may be useful for end-users.
  2. May be to add some more debugging between Response code 200 OK and CRITICAL ... could not find any available cdm in repo? Currently it is unclear, what is going on.
  3. libzstd.so 1.5.6-1 installed into
    /usr/lib/libzstd.so
    /usr/lib/libzstd.so.1
    /usr/lib/libzstd.so.1.5.6

    4. Cant find any news about libwidevine and glibc v2.39. Current ldd libwidevine.so.4.10.2662.3 produces error after system upgrade (and patched glibc-widevine removed from repos):

    2024-06-14 22:50:41.990 T:11646   error <general>: AddOnLog: inputstream.adaptive: Initialize: Initialize: Failed to load library: /var/lib/kodi/.kodi/cdm/libwidevinecdm.so: DT_RELR without GLIBC_ABI_DT_RELR dependency
    2024-06-14 22:50:41.990 T:11646   error <general>: AddOnLog: inputstream.adaptive: Unable to load widevine shared library (/var/lib/kodi/.kodi/cdm/libwidevinecdm.so)
    
    # ldd libwidevinecdm.so 
    ./libwidevinecdm.so: error while loading shared libraries: ./libwidevinecdm.so: DT_RELR without GLIBC_ABI_DT_RELR dependency

pacman -Qi glibc

Name : glibc Version : 2.39+r52+gf8e4623421-1 Description : GNU C Library Architecture : aarch64 ...

helllamer commented 5 months ago

(Just for information)

  1. "DT_RELR without GLIBC_ABI_DT_RELR" fixed in ArchLinuxARM using:
    git clone https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=widevine
    cd widevine
    makepkg -sic
    cp /opt/WidevineCdm/chromium/_platform_specific/linux_arm64/libwidevinecdm.so /var/lib/kodi/.kodi/cdm/
emilsvennesson commented 2 months ago

@helllamer Sorry for the late response, but can you check if this has been fixed with 0.7.0?