xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
453 stars 242 forks source link

[Bug] problem with decrypting segments from ver. 21.5.1 #1632

Closed mtr81 closed 2 months ago

mtr81 commented 2 months ago

Describe the problem

I try to playback DRM-protected content. ISA successfully obtains the license but has trouble decrypting the audio/video segments. The above problem occurs from version 21.5.0 21.5.1.

Possible fix

No response

Steps to reproduce

  1. starting playback DRM-protected video content
  2. choosing quality profile
  3. playback isn't starting

Debug log

log.txt

Stream manifest file(s)

manifest_1723304692.txt

Additional info

No response

Operating system(s)

Android, Linux, Windows

Operating system version(s)

Windows 10, Android 7.0, Linux x86 64-bit

InputStream Adaptive version(s)

21.5.2

Kodi version(s)

21.0.1

CastagnaIT commented 2 months ago

problem found, this k21 build shoud works: https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1634/1/artifacts

mtr81 commented 2 months ago

The problem still occurs. log.txt manifest_1723377256.txt

CastagnaIT commented 2 months ago

can you provide a log with same stream played on last working ISA?

mtr81 commented 2 months ago

ISA 21.4.9: log.txt manifest_1723467651.txt

CastagnaIT commented 2 months ago

@glennguy have you some idea? i inspected all code changes but i only found the fixed regression PR merged i verified also initData/default kid and data seem conform to old 21.4.9

glennguy commented 2 months ago

In logs from working/not working you can see the difference in where the code branches here: https://github.com/xbmc/inputstream.adaptive/blob/f0a288712eed7e0ca226f34a64d3292e982e5fea/src/Session.cpp#L395-L404

It appears that in the current version log licenceData is not empty in @mtr81's setup, whereas for 21.4.9 it's empty and using the default {KID} - whether the same license data is being passed into the properties for both is another thing - can't see in the log.

@CastagnaIT was the change in regression PR fixing anything? From what I can see the only manipulation that happens to licenceData is when it is empty to start with.

CastagnaIT commented 2 months ago

It appears that in the current version log licenceData is not empty in @mtr81's setup

@CastagnaIT was the change in regression PR fixing anything? From what I can see the only manipulation that happens to licenceData is when it is empty to start with.

yes the fix PR was fixing the licenseData var that was printing incorrectly on log "License data: Use PSSH data provided by the license data property" i have attached test build comment above https://github.com/xbmc/inputstream.adaptive/issues/1632#issuecomment-2282649963 but @mtr81 affirm on comment later https://github.com/xbmc/inputstream.adaptive/issues/1632#issuecomment-2282747532 that fix dont solve the problem (hoping he did not accidentally installed a wrong ISA file)

at least from my part i have no way to understand the problem since im not able to see whats wrong in code, the only way for me is doing a slow brute force test, build each single PR code change from 21.4.9 to 21.5.0 at test each single builds, but needs the addon and the login otherwise it is impracticable

mtr81 commented 2 months ago

