robvdpol / RaceControl

Race Control is a standalone, open source F1TV client for Windows, written in C# on the .NET platform.
GNU General Public License v3.0
1.19k stars 95 forks source link

"Request failed with status code Forbidden" on start up #414

Closed kupet00 closed 2 years ago

kupet00 commented 2 years ago

Describe the bug When starting the app, I get greeted by the following login screen ("Request failed with status code Forbidden"): f1rc

Logging in on the official website or Android App does work with the same credentials.

To Reproduce Steps to reproduce the behavior:

  1. Start the app

Expected behavior Either a login screen without errors and being able to login in or no login screen at all (being automatically logged in)

Desktop (please complete the following information):

F1TV account

Ainson commented 2 years ago

Thanks for working on a fix.

I suspect this is related to a poll that was recently on F1 Fan Voice about F1TV where for sure many blurted about RaceControl..

KroontjesPen commented 2 years ago

@iebb Request failed with status code 500

Windows10 PC

LuckyWraptor commented 2 years ago

i was able to login and continue using this app just fine, and the previous races from this and older seasons wor just fine. but i did notice that i was not able to watch Australian gp fp1 live or now as a archived session. other players stay empty but the internal one tries to load something, however that is just some pink mess with no audio. have they changed some drm things or is this just related to this issue as well and the upcoming 2.6.4 will resolve this issue as well? 2022-04-08 (1)

As for this issue, for now you can still use the v1 endpoint to request a playback url, that one will return the original non-widevine hls stream format

Tanguille commented 2 years ago

You can also allow manual token as temporary fix this weekend. Here is an easy way to get the current logged in session token from browser.

@eXhumer I got the token. But what do I do with it? Doesn't work if I use it as password unfortunately.

Tanguille commented 2 years ago

Anyone wants to try my fork of F1 Web Viewer? I used some tricks to make logins and cookies work Website is located at https://tv.ieb.systems/ , and the code is at https://github.com/iebb/F1-Web-Viewer , which is a fork from previously-broken https://github.com/iebb/F1-Web-Viewer

I tried your fork but got the following error:

Request failed with status code 500

robvdpol commented 2 years ago

If you have the subscription token you can paste it in the settings JSON file located at %LOCALAPPDATA%\RaceControl\RaceControl.settings.json (field 'SubscriptionToken'). Make sure to set the 'LastLogin' to something recent (less than a week ago). Then it should auto login, but still you would have the DRM issue.

LuckyWraptor commented 2 years ago

@robvdpol Try requesting the playback urls from the v1 play endpoint instead of the v2 that should return the non-widevine version still

PostMalone commented 2 years ago

If you have the subscription token you can paste it in the settings JSON file located at %LOCALAPPDATA%\RaceControl\RaceControl.settings.json (field 'SubscriptionToken'). Make sure to set the 'LastLogin' to something recent (less than a week ago). Then it should auto login, but still you would have the DRM issue.

Not sure about the "LastLogin" part, am i supposed to put in the date there?

Like this?: https://i.imgur.com/kS4SON8.png

robvdpol commented 2 years ago

If you have the subscription token you can paste it in the settings JSON file located at %LOCALAPPDATA%\RaceControl\RaceControl.settings.json (field 'SubscriptionToken'). Make sure to set the 'LastLogin' to something recent (less than a week ago). Then it should auto login, but still you would have the DRM issue.

Not sure about the "LastLogin" part, am i supposed to put in the date there?

Like this?: https://i.imgur.com/kS4SON8.png

Put it like this:

"LastLogin": "2022-04-08T13:17:23.2004797Z",

robvdpol commented 2 years ago

@robvdpol Try requesting the playback urls from the v1 play endpoint instead of the v2 that should return the non-widevine version still

Can you give an example URL? I'm having a hard time getting v1 to work for me. Which stream type are you using (for example BIG_SCREEN_HLS)?

LuckyWraptor commented 2 years ago

image

Sometimes it does return m3u8 sometimes it returns mpeg-dash, as far as I've experienced it doesn't include widevine in either.

imnotnoa commented 2 years ago

https://f1tv.formula1.com/1.0/R/NLD/WEB_HLS/ALL/CONTENT/PLAY?channelId=&contentId=1000005102

Edit : Too late

robvdpol commented 2 years ago

When I use that I get 403 Forbidden for the tokenised URL that is generated.

iebb commented 2 years ago

