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

API Config Page and Sign In Issues #1016

Open
psilordOG opened this issue Dec 5, 2024 · 6 comments
Open

API Config Page and Sign In Issues #1016

psilordOG opened this issue Dec 5, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@psilordOG
Copy link

psilordOG commented Dec 5, 2024

Context

Please provide any relevant information about your setup

  • Add-on Version: 7.1.1.3, 7.1.1.4, 7.1.1.5
  • Kodi Version: 21.1 Omega (Official)
  • Kodi GUI Language: English
  • Operating System: SHIELD Android TV 8.2.3(32.6.518.0)
  • Operating System Language: English

Expected Behavior

That the API Configuration Page is accessible on my LAN using the default addon configuration settings.
That the Sign In process works properly, or at least have videos play via API access only.


Current Behavior

I had been using the official Kodi repo version of this addon for a very long time without issues. It recently stopped working so I came to this repo for the latest version. The API Configuration Page is problematic to get loaded to save credentials without tweaking the Advanced addon settings. As for Sign-In, it only prompts to verify my device once. No matter how many times I Sign Out and back In, it never prompts a second time. I am able to browse video listings, but attempting to play anything results in the error "Sign in to confirm you’re not a bot".


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Uninstalled previous Youtube addon.
  2. Installed Youtube addon 7.1.1.4 from zip file.
  3. Opened Youtube addon and completed all setup script steps.
  4. Opened settings and enabled debug logging and enabled API configuration page.
  5. Attempted to open API configuration page from laptop using my devices' static http://IP:50152/youtube/api - connection refused.
  6. Changed HTTP Proxy in settings from "Use Kodi" to Disabled.
  7. Attempted to open API configuration page again - page opened okay.
  8. Entered API details and clicked Save - This site can't be reached, refused to connect.
  9. Attempted to open API configuration page again using http://IP:50152/youtube/api - connection refused.
  10. Changed HTTP Server Listening IP from 0.0.0.0 to static IP of device.
  11. Attempted to open API configuration page from laptop using http://IP:50152/youtube/api - connection refused.
  12. Exited Kodi and re-launched
  13. Attempted to open API configuration page again - page opened okay.
  14. Entered API details and clicked Save - This site can't be reached, refused to connect.
  15. Opened Youtube addon to main menu
  16. Pressed enter on browser window that still had the submit URL from last failed attempt - Successfully updated.
  17. Opened addon settings to verify API credentials - all good.
  18. Attempted to sign in but was only prompted to verify device one time.
  19. Listings work but attempting to play any video results in error "Sign in to confirm you're not a bot".

Log

Please include a complete debug log.


Additional Information

I suspect my original Youtube addon stopped working as a result of recent changes Google is rolling out to their OAuth implementation. Not sure, but I went ahead and created a new project and new set of API credentials before beginning this exercise.

In any case, any help resolving these issues would be greatly appreciated.


@psilordOG psilordOG added the bug Something isn't working label Dec 5, 2024
@psilordOG
Copy link
Author

I just noticed that v7.1.1.5 was released while I was opening this issue. I downloaded and installed it but the Sign In behavior continues. It still only prompts me once to verify my device, listings work but videos will not play telling me I need to sign in to prove I'm not a bot.

@MoojMidge
Copy link
Collaborator

I'll have a look at this later, but please delete your logs on paste.kodi.tv asap if you can. It contains sensitive information that should not be shared.

If you cannot delete the logs, and even if you can, I would recommend invalidating and recreating your API key and OAuth details.

@psilordOG
Copy link
Author

Roger that.

MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Dec 6, 2024
MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Dec 6, 2024
@MoojMidge
Copy link
Collaborator

The API Configuration Page is problematic to get loaded to save credentials without tweaking the Advanced addon settings. As for Sign-In, it only prompts to verify my device once. No matter how many times I Sign Out and back In, it never prompts a second time. I am able to browse video listings, but attempting to play anything results in the error "Sign in to confirm you’re not a bot".

Lets break this down:

The API Configuration Page is problematic to get loaded to save credentials without tweaking the Advanced addon settings.

The http server that serves the configuration page is not setup to close connections that would lead to a connection refused error that you were seeing, which means that it is likely that whatever proxy/VPN/firewall you are using is preventing the connection from being established, either by dropping the connection or because the port is not open/accessible over your network.

There is not a whole lot that can be done about this in the addon, as while the various advanced settings exist to cater for situations like this if needed, they are going to be of limited use in your situation because the requests are not even getting to the http server.

As for Sign-In, it only prompts to verify my device once. No matter how many times I Sign Out and back In, it never prompts a second time.

This is normal, the second login is not useable for anything anymore and was removed. It was added back in some beta versions for testing, but will ultimately be removed as per the current stable release versions.

I am able to browse video listings, but attempting to play anything results in the error "Sign in to confirm you’re not a bot".

This is YouTube telling you that the IP address of the VPN or proxy your are using has been blocked. I have enabled authentication and retrying of these requests, and you can try this if you want using this test version:
https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip

However be warned that there is a good chance that it could lead to your account being blocked as well. This may be the case even without the retry, and I would not recommend using a non-personal proxy or VPN when using YouTube

@psilordOG
Copy link
Author

Thank you for the thoughtful and detailed reply. I have some observations that may be contrary to your assumptions, but I want to do some more testing tonight after I get home from work. I can briefly offer this regarding the API Configuration Page:

  1. I am not using a VPN or proxy and my laptop (Windows) firewall is not blocking anything on my local LAN.
  2. It appears from my testing and logs that the HTTPServer IS in fact shutting down immediately after the initial GET request to access the /youtube/api page.
  • Kodi starts
  • The Youtube addon initializes, starts the HTTPServer and begins listing
  • GET request made to /youtube/api (works)
  • Logs indicate [plugin.video.youtube] HTTPServer: Shutting down - 176ms after the initial request
  • 2nd GET request submitted with API details - no response and nothing logged in Kodi because HTTPServer is not running
  • Navigate in Kodi to open the addon which triggers the HTTPServer to start and begin listening again
  • Manually retry /youtube/api/submit request from browser - received and processed okay

I'll spend some more time this evening investigating the sign in issues but I'm not convinced Google is blocking my IP. In fact, I will take some time today from my office to test the addon with a clean install of Kodi. If need be, I will perform a packet capture from home to see if that reveals anything useful.

@MoojMidge
Copy link
Collaborator

Yes, I think my original assessment about the http server was not correct, but the https server should be prevented from shutting down unless your device goes to sleep as well. Can you get a debug log of this?

Regarding your IP being blocked, that specific error message has been coming up for a while now when using other 3rd party clients and almost universally it has been related to VPN or proxy usage. Only one other person using this addon has reported the same error message and they confirmed they were also using a proxy.

MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Dec 7, 2024
MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Dec 7, 2024
MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Dec 14, 2024
- Also make 127.0.0.1 the default listen address
- Fallback to 0.0.0.0 if no other local address works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants