Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF1PLUS - Live not starting - 403 error when fetching MPD index #1427

Open
1 of 7 tasks
Nitorac opened this issue Nov 14, 2024 · 10 comments · May be fixed by #1428
Open
1 of 7 tasks

TF1PLUS - Live not starting - 403 error when fetching MPD index #1427

Nitorac opened this issue Nov 14, 2024 · 10 comments · May be fixed by #1428

Comments

@Nitorac
Copy link

Nitorac commented Nov 14, 2024

⚠️ Please try the last beta version and check existing issues before issuing a bug. ⚠️

Describe the bug

A clear and concise description of what the bug is:

When starting the Live channel for TF1 (via TF1Plus), it won't start, and the following error appears in the logs: AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://live-tf1-das-secure.cdn-0.diff.tf1.fr/eyJhbGciOiJIUzI1NiIsInR5cCI6I<...redacted...>/index.mpd

To Reproduce

Steps to reproduce the behaviour:

  1. Enter valid credentials for TF1Plus in extension settings
  2. Try to start the live streaming of TF1
  3. It won't start with an error popup

EDIT: This may only happen during periods or programs when TF1Plus is using DRM.

Expected behaviour

A clear and concise description of what you expected to happen:

It should display the live streaming of the channel without an error

Actual behaviour

Tell us what happens instead:

The video palyer refuses to start, and the kodi.log mentions :

AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://live-tf1-das-secure.cdn-0.diff.tf1.fr/eyJhbGciOiJIUzI1NiIsInR5cCI6I<...redacted...>/index.mpd

Screenshots

If applicable, add screenshots to help explain your problem:

Your environment

  • Android

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Other

  • Operating system version/name: LibreElec 12.0.1

  • Kodi version: 21.1.0

  • Catch-up TV & More version: 0.2.40~beta15

  • Installation method: Through the beta repo channel

Additional context

Add any other context about the problem here:

Debug log

If you can, please add your debug log information (Tutorial available here: https://kodi.wiki/view/Log_file/Easy):

Here are the logs with cURL logging enabled and redacted tokens: https://paste.kodi.tv/tikaxewuci.kodi

@Nitorac
Copy link
Author

Nitorac commented Nov 15, 2024

I may have solved the issue:

There is 2 bearer tokens used by tf1plus.py, one for account authentication and one for widevine session authorization.

The issue arises because the bearer passed to inputstream.adaptative is only the widevine one, and it is invalid for fetching the mpd file (that should be fetched using the account authentication token).

@joaopa00
Copy link
Contributor

Unable to reproduce here with android and linux.

@Nitorac
Copy link
Author

Nitorac commented Nov 15, 2024

Unable to reproduce here with android and linux.

I am testing around some things, and if I delete the Authorization header entirely from the MPD request, it's working.
The error appears only if I give a "wrong" token.

cf HEADER_IN: Reason: edge-vhost/invalid-token

@Nitorac
Copy link
Author

Nitorac commented Nov 15, 2024

I am sending a pull request soon since the fix seems not massive

@Nitorac Nitorac linked a pull request Nov 15, 2024 that will close this issue
@Nitorac
Copy link
Author

Nitorac commented Nov 15, 2024

Unable to reproduce here with android and linux.

Okay, I think it's because some of TV shows are protected using DRM, and not others (earlier this evening I had DRM responses in the TF1Plus live, and now it seems that TF1Plus is not giving any Widevine or Playready authorizations)

@enigma131
Copy link

Hum from which country are you tying to watch ? Geolocalisation ?

@Nitorac
Copy link
Author

Nitorac commented Nov 18, 2024

Hum from which country are you tying to watch ? Geolocalisation ?

France, and from a French ISP

@Nitorac
Copy link
Author

Nitorac commented Nov 18, 2024

When I was first investigating the issue, I saw Widevine authorizations on the live stream tf1.fr that I since couldn't see anymore, it's frustrating

@enigma131
Copy link

enigma131 commented Nov 18, 2024

Tf1 + ne fonctionnait pas tant que je n'avais pas reçu les dernières mises à jour pour Python sur ce Linux 20.3 alors que cela fonctionnait sur Windows en Kodi 21.1. Cela fonctionne-til avec Kodi 21.1 sur Windows ?
Si oui voir du coté mises à jour Raspberry Pi pour Python peut être...

@Nitorac
Copy link
Author

Nitorac commented Nov 18, 2024

C'est possible, mais quand j'ai investigué le bug, sa cause n'a pas l'air liée à un quelconque OS, j'ai pu le reproduire en live avec curl, en gros:

  • curl <url_du_mpd> -H "Authorization: Bearer <token_widevine>" --> 403 "invalid_token"
  • curl <url_du_mpd> -H "Authorization: Bearer <token_de mon_compte_tf1>" --> 200 OK
  • curl <url_du_mpd> --> 200 OK

et dans le code du plugin tf1, il donne effectivement le Bearer de widevine pour faire les requêtes du MPD, du coup j'ai compris où ça déconnait.

Mais depuis, j'arrive pas à retomber sur une émission qui charge widevine sur TF1, elles sont toutes sans DRM, mon hypothèse est que les émissions que possède entièrement TF1, il ne prenne pas la peine de mettre le DRM dessus. Faudrait voir avec des matchs ou des films de gros studios américains je pense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants