bootsie123 / F1-Web-Viewer

A simple grid-based web viewer for Formula 1
https://f1webviewer.netlify.app
ISC License
168 stars 23 forks source link

App not able to log-in #68

Open Placemaster opened 2 years ago

Placemaster commented 2 years ago

Before last race I installed the app on my MacBook. I was able to view on multiple screens. Now I am able to log-in anymore.

When starting the app and filling out the credentials it comes back with: Request failed with status code 403

On the F1 website (https://f1tv.formula1.com) the credentials are working.

Macos Monterey Version 12.3.1

F1TV Account (please complete the following information):

Pro Subscription Netherlands

richardbeumer commented 2 years ago

Looks like the same issues as https://github.com/robvdpol/RaceControl/issues/414. F1 and https://github.com/SoMuchForSubtlety/f1viewer/issues/111.

Apperently F1 TV changed their login procedure to ban third party apps.

aeleos commented 2 years ago

It looks like they also enabled Widevine DRM for any live sessions, so there will likely be an amount of work needed to get anything working again, even if the login issues are resolved.

iebb commented 2 years ago

Try my build at https://tv.ieb.systems/ , which adds Widevine DRM support / use the newer version of the API, and added JS to generate reese cookies in order to login

It's a fork of this project at https://github.com/iebb/F1-Web-Viewer , however it's not completely stable and I guess it might be too early to send a pull request here

richardbeumer commented 2 years ago

New Login with reese84 cookie works for me. FP1 content works like a charm!! But FP2 content shows an error: The media is encrypted and we do not have the keys to decrypt it.

iebb commented 2 years ago

New Login with reese84 cookie works for me. FP1 content works like a charm!! But FP2 content shows an error: The media is encrypted and we do not have the keys to decrypt it.

The widevine thing is not always working, looking into it (and trying to fix)

iebb commented 2 years ago

New Login with reese84 cookie works for me. FP1 content works like a charm!! But FP2 content shows an error: The media is encrypted and we do not have the keys to decrypt it.

Should be working now, as deta backend needs proper content-type header to transmit binary data

richardbeumer commented 2 years ago

Works but it renders quite slowly. Espacialy the HD content. Will try it locally to exclude network issues.

iebb commented 2 years ago

there's some issue with reverse-proxying 1080p stream, which might exceed 5.5mb for a single fragment, which would make the whole stream fail - i have disabled 1080p m3u8 content now.

Also my version doesn't work locally at the moment, as I'm more focused to make it work over web. If everything goes well, I may try updating the local part (some features relies on a reverse proxy, haven't updated the local code as I'm more familiar with Python and Go, rather than Node.js)

iebb commented 2 years ago

Works but it renders quite slowly. Espacialy the HD content. Will try it locally to exclude network issues.

Also there's https://live.sox.pm/ , which runs on my own server rather than deta ones, might be faster - however the bandwidth is technically limited, and it's more like a demo than actual production-quality website

richardbeumer commented 2 years ago

my local install gives Cannot read properties of undefined (reading 'Protection') when logging in. Looking into that first. I'm also not that familiar with Node.js/Vue (yet)

iebb commented 2 years ago

my local install gives Cannot read properties of undefined (reading 'Protection') when logging in. Looking into that first. I'm also not that familiar with Node.js/Vue (yet)

This requires the inclusion of https://api.formula1.com/6657193977244c13 script, which is used for reece84 generations

richardbeumer commented 2 years ago

I just cloned your repo so I don't understand why this is not working. Script is included in index.html <script type="application/javascript" defer src="/6657193977244c13"></script>

richardbeumer commented 2 years ago

I see a GET http://localhost:3000/6657193977244c13 net::ERR_ABORTED 431 (Request Header Fields Too Large) error in my Console. Could be something with my local Node.js config. Running version 16 here.

iebb commented 2 years ago

I just cloned your repo so I don't understand why this is not working. Script is included in index.html <script type="application/javascript" defer src="/6657193977244c13"></script>

This path is served using the reverse proxy, while that endpoint should be forwarded to the original server (as the token retrieval needs), which isn't included in the repo.

anthonylavado commented 2 years ago

@iebb Since issues are disabled on your fork, I figured I'd reach out here. I'm a mod on r/F1TV and I was following your sox.pm server to see if it would continue to work after these changes.

Since you've updated the code, it seems to be doing okay. I would be interesting in pointing the larger community to a site that would work for them, but I fear it would be a lot of traffic all of a sudden. Is there a preferred URL for them to use?

iebb commented 2 years ago

@iebb Since issues are disabled on your fork, I figured I'd reach out here. I'm a mod on r/F1TV and I was following your sox.pm server to see if it would continue to work after these changes.

Since you've updated the code, it seems to be doing okay. I would be interesting in pointing the larger community to a site that would work for them, but I fear it would be a lot of traffic all of a sudden. Is there a preferred URL for them to use?

@anthonylavado

I'm u/jebwizoscar there :D and just have my issue space opened.

live.sox.pm is currently hosted on my own server (with a slightly different reverse proxy written in Go, and is not always reliable), while f1tv.ieb.systems is written in Flask, currently on deta.sh which has an AWS backend.

The preferred URL is currently https://f1tv.ieb.systems/, and there's an EU version at http://f1tv-eu.ieb.systems/ . However due to AWS Lambda limitations, 1080p HLS streaming might have segments over the 6M limit so I just disabled 1080p completely on these two websites.

https://live.sox.pm/ is an unmetered dedicated server, however the link is only 100Mbps and might be unable to serve lots of users. I have set up some cloudflare caching strategies, but it would still explode watching 20 different streams simutaneously and there's absolutely zero guarantee on this server - that's more like an experimental playground

iebb commented 2 years ago

@iebb Since issues are disabled on your fork, I figured I'd reach out here. I'm a mod on r/F1TV and I was following your sox.pm server to see if it would continue to work after these changes.

Since you've updated the code, it seems to be doing okay. I would be interesting in pointing the larger community to a site that would work for them, but I fear it would be a lot of traffic all of a sudden. Is there a preferred URL for them to use?

@anthonylavado you can also self-host it at https://github.com/iebb/F1WebViewer-SelfHosted

Tr4il commented 2 years ago

@iebb I tried setting up your fork of the viewer with the SelfHosted proxy and I'm getting an error which I think has to do with the reese84 cookie. Can you tell us how to set it up, either on bare metal or in Docker or something?

iebb commented 2 years ago

@iebb I tried setting up your fork of the viewer with the SelfHosted proxy and I'm getting an error which I think has to do with the reese84 cookie. Can you tell us how to set it up, either on bare metal or in Docker or something?

@Tr4il just download f1wvp-windows-amd64.exe and run, it should work as long as the public version works