When I use that I get 403 Forbidden for the tokenised URL that is generated.

only v2.0 is working apparently, 1.0 just gives 403

LuckyWraptor commented 2 years ago

When I use that I get 403 Forbidden for the tokenised URL that is generated.

I might be mistaken, but I think you need to take the cookies in the response of the play request, and add those to all fragment & manifest requests: image My FFmpeg example: image

ricky732 commented 2 years ago

Guys, are there concrete chances that we can find a solution for quali and race? Even a provisional one..

imnotnoa commented 2 years ago

Guys, are there concrete chances that we can find a solution for quali and race? Even a provisional one..

I think using official sources is the way to go atm, this is pretty complex stuff and don't forget all the 3rd party devs do this in their free time

iebb commented 2 years ago

Ok, this will require some more work. It basically means abandoning the Flyleaf video library and replacing it with an Edge WebView2 browser control that runs VideoJS. I have messed around with this in the past, and it should be able to support Widevine DRM. But it will take some time to implement, so please be patient.

@robvdpol Here is my working example, Australian GP is working fine using video.js and eme plugin.

https://github.com/iebb/F1-Web-Viewer/blob/master/src/components/Feed.vue#L128

Demo at https://live.sox.pm/

KroontjesPen commented 2 years ago

Ok, this will require some more work. It basically means abandoning the Flyleaf video library and replacing it with an Edge WebView2 browser control that runs VideoJS. I have messed around with this in the past, and it should be able to support Widevine DRM. But it will take some time to implement, so please be patient.

@robvdpol Here is my working example, Australian GP is working fine using video.js and eme plugin.

https://github.com/iebb/F1-Web-Viewer/blob/master/src/components/Feed.vue#L128

Demo at https://live.sox.pm/

Gives here in the Netherlands still: Request failed with status code 500

ricky732 commented 2 years ago

Yeah same error here

iebb commented 2 years ago

Ok, this will require some more work. It basically means abandoning the Flyleaf video library and replacing it with an Edge WebView2 browser control that runs VideoJS. I have messed around with this in the past, and it should be able to support Widevine DRM. But it will take some time to implement, so please be patient.

@robvdpol Here is my working example, Australian GP is working fine using video.js and eme plugin. https://github.com/iebb/F1-Web-Viewer/blob/master/src/components/Feed.vue#L128 Demo at https://live.sox.pm/

Gives here in the Netherlands still: Request failed with status code 500

The website doesn't work at all? or unable to login, are there any screenshots?

seems i know what the problem is, wait a bit

iebb commented 2 years ago

@KroontjesPen , @Tanguille and @ricky732

this should work now, I forgot to update the backend when I modified cookie stuffs. This website and https://tv.ieb.systems/ (US) and https://f1tv-eu.ieb.systems/ (DE) should all be working now. (ieb.systems site are more preferred, while sox.pm is more like experimental playgrounds)

KroontjesPen commented 2 years ago

TOP https://f1tv-eu.ieb.systems/ (DE) works.

PostMalone commented 2 years ago

@iebb

This is legendary stuff!

Works like a charm here. Only thing would be to get this into an external player (MPV or similar). Other than that. Top stuff.

I hope this does not waste any of your server bandwidth, or does it?

ricky732 commented 2 years ago

Ok so here it works, but it buffers a lot... Any chance to get a link for any external player that has not the DRM?

iebb commented 2 years ago

@iebb

This is legendary stuff!

Works like a charm here. Only thing would be to get this into an external player (MPV or similar). Other than that. Top stuff.

I hope this does not waste any of your server bandwidth, or does it?

sox.pm is 100Mbps unmetered dedi box, which would allow ~20 simutaneous streams, while ieb.systems one are hosted on deta.sh for free (with some limitations such as not supporting 1080p)

iebb commented 2 years ago

Ok so here it works, but it buffers a lot... Any chance to get a link for any external player that has not the DRM?

since sox.pm is hosted on < $15/m servers, and ieb.systems is for free that's pretty acceptable. also you can self-host it so that it depends on your own connection only. would provide a tutorial later, if everything works well

ricky732 commented 2 years ago

Ok thank you!!!! I have a 30 mbps, it supported 4 multiple streams without problems if i gave it a bit of cache... Any tutorial about the syncro of feeds?

iebb commented 2 years ago

Ok thank you!!!! I have a 30 mbps, it supported 4 multiple streams without problems if i gave it a bit of cache... Any tutorial about the syncro of feeds?

