add-ons / plugin.video.vtm.go

Kodi add-on to watch video-on-demand content and live streams from VTM GO.
https://github.com/add-ons/plugin.video.vtm.go/wiki
GNU General Public License v3.0
73 stars 24 forks source link

why is my VTMGO - login not accepted even with another password and emailaddress linked on dpgmedia in belgium #387

Open wim63 opened 1 week ago

wim63 commented 1 week ago

Describe the bug A clear and concise description of what the bug is. when try to login the latest version of your plugin here plugin.video.vtm.go, i always keep on being asked to login on my addon and it doesnt even want to connect to the internet with a weird error: xmbc.python plugin is not fulfillable. How can i get a version vtmgo addon in kodi coreelec that accepts the login only one time and not repeats that query again?

To Reproduce Steps to reproduce the behavior: 1.installting matrix plugin on coreelec add-on plugin.video.vtm.go 2.opening the add-on makes me ask for the pasword to be filled in in my account but....it always gives the same error just like' vtm Go Error (no further info on the screen)

  1. and then it hangs for a while thinking it is loaded but the loading wheel gets stuck somehow

Expected behavior A clear and concise description of what you expected to happen. What is to be expected is a normal one time plugin login.

Screenshots If applicable, add screenshots to help explain your problem.

Logs Add debug logs to help troubleshoot the issue. See https://kodi.wiki/view/Log_file/Easy for more info. i tried to do this but in kodi i am not able to log now because the error happens before pressing the button on the add-on

System

Additional context Add any other context about the problem here. I really am getting my nerves about this problem because there a lot of programmes i would like to watch there before their gone because in belgium the only keep backups if it is important for the world but even then time is limited to be able to watch throug the years something you've missed and the dont come back with a saved version in youtube forget about that kind of kindnessin belgum towards programmes. so a quick good fix for years must be able to be done. i found out that if you type login.vtm.be/androidtv that site for logging in to dpg does exist so maybe is question of looking for a twice logged in in you authentication python file and update the version to python3 just to mention what could be done.i am hoping an soon solvable respons with sending this to you

anyways kind regards wim pauwels

Clyde72 commented 1 week ago

I have the latest version since a long time and since some days it doesn't work anymore. I guessed connection/login issue with dpg media so I uninstalled and reinstalled it yesterday and I was correct. Can't register/connect anymore. As what you are describing.

@michaelarnauts I guess something must have been changed from dpg media's server side

wim63 commented 1 week ago

Is it possiblle to be fixed or do you need to negociate about it with the developpers of dpg because it is very annoying at the moment: when i pulled a api registration commandline code i saw that normal accounts dont login anymore the only want you to registrate through an email sent code without password. so maybe there is some way to refix that in the code of authentication.py files. ? i am hoping you can soon find it and most of al fix it. i know you have other things on your list to do but i woulld presume this is something important to many users as from now on i think there are many people who use kodi or corelec or ibreelec and thy want in belgium this addon then it should be somehow working in a short time.

people dont like to login after and after again because it is timeconsuming andnot good for them.

in my case no worries but maybe you could implement an (just a proposal) peace of the web inteface of dpg into the code to be able to get a full login system connected to the addon so it goes directly to their servers so that loginsystem is a UI interface with the right login seperated from the kodi logins. just wondering if that could be possible and i will be able to try it out for you before you sent it to public instances. so you can work on the code without all the negative comments to read beause as long as it is not fixed you need time to do that and a few people to try the reinstall or the update plugin as something that is to be stagely develloped. sorry for my long conversation here i was just thinking with you together we come to vtm go we solve this somehow. because i also tried to remove the services and other stuff to be able to login but it doesnt work because the login has an error and i was looking at the scripts and maybe it could also be that the registration link needs to be alterd in a not seperated token file in py but as on option to login through the addon? could that be helping you dont need to refresh the token code as long as you can login does it?

and more i like to say i am willing to try everything to help you out in my brain not that i am a programmer but i am glad to hep you testing every single bit of a new addon you can put together in the login stage to be solved.

so kind regards again from wim pauwels (en eigenlijk ben ik nederlandstalig maar ik dacht ik zal het in het engels doen dan begrijpt iedere bezoeker het)

wim63 commented 1 week ago

@michaelarnauts i will paste here the result the command i mentioned before in the previous comment in this peace of command the last lines are for taking in consideration towards changing the login procedure for our loved vtmGO plugin.

`wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://login2.vtm.be/authorize?response_type=code&response_mode=form_povtm.be/vtmgo/aanmelden?redirectUrl=https://vtm.be/vtmgo' wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://vtm.be/vtmgo/aanmelden?redirectUrl=https://vtm.be/vtmgo' wim-tv:~ # curl -X GET -H 'Cookie: authId=2dc44dfb-514f-48cb-9962-71836534ee41' 'https://login2.vtm.be/authorize?response_type=code&response_mode=form_post&client_id=vtm-go-web&scope=openid%20profile&state=nQhCIMGeFoK6oyNZ-G8S8tA47r8Yt3EsqanKbBl4FgY=&redirect_uri=https://vtm.be/vtmgo/login-callback' <!DOCTYPE html>

Inlogpoging geblokkeerd

Inlogpoging geblokkeerd

Om veiligheidsredenen is het inloggen met wachtwoord tijdelijk niet toegestaan.

  • Ga terug naar de loginpagina en kies voor inloggen met code.
  • Er wordt dan er een 6-cijferige code naar het emailadres gestuurd dat bij het account hoort.
  • De browser zal een pagina tonen met een invoerveld waar die code ingevoerd kan worden, waarna je ingelogd bent.

Status 406 : 0.19173317.1719574886.c81be9c

` hoping this situation info can help you out for reprogramming our login errors? so the server doenst see vtmgo passwords anymore but it keeps comming back as the login is regenerated; that is not right. waiting for you to let me help you out with the testing whatever you change i will try a new installation of your changes. kind regards wim pauwels
Clyde72 commented 1 week ago

sticking to English is common practice on international tech platforms and yes, it is so all visitors could follow (also Flemish here)

michaelarnauts commented 1 week ago

I'm not using Kodi (and so also this plugin) anymore, but if someone can find a fix, I can make a new release for it.

I assume they have updated the required API version. See https://github.com/add-ons/plugin.video.vtm.go/pull/376 for a previous fix. It might be this simple.

It can also be that they changed some domains. To really check, you would need to setup mitmproxy, and push a patched apk to your mobile phone or emulator, so you can intercept the HTTPS traffic the app is making towards the dpg media backend.

@wim63 I'm not sure what you are saying, but we don't use the username/password authentication flow, but the device flow. This requires to go to a webpage, login and fill in a code. The addon keeps on checking in the background to see if authentication has been granted.

@Clyde72 Correct, I assume all people here speak dutch, but I tend to keep my communication in English on GitHub.

wim63 commented 1 week ago

i found tshe explenattion of the backend that is in java written and partly in something else: https://dpgmedia-engineering.medium.com/how-we-built-it-direct-a4acfbcae41b

in this url you may find a bit more information maybe when you go to sitemapsyou find more information about it.

i will look into it futher untill i find it i wont stop with looking for it why the problems with login in vtmgo are this hard today. shouldnt be nontheless it should easier. may be it is now another server dns orsomething that we need to rename in the python code i dont know but i will soon be clearer about all this

kind regards wim pauwels

wim63 commented 1 week ago

as a result of my searching i found this command under linux to find at least already the DNS servers of vtm.be

wim@wim-desktop:~$ host -t ns vtm.be vtm.be name server use2.akam.net. vtm.be name server eur2.akam.net. vtm.be name server eur5.akam.net. vtm.be name server ns1-25.akam.net. vtm.be name server ns1-125.akam.net. vtm.be name server eur6.akam.net. vtm.be name server usc2.akam.net. vtm.be name server use5.akam.net.

i am gonna go now to the dpg servers to see what is changed there:

for vtmgo this wil be the names:

host -t ns vtmgo.be vtmgo.be name server use2.akam.net. vtmgo.be name server usc2.akam.net. vtmgo.be name server eur2.akam.net. vtmgo.be name server use5.akam.net. vtmgo.be name server eur6.akam.net. vtmgo.be name server ns1-125.akam.net. vtmgo.be name server eur5.akam.net. vtmgo.be name server ns1-25.akam.net.

now i am gonna give the dpgmedia.be dns servers

curious myself

host -t ns dpgmedia.be dpgmedia.be name server use5.akam.net. dpgmedia.be name server eur6.akam.net. dpgmedia.be name server use2.akam.net. dpgmedia.be name server ns1-25.akam.net. dpgmedia.be name server eur2.akam.net. dpgmedia.be name server usc2.akam.net. dpgmedia.be name server ns1-125.akam.net. dpgmedia.be name server eur5.akam.net.

to add the numbers of the ipaddressess i will dig further:

