nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.38k stars 201 forks source link

[Bug]: Problem signing in to Trakt #675

Closed luis-barreira closed 2 months ago

luis-barreira commented 2 years ago

Problem description

Because of some problems with some other software, I had to revoke access to my Trake account to all apps. When I tried to sign in to Trakt with Nova Video Player on an Android TV device I came across two problems:

  1. On the screen where I had to fill my username and password, the on-screen keyboard completely obscured the fields that I had to fill, I had to do it completely bindly.
  2. After filling my user name and password, another windows poped up, presumably from Trakt, asking if I would allow access to my Trakt account, with a green Yes button and a red No button. My remote control only has directional and enter keys, I have tried almost every combination of button presses I could and I was not able to select any of the options, all I could do was go back and continue without Trakt integration.

It was not the first time I saw the keyboard obscure the fields, but it was the first time I could not complete the process.

Steps to reproduce the issue

Try to sign in to Trakt on an Android TV

Expected behavior

Complete the process and link my Trakt account

Your phone/tablet/androidTV model

Mi TV Stick

Operating system version

Android 9

Application version and app store

6.0.71 (20220623.1933) from Google Play Store

Additional system information

Screen resolution is 1080p

Debug logs

No response

DecalicatanDecalicatan commented 1 year ago

Similar issue here with a Nvidia Shield Pro (2019)

Magentitrakt commented 1 year ago

The Bug currently exists, here at two SONY TV, one is Google TV based from 2022 and the other is nearly ten years old (driven with Magenta Stick and Android). In both I can't choose "YES" or "NO". There exists no frame around the buttons to choose.

nhockey commented 1 year ago

Are you going to fix this? I don't know why it doesn't sign in and use Trakt like every other application on the planet that just asks you to put in a pin that it then verifies with Trakt.Tv this is super annoying! PXL_20230521_044639083

courville commented 1 year ago

@nhockey, the explanation is simple: it used to work and trakt changed something in their login page which makes the yes/no area not focusable for some reason. I will have a look when I am done with my other dev tasks (nova open-source, maintained by small community on spare time).

courville commented 1 year ago

Since it is a regression, I opened a ticket to trakt.

nhockey commented 1 year ago

I don't think the problem is so much on their end but is on Nova's end. They have switched to Oauth2 and since this application is mostly used on televisions It should be using the pin-based API they have available not the typical authentication methods. Since I'm not super familiar with your code base I'm not sure how to best implement it in your application. But here's a link to their documentation on how to implement pins over the whole login/password thing. It doesn't seem too overly complicated. https://trakt.docs.apiary.io/#reference/authentication-devices/authorize-application

courville commented 1 year ago

@nhockey, I know the trakt API and I have reviewed the OAuth2 way too. I do not debate what method should be used. What I say is something else: it works on my phone with touchscreen the current way it is implemented in nova but not on Android TV with DPAD. The focus used to work in the dedicated webview exposed by trakt on their own URL. It no longer works. This hints at a regression on their side.

Magentitrakt commented 1 year ago

My workaround: I added a PC-mouse to my TV and with this I can click on the green field to say YES

courville commented 1 year ago

Observation: with a tab you have trakt OAuthDialog yes/no buttons focusable: issue is on nova or most probably due to Android system webview update...

courville commented 1 year ago

Proper focus should be restored via an ugly hack in 6.2.13 pre-release: please test and report if it works out for you.