for replays there's a clock button, and for live streams clicking on LIVE should get you to the latest point?

NH-Networks commented 2 years ago

Ok so here it works, but it buffers a lot... Any chance to get a link for any external player that has not the DRM?

will never work on a player without DRM, unless someone makes a "proxy" to hls

ricky732 commented 2 years ago

Oh ok!! What is the link of sox.pm website? I was using an hls player firefox extension & i was very very happy with that.. What a pity I cannot use it anymore!

iebb commented 2 years ago

live.sox.pm - however it's more like a testing playground, which might explode at any time :D

ricky732 commented 2 years ago

Doesn't load lol..

JustJoostNL commented 2 years ago

Is there already a fix for the drm and the cookie issue (there is the manualy token fix for the cookie, but that is temporary)

NH-Networks commented 2 years ago

Oh ok!! What is the link of sox.pm website? I was using an hls player firefox extension & i was very very happy with that.. What a pity I cannot use it anymore!

@iebb is working on self hosted version i see... maybe he can do some magic, time will tell

ricky732 commented 2 years ago

That would be amazing

iebb commented 2 years ago

Oh ok!! What is the link of sox.pm website? I was using an hls player firefox extension & i was very very happy with that.. What a pity I cannot use it anymore!

@iebb is working on self hosted version i see... maybe he can do some magic, time will tell

It's a simple reverse proxy, all i need to do is some code cleanups, wouldn't take long

sartsj commented 2 years ago

i was able to login and continue using this app just fine, and the previous races from this and older seasons wor just fine. but i did notice that i was not able to watch Australian gp fp1 live or now as a archived session. other players stay empty but the internal one tries to load something, however that is just some pink mess with no audio. have they changed some drm things or is this just related to this issue as well and the upcoming 2.6.4 will resolve this issue as well? 2022-04-08 (1)

As for this issue, for now you can still use the v1 endpoint to request a playback url, that one will return the original non-widevine hls stream format

Are you sure about this? I can also get unencrypted HLS on the v2 endpoint right now. It seems to me they just provide the unencrypted video when an event is not live anymore.

(assuming with v1 and v2 you mean just changing the /2.0/ to /1.0/ in the url and vice versa)

LuckyWraptor commented 2 years ago

i was able to login and continue using this app just fine, and the previous races from this and older seasons wor just fine. but i did notice that i was not able to watch Australian gp fp1 live or now as a archived session. other players stay empty but the internal one tries to load something, however that is just some pink mess with no audio. have they changed some drm things or is this just related to this issue as well and the upcoming 2.6.4 will resolve this issue as well? 2022-04-08 (1)

As for this issue, for now you can still use the v1 endpoint to request a playback url, that one will return the original non-widevine hls stream format

Are you sure about this? I can also get unencrypted HLS on the v2 endpoint right now. It seems to me they just provide the unencrypted video when an event is not live anymore.

(assuming with v1 and v2 you mean just changing the /2.0/ to /1.0/ in the url and vice versa)

I must admit, I haven't tested the current weekend sessions, but as far as I am aware, last week I was able to circumvent the DRM using the 1.0/v1 endpoint.

EDIT: Yes only live content is encrypted with DRM, replays work fine using both endpoints

sartsj commented 2 years ago

i was able to login and continue using this app just fine, and the previous races from this and older seasons wor just fine. but i did notice that i was not able to watch Australian gp fp1 live or now as a archived session. other players stay empty but the internal one tries to load something, however that is just some pink mess with no audio. have they changed some drm things or is this just related to this issue as well and the upcoming 2.6.4 will resolve this issue as well? ![2022-04-08 (1)]

As for this issue, for now you can still use the v1 endpoint to request a playback url, that one will return the original non-widevine hls stream format

Are you sure about this? I can also get unencrypted HLS on the v2 endpoint right now. It seems to me they just provide the unencrypted video when an event is not live anymore. (assuming with v1 and v2 you mean just changing the /2.0/ to /1.0/ in the url and vice versa)

I must admit, I haven't tested the current weekend sessions, but as far as I am aware, last week I was able to circumvent the DRM using the 1.0/v1 endpoint.

EDIT: Yes only live content is encrypted with DRM, replays work fine using both endpoints

Well last week it was also possible to get unencrypted streams from the v2 endpoint for live sessions :) I guess we'll have to wait until FP3 to see whether the v1 trick works.

ricky732 commented 2 years ago

