taligentx / LiveTVH.bundle

Live TV streaming with Plex and Tvheadend
GNU General Public License v3.0
105 stars 19 forks source link

Unable to authorize with Tvheadend 4.3 unstable #23

Closed ElishaDev closed 6 years ago

ElishaDev commented 6 years ago

I’m getting a error in the livetvh log:

2018-07-12 16:00:40,788 (7f7c4f23b700) : DEBUG (networking:166) - Requesting 'http://xxxxx:9981/api/serverinfo' 2018-07-12 16:00:40,832 (7f7c4f23b700) : ERROR (networking:219) - Error opening URL 'http://xxxxx:9981/api/serverinfo' 2018-07-12 16:00:40,833 (7f7c4f23b700) : CRITICAL (init:76) - Error accessing Tvheadend: HTTP Error 401: Unauthorized

taligentx commented 6 years ago

@D3vJust Check the access rights for the Tvheadend user. The user needs "Web interface", Streaming > "Basic", and Video recorder > "Basic". I've updated the setup steps with a screenshot of the necessary rights, let's see if that resolves the issue.

ElishaDev commented 6 years ago

@taligentx The user has enough rights. If I make a manually wget with the username and password it's working fine.

I also checked the rights again. But still not working.

taligentx commented 6 years ago

That's odd. Are you testing wget from the same system running PMS? Let's see the full output from:

wget --auth-no-challenge http://username:password@address:9981/api/serverinfo

There's something strange happening if you can run the above command successfully from the PMS system CLI and PMS throws HTTP 401. Details on your setup for Tvheadend and PMS would be useful.

ElishaDev commented 6 years ago

The wget from the same system running PMS is working fine.

I'm using HTS Tvheadend 4.3-1288~g66d6161c5 and plexmediaserver version is 1.13.2.5154.

But still getting Error accessing Tvheadend: HTTP Error 401: Unauthorized.

From a local system with PMS and tvheadend installed it's also not working. Same problem here.

taligentx commented 6 years ago

I can replicate this by building the current unstable Tvheadend from source. If you need the unstable branch, the 4.3@cf097d4 release authorizes correctly:

https://github.com/tvheadend/tvheadend/releases/tag/v4.3

Otherwise, stable 4.2 works correctly as well. I'll take a look at what's changed with HTTP basic auth since 4.3@cf097d4 to see what's causing the issue but for now I'll add a note that only the stable release is supported. Thanks for the heads-up!

taligentx commented 6 years ago

The default HTTP authentication type changed to Digest in the current builds of Tvheadend 4.3. The Plex plugin framework doesn't support digest authentication so I've rewritten the authentication.