My fault. I noticed that I did not have v21.5.0 on my system :-(. I installed it manually and playback works fine. So the problem appeared in the next version (21.5.1) released a few days later. Sorry for the confusion.

CastagnaIT commented 2 months ago

weird that 21.5.1 dont works i have already previously verified that changes, default kid its the same, CreateISMlicense make the same licensedata bytes of previous version there are no relevant changes in decrypter only data type change no functional changes so idk

CastagnaIT commented 2 months ago

Try to see if maybe this test build works (k22) https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1639/4/artifacts

zuzia-dev commented 2 months ago

@CastagnaIT No change, the problem still occurs. KODI v22 with InputStream Adaptive with your latest patches. Sorry, but I can't upload the entire log because it contains too much data that I don't want to make public.

2024-08-20 12:35:56.030 T:11068   debug <general>: Curl::Debug - TEXT: Request completely sent off
2024-08-20 12:35:56.034 T:11080   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.034 T:11080   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.040 T:11082   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.040 T:11082   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.045 T:11083   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.045 T:11083   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.049 T:11084   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.049 T:11084   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.055 T:11085   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.056 T:11085   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.056 T:11086   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.058 T:11086   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.062 T:11087   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.062 T:11087   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.064 T:11088   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.064 T:11088   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.065 T:11089   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.065 T:11089   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.066 T:11066   debug <general>: Curl::Debug - TEXT: Connected to xxxxx(xxxxxxxxxxxx) port 443
2024-08-20 12:35:56.066 T:11066   debug <general>: Curl::Debug - TEXT: GnuTLS ciphers: NORMAL:-ARCFOUR-128:-CTYPE-ALL:+CTYPE-X509:-VERS-SSL3.0
2024-08-20 12:35:56.071 T:11090   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.072 T:11090   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.077 T:11091   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.077 T:11091   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.078 T:11092   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.078 T:11092   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.080 T:11093   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.080 T:11093   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!
2024-08-20 12:35:56.083 T:11094   debug <general>: AddOnLog: inputstream.adaptive: LogDecryptError: Decrypt failed with error code: 2 and KID: 97892934396752757249573759758957
2024-08-20 12:35:56.083 T:11094   error <general>: AddOnLog: inputstream.adaptive: Decrypt Sample returns failure!

This bug was not present in version 22.1.0, it appeared from the next version of InputStream Adaptive.

CastagnaIT commented 2 months ago

worth a try but nothing... log is same as above, as said above i have no way to fix this issue

the only way is that someone provide me the addon+login, or else the addon+addon user data (so that the login is already on addon userdata and not in clear) and hoping its not gelocked, this way i can make incremental tests by reverting each single part of code change/debug if anyone is willing, send to my PVT email

basilgello commented 2 months ago

@zuzia-dev I strongly advise you to reach @CastagnaIT in private and get the issue fixed. Trust me, no one is gonna steal your paid IPTV credentials :) You can set a temporary password and change it when the issue is over.

CastagnaIT commented 2 months ago

yeah i have zero interest in stealing credentials i am no longer a small kid... :) anyway i received pvt email from @mtr81 i will see if im able to play videos

basilgello commented 2 months ago

You are a b1g k1d now, arent you? :)

CastagnaIT commented 2 months ago

You are a b1g k1d now, arent you? :)

also much tall kid :)

i tested the addon sent to me, but using VPN to Poland as suggested dont works, raise an unhandled error that make the addon to crash

2024-08-21 10:00:37.446 T:13232   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'response'
                                                   Traceback (most recent call last):
                                                     File "D:\KodiPortable_Builded_20\portable_data\addons\plugin.video.canalplusvod\main.py", line 1665, in <module>
                                                       PLAYvod2(exlink)
                                                     File "D:\KodiPortable_Builded_20\portable_data\addons\plugin.video.canalplusvod\main.py", line 398, in PLAYvod2
                                                       CANALvod().RefreshPassToken()
                                                     File "D:\KodiPortable_Builded_20\portable_data\addons\plugin.video.canalplusvod\main.py", line 1299, in RefreshPassToken
                                                       self.createTokens()
                                                     File "D:\KodiPortable_Builded_20\portable_data\addons\plugin.video.canalplusvod\main.py", line 969, in createTokens
                                                       if resp['response']['errorCode']==0:
                                                   KeyError: 'response'
                                                   -->End of Python script error report<--

the "resp" var contains {'message': 'Unexpected Request', 'ref': '0.74ac1002.1724227237.3813985', 'ip': 'redacted'} i posted here the content just if you want handle the error

i disabled the VPN and addon works correctly! i will let you know when i will have news

basilgello commented 2 months ago

Likely reverse groblock aka VPN detector

zuzia-dev commented 2 months ago

i disabled the VPN and addon works correctly! i will let you know when i will have news

That's right. On a temporary access right basis in the EU, so it doesn't require the use of any VPN.

CastagnaIT commented 2 months ago

fix on the road, if somene can confirm: k21 https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1648/1/artifacts k22 https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1647/1/artifacts

basilgello commented 2 months ago

also much tall kid :)

And you fixed the KID ;)

zuzia-dev commented 2 months ago

fix on the road, if somene can confirm: k21 https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1648/1/artifacts k22 https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1647/1/artifacts

It is working for me. Thank you for the quick fix.

basilgello commented 2 months ago

@zuzia-dev Thanks for testing and the creds :)