@iebb so if I understood, if you make your code cleanups, we can host the stream by ourselves, but in that case, what player should we use to play it?

iebb commented 2 years ago

still using the browser, the only difference is the bandwidth is completely your own

Tanguille commented 2 years ago

I think they are overloaded because it keeps loading for me at the moment.

Edit: BTW is there a thread on your repo or something which you can put a link for here so we can discuss it further without flooding this issue thread?

iebb commented 2 years ago

I think they are overloaded because it keeps loading for me at the moment.

Edit: BTW is there a thread on your repo or something which you can put a link for here so we can discuss it further without flooding this issue thread?

https://github.com/iebb/F1-Web-Viewer/issues/

moi427 commented 2 years ago

@KroontjesPen , @Tanguille and @ricky732

this should work now, I forgot to update the backend when I modified cookie stuffs. This website and https://tv.ieb.systems/ (US) and https://f1tv-eu.ieb.systems/ (DE) should all be working now. (ieb.systems site are more preferred, while sox.pm is more like experimental playgrounds)

I'm sorry, but nothing is loading here after starting both the sites and login. I'm just a user of the great RaceControl, so most of the comments here are not something I understand.

Digi421 commented 2 years ago

If you have the subscription token you can paste it in the settings JSON file located at %LOCALAPPDATA%\RaceControl\RaceControl.settings.json (field 'SubscriptionToken'). Make sure to set the 'LastLogin' to something recent (less than a week ago). Then it should auto login, but still you would have the DRM issue.

Not sure about the "LastLogin" part, am i supposed to put in the date there? Like this?: https://i.imgur.com/kS4SON8.png

Put it like this:

"LastLogin": "2022-04-08T13:17:23.2004797Z",

This actually worked for me (Win10, app v2.6.3). Added Subscription Token (from browser) and LastLogin into RaceControl.settings.json. I can watch FP1 without problems but FP2 is garbled/encrypted -weird. FP1: image

FP2: image

thedave42 commented 2 years ago

Looks like v2 is returning unencrypted for FP1 now but still not for FP2. I can get the unencrypted HLS for FP1 via the v2 api using BIG_SCREEN_HLS. v1 is also now returning working, un-encrypted links for FP1 but still giving 403s for FP2.

MueR commented 2 years ago

Go figure, FOM skimping on having to pay the fees for the DRM..

eXhumer commented 2 years ago

Go figure, FOM skimping on having to pay the fees for the DRM.

What makes you say that? The fact that they remove the DRM for you?

Looks like v2 is returning unencrypted for FP1 now but still not for FP2. I can get the unencrypted HLS for FP1 via the v2 api using BIG_SCREEN_HLS. v1 is also now returning working, un-encrypted links for FP1 but still giving 403s for FP2.

i was able to login and continue using this app just fine, and the previous races from this and older seasons wor just fine. but i did notice that i was not able to watch Australian gp fp1 live or now as a archived session. other players stay empty but the internal one tries to load something, however that is just some pink mess with no audio. have they changed some drm things or is this just related to this issue as well and the upcoming 2.6.4 will resolve this issue as well? 2022-04-08 (1)

As for this issue, for now you can still use the v1 endpoint to request a playback url, that one will return the original non-widevine hls stream format

Are you sure about this? I can also get unencrypted HLS on the v2 endpoint right now. It seems to me they just provide the unencrypted video when an event is not live anymore. (assuming with v1 and v2 you mean just changing the /2.0/ to /1.0/ in the url and vice versa)

I must admit, I haven't tested the current weekend sessions, but as far as I am aware, last week I was able to circumvent the DRM using the 1.0/v1 endpoint.

EDIT: Yes only live content is encrypted with DRM, replays work fine using both endpoints

Using V1/V2 will have no difference to the actual stream they give you other than the errors. There is no bypass with V1. FOM protects live content and recent VODs with DRM for the first few hours and removes them to allow HLS playback like before. They have been doing this since Bahrain / Saudi Arabia.

@robvdpol I also suggest locking this issue until you have some update yourself, most of the comments here add nothing to help with the issue other than spreading FUD.

DaveFlashNL commented 2 years ago

weird, on Mac OS im just now watching FP1, and I was able to lift the m3u8 and dump it into ffmpeg and YouTube downloader, no drm in sight here. I thought they already added it no? oh one weird thing, YouTube_dl only saves the Portuguese audio and ffmpeg only the English commentary.