something to find is the following result i found the adresses for dpgmedia acounts and guess what: google handles the protocols i think look at these results for a moment: host dpgmedia.be dpgmedia.be has address 23.50.131.132 dpgmedia.be has address 23.50.131.139 dpgmedia.be has IPv6 address 2a02:26f0:3500:14::1724:a24c dpgmedia.be has IPv6 address 2a02:26f0:3500:14::1724:a24d dpgmedia.be mail is handled by 1 aspmx.l.google.com. dpgmedia.be mail is handled by 5 alt2.aspmx.l.google.com. dpgmedia.be mail is handled by 5 alt1.aspmx.l.google.com. dpgmedia.be mail is handled by 10 aspmx3.googlemail.com. dpgmedia.be mail is handled by 10 aspmx2.googlemail.com.

so i will now look for more info with this site i am almost there i am gonna take a short break i did this all in two hours just mention. so just to mention the website i got the info from: https://www.cyberciti.biz/faq/linux-unix-host-command-examples-usage-syntax/ this are probably things u can use? because the fix you sent was already implemented in my version of vtmgo on kodi. probably you can find a hint in here i will also look further after my break for what is wrong in the links in vtmgo.py because i probably saw something but it could be wrong seen from my side. but i will keep you updated. kind regards again

gustav-janssens commented 1 week ago

Unfortunately it doesn't look like it's as simple as bumping the version again to e.g. 16, similar to #376... When I try to use the following User-Agent and x-app-versions:

'User-Agent': 'VTM_GO/17.240626 (be.vmma.vtm.zenderapp; build:19069; Android 34) okhttp/4.12.0',
'x-app-version': '17',

It no longer gives an error as reported in #386, and opens the app, but all the program lists are empty...

I got these values by decompiling the most recent VTM GO Android APK, I guessed that perhaps I could find the values to use there... At some point in the app (unfortunately it's obfuscated), the User-Agent is set like this:

return sx.w.a("User-Agent", upperCase + "/" + versionName + " (" + applicationId + "; build:" + versionCode + "; " + str + " " + Build.VERSION.SDK_INT + ") okhttp/4.12.0");

I got the values for versionName, versionCode and SDK version out of the AndroidManifest.xml.

Not sure where to go from there, but perhaps this gives someone inspiration...

ghen2 commented 1 week ago

I was just testing the same; bumping the x-app-version as in #376 makes the "426 Upgrade Required" go away, but now every menu item gives a 404. So more changes will be required.

davidbe commented 6 days ago

I analysed it a bit. See gist: https://gist.github.com/davidbe/4a09ebc002d4d61cc33f993d5b55f87a

Registering a new device works, that is not an issue. As @gustav-janssens and @ghen2 mentions, bumping User-Agend and x-app-version solves the "Upgrade Required" error.

@michaelarnauts , that's already something that needs to be updated!

Other issue is, I guess, in parsing the json that is returned for items in the menu. That is something I have to dig in further to understand what has changed.

michaelarnauts commented 6 days ago

@davidbe that's a great start! I suppose the JSON has indeed changed a bit. If you follow the code, there is a part where I loop over the JSON structure and create actual python objects (Program, Movie, Series) for this. I think the structure has changed a little bit, probably near the top, so it doesn't find any results when looping.

You can also try to run pytest, it should run automated tests, and makes it easier to try a change somewhere and run a test. I think you do need to update an .env file, not sure anymore. (Typing on my mobile, do I can't really check).

Good luck!

davidbe commented 5 days ago

@michaelarnauts , thank you for the hint.

I did some follow-up analyses (a bit more chaotic / incomplete: https://gist.github.com/davidbe/f9ba35d9d5a51c68c4ccf3c50b44e041). My conclusion is that vtmgo has simplified different items in their json. It seems that there is no difference anymore betwoon program, movie and series. All have the same content.

I guess what is needed is:

This is not a little change. :-/

wim63 commented 5 days ago

and i am willing to wait for the update as long its been reworked nicely like you say. i also asked the team of vtmgo to be more open about the procedure through an emailcontact we will hopefully get soon response because in the weekend nobody works besides us then?😇😉 iknow just mentiib that with a broad joking smile but nowserious again the thing is i will send that answer to you if not clear for the problem enough it is i will softly push them in words to give more details about the server structure the mai tainer wins here and as soon we get response the more actions you all can take to make the plugin work again like it should. i believe we will accommlish this mission. i have time to ask many questions about it but my mail was sent friday and myself i was ill from wednesday previous week but i kept holdi ng on to figure this issue out like normally they should from their side be more transparant on it no worries i could get harsh words on it then i bow myself over the peace of mail again and give a retry in other words if we all stand together on this issue without naming you as developpers we could get were we want i my opinion. standby please.. i keep you all updated fir more news in it okay? see you later kind regardswim pauwels

Op zo 30 jun. 2024 20:42 schreef david @.***>:

@michaelarnauts https://github.com/michaelarnauts , thank you for the hint.

I did some follow-up analyses (a bit more chaotic / incomplete: https://gist.github.com/davidbe/f9ba35d9d5a51c68c4ccf3c50b44e041). My conclusion is that vtmgo has simplified different items in their json. It seems that there is no difference anymore betwoon program, movie and series. All have the same content.

I guess what is needed is:

  • to add a new object, which is more generic, Teaser (that's how they are called in the json?)
  • rewrite the main storefront-method where the whole json is parsed and build up in cache to not make a difference between program, movie and series
  • rewrite of all the helper-methods

This is not a little change. :-/

— Reply to this email directly, view it on GitHub https://github.com/add-ons/plugin.video.vtm.go/issues/387#issuecomment-2198647206, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJQCCZ4XTIF2MSZ5IEFQLQDZKBGQBAVCNFSM6AAAAABKA5MWAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGY2DOMRQGY . You are receiving this because you were mentioned.Message ID: @.***>

michaelarnauts commented 5 days ago

Please don't involve DPG Media with this. They won't disclose details about anything. This whole plugin is done by reverse engineering the API in someone's free time.

wim63 commented 5 days ago

i just need to understand it too why im always logout from the androidtv app also the mobile one it keeps me mogging out and they assume there are no reasonable changes dont make me mad in this issue i know what i asked is just about the real login app login even thethe protocol keeps changing something and i really like to k ow how teprocedure works if they say you dont need apasswd and the salme screen keeps coming not normal in my eyes. i just really needto see why 3 credentials and on what liinks they are put so i can adapt en write the links for authentication and see with your p!ugi n fidnt say something about developoers my mail so no worries we just need the procols. example of fixing the imposssible is one day i worked for a pidgeon company that gave pidgeons to a transport for letging them fly back home and al those people were saying they had no internet in the same street. it was no option for the representatives to let them be all be flying for price just because a certain doculent could not be rdworked buy a colleauge inshort i called the provider of the modem bevause it was down. the first really stupid question from the man behind the phone he said : how do you call me? i said i needed directly someone to fix a internet problem for a whole street now it can be frustrating when hearing to have to wat or buy a new modem because in oyr situation those animals were already on their way to be freed in the morning. now i said do we really have make this happen that 50 people had to go back to the person who did all the calculating work to make the pidgeons abke to prices. dayflight iption was not ootion i daid zt the man and he git nervous but i repeated what i needed again maybe you have someone standby it was euhm already half past ten i the late evening but i became a winner because when he said to call back tomorrow then a disagreed with him i stubbor'n held the kine so i could make himcall the person that was standby at stil 11 o clock eveningtime to make him come he called me from his own mibile and what they did is replace a new phonecard in a case in the street there by an older one the prevous one. he xame to see if it worked and we were al satisfied myself the most iff zll i dont like to call but if it necessary i always win. not for the winning feeling buypt just for the feeling i made more than 50 players with pidgeons their day and night. sorry i mistyped some letters in the story but it is not a joke it is very true. so peoplehad internet and could follow their flight again. not making this true story. that is just one of my helping stories there many in my life that were good ended like this one here. they all gave mea drink and most of all i had many grateful thanks gotten from all the people there before nobody believed i coul fix it in two hours my father in law didnt except me to fix it but if i could he was most asthonished and stood a few minutes shaking his head. lesson learned if companies dont be transparant enough you can dubtile to dig further to make them act right towards the questions. just to mention this as that i do belive in action takers like myself if you dont do it yourself you lose selftrust and talking the right words some people dont think thrice but i do think long before answer is given in detail so i tell everything i think thats the truth no other shorter way for me i am a person with autism but i can talk verywell. just to mention what i see is what i will get is my motto. kind regards i it was long but thee story took in fact three hours before i heard someon so i know what i am doing believe inme please. just to help you anonymously towards vtmgo no worries will get info this soon.kind regards

Op zo 30 jun. 2024 22:03 schreef Michaël Arnauts @.***>:

Please don't involve DPG Media with this. They won't disclose details about anything. This whole plugin is done by reverse engineering the API in someone's free time.

— Reply to this email directly, view it on GitHub https://github.com/add-ons/plugin.video.vtm.go/issues/387#issuecomment-2198688468, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJQCCZ3NP7RWPVVZDIJHS43ZKBQCVAVCNFSM6AAAAABKA5MWAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGY4DQNBWHA . You are receiving this because you were mentioned.Message ID: @.***>

Jerry911 commented 4 days ago

A couple things changed:

1) The API key is now jL3yNhGpDsaew9CqJrDPq2UzMrlmNVbnadUXVOET 2) x-app-version went from 15 to 16 3) In vtmgostream.py:_get_video_info the post data now has to include an ads section data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' } 4) The base url changed from https://videoplayer-service.dpgmedia.net/config/ to https://videoplayer-service.dpgmedia.net/play-config/

These changes got my own script going again

trick72 commented 4 days ago

Great info and a relieve that you got it working again. Hopefully we can see these changes in a new update of the app?

Clyde72 commented 4 days ago

Nice. Seems like we gonna get served streams with ad blocks now. Bummer but not a disaster.

wim63 commented 4 days ago

@Jerry911 If iI tried to do your adaptations to the code in mine (at first it is need to disable the old plugin and to copy then he whole filetree to the named folder overwrite them allwith your adaptions) but somehow at the login the thing works but i dont find any streaming content anymore? i iam able to see the list of folders and underneath they open well but when playing a live stream nothing is active? any way how did you solve that problem? please let me know i am in the waiting rooom at this moment with the qestion?

so i adapted nothing exept that i added the code line 3 of your comment in the right way underneatch the other data word so there are now two datas underneath each other.would that be the problem? do i need to delete the old line above it? please tell me soon. kind regards wim pauwels

Jerry911 commented 4 days ago

@wim63

I am quite sure that you will have to include all of the changes I mentioned. The url from where the content is served changed so the old one wont work. The api key also changed and the app version was also mandatory to update for me to get the requests working.

Also I did these changes on my own scripts which do something different than this repository. I used some of this code as a base though and those 4 changes got it working again for me so I assume that playback should work to.

I am also still trying to figure out where the values for the third point come from, I copy pasted my values that I found in the web browser post request. Those values are personal though.

wim63 commented 4 days ago

@Jerry911 i must have said it it a bit wrongly but I really followed your four steps. i only cant play livestreams so that must be probably the question for me to you to answer: i just pasted the point code only the code like so:

In vtmgostream.py:_get_video_info the post data now has to include an ads section data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' }

in the file underneath the existing word 'data......' in the code of that file but maybe i need to delete the same wordcode form the upperline? that is what is bothering me now; i am waiting for your answer again but in the mean time i will try that file change to do work. i will keeep you updated when i found it or not. already thanks for kind answering my question and till soon kind regards wim pauwels

Jerry911 commented 4 days ago

@wim63 You need to replace the entire data = part so the code should only say data = { 'deviceType': 'web', 'zone': 'vtmgo', 'ads': '{"provider":{"advertisingDeviceId":"id","advertisingNetworkUserId":"id","gdprConsentString":"b64string"}}' }

Where you have to insert your own advertising id, network user id and gdpr consent string. There should not be 2 "data =" lines, though the last one should override the first one. So I think the problem will probably be something different. I have no experience with the live streams, could be that that url also changed. Or maybe it also requires a new json payload.

wim63 commented 3 days ago

@Jerry911 i found something about the used streaming protocol: i now know why it is not playable the live tv: i used Bubblepnpserver for it to try to stream the appstream video live to the tv on my kodi mediacenter (not chromecastplayer) only dlna/upnp connected but it failed because of the fact that the stream is in WMP code and not mkv or mp4 . so i think that the encoding of the video in their system is not opensource coded. could we do something about that problem (a fix a workaround)?

so that there is a soution to the llive stream section? if we can find this one i i wil today try many things to test that problem. if someone works with me to see of course what coudl be wrong like you did before in code language of course.

we need to retreive the live stream WMP coded stream an put that perhaps instead of the player that now doenst fuction as long as it is logged in by me..... just thinking ..... gonna try something and i will let you know for sure when it worked what i changed.

Firomanio commented 2 days ago

@Jerry911 you said "Where you have to insert your own advertising id, network user id and gdpr consent string." any tips on where I can retrieve those?

gustav-janssens commented 1 day ago

@Firomanio through accessing VTMGO via the browser, use the dev console of your browser, look at the payload of a post request when you watch something there. That should contain the values of "advertisingDeviceId", "advertisingNetworkUserId" and "gdprConsentString".

Unfortunately, using the values I found this way, I was not yet able to for example play a channel, I'm getting server errors (500). Not sure why...