rocky4546 / tvheadend-locast

service that streams from locast to tvheadend
Other
12 stars 1 forks source link

Error with the new (0.8.4) release #12

Closed Cookie-Monster-Coder closed 3 years ago

Cookie-Monster-Coder commented 3 years ago

When I start tvheadend locast and try watching a channel I keep getting

2021-05-26 20:20:24,738-WARNING:web_tuner Unknown request to /Locast/watch/709
2021-05-26 20:20:24,738-WARNING:web_handler [xxx.xxx.xxx.xxx] "GET /Locast/watch/709 HTTP/1.1" 501 -
rocky4546 commented 3 years ago

Not sure what is the issue. The only thing that comes to mind is the data/db/plugins.db file is somehow not populated with the locast plugin data. You can try to delete plugin.db and restart the service, but it is hard to understand why this is happening. Basically, the app is saying you do not have a plugin called *locast installed in the plugins folder. In detail, it is looking for the plugin.json file inside the provider_video_locast directory. I will need more information.

Cookie-Monster-Coder commented 3 years ago
* What OS are you running?

Linux - Ubuntu

  • What exact version of app are you running? Latest git pull from github main branch
  • If you remove the plugins.db file and restart the service, did that resolve the issue? No, I even removed the whole data folder and still get the same error.
  • I found a few similar issues and published 0.8.4m. Can you try that version and see if anything changes? Still the same
  • If this does not help, I will probably need more detailed logs in regard to the startup sequence. Turning up the system log to DEBUG will help.

I think I found the cause, with the latest update I get an invalid token. I even deleted that token in the config file and it still the same.

2021-05-27 13:39:47,484-DEBUG:authenticate Validating User Info...
2021-05-27 13:39:47,788-INFO:authenticate Token is invalid, refreshing login accredentials
2021-05-27 13:39:47,788-INFO:authenticate Logging into Locast [locast]
2021-05-27 13:39:48,000-DEBUG:authenticate Validating User Info...
2021-05-27 13:39:48,212-INFO:authenticate Token is invalid, refreshing login accredentials

On v0.8.0-RC2 it works with the same config file with the following logs:

2021-05-27 13:39:05,287-INFO:authenticate Logging into Locast...
2021-05-27 13:39:05,647-DEBUG:authenticate Validating User Info...
2021-05-27 13:39:05,857-INFO:authenticate User is a free account.

So, I'm think in the past few updates after v0.8.0-RC2 it's not checking if it's a free account and failing.

rocky4546 commented 3 years ago

Thanks for the details. I did add the token reuse in 0.8.4. Was not sure how long a token lasts and whether a refresh would work. Will look at the code and see what happened in your case.

rocky4546 commented 3 years ago

Question. Does your username in the config.ini have any capital letters? I did not validate the email with all lowercase on both sides, so that could do it. However, the rest of the debug log you show indicates it still generated the new token correctly and moved on. I still need to see the rest of the log. I have fixed the case sensitive email address issue.

rocky4546 commented 3 years ago

I ran a few tests. Locast username is case insensitive from the locast.org site. So it could really be all lower case (but still fixed the issue). Next, I tried to use a capitalized email and it did generate the log lines you have, but the channels still played through VLC. Not sure if this is the issue.

rocky4546 commented 3 years ago

I am developing on Ubuntu and have not seen the issue. I have updated the repo and fixed the issue with you not seeing the free account log entry. Try it again and let me know what you find.

Cookie-Monster-Coder commented 3 years ago

I did a git pull to pull all the new changes and deleted the data folder and still the same issue.

My username is all lowercase. I do however have (+) in my email ex: xxxxx+locast@gmail.com

It works on v0.8.0-RC2 so idk if something changed on how it logins

Here are the logs:

2021-05-28 20:53:15,025-INFO:user_config Loading Configuration File: /tvheadend-                                                                             locast-chicago/tvheadend-locast/config.ini
2021-05-28 20:53:15,030-DEBUG:db Creating new database: config_defn /tvheadend-l                                                                             ocast-chicago/tvheadend-locast/data/db/config_defn.db
2021-05-28 20:53:24,847-WARNING:main #########################################
2021-05-28 20:53:24,847-WARNING:main MIT License, Copyright (C) 2021 ROCKY4546
2021-05-28 20:53:24,848-INFO:main Initiating Cabernet v0.8.4n
2021-05-28 20:53:24,848-INFO:main Getting Plugins...
2021-05-28 20:53:24,849-DEBUG:plugin_handler Plugin Defn file loaded
2021-05-28 20:53:24,849-DEBUG:db Creating new database: plugins /tvheadend-locas                                                                             t-chicago/tvheadend-locast/data/db/plugins.db
2021-05-28 20:53:25,458-DEBUG:plugin Plugin Config Defn file loaded at plugins.p                                                                             rovider_video_locast
2021-05-28 20:53:26,114-DEBUG:db config_defn database closed for thread:14021509                                                                             0313024
2021-05-28 20:53:26,115-DEBUG:config_defn Database terminated for thread:1402150                                                                             90313024
2021-05-28 20:53:26,314-DEBUG:plugin Plugin Manifest file loaded at plugins.prov                                                                             ider_video_locast
2021-05-28 20:53:26,315-DEBUG:db Reopening config_defn database for thread:14021                                                                             5090313024
2021-05-28 20:53:27,106-INFO:plugin Plugin created for Locast
2021-05-28 20:53:27,107-INFO:authenticate Logging into Locast [locast]
2021-05-28 20:53:27,510-DEBUG:authenticate Validating User Info...
2021-05-28 20:53:27,713-INFO:authenticate Token is invalid, refreshing login acc                                                                             redentials
2021-05-28 20:53:27,800-INFO:main Starting admin website on 172.17.0.3:xxxxx
2021-05-28 20:53:27,808-DEBUG:db Creating new database: channels /tvheadend-loca                                                                             st-chicago/tvheadend-locast/data/db/channels.db
2021-05-28 20:53:27,904-INFO:main Starting streaming tuner website on 172.17.0.3                                                                             :6483
2021-05-28 20:53:27,910-DEBUG:web_tuner TunerHttpHandler Implementing 4 tuners f                                                                             or Locast
2021-05-28 20:53:27,912-DEBUG:web_handler Now listening for requests. Number of                                                                              listeners=4
2021-05-28 20:53:28,006-INFO:main Refreshing EPG data
2021-05-28 20:53:28,207-INFO:main Cabernet is now online.
2021-05-28 20:53:28,439-DEBUG:decorators Registering GET URL: /background
2021-05-28 20:53:28,439-DEBUG:decorators Registering GET URL: /pages/index.js
2021-05-28 20:53:28,439-DEBUG:decorators Registering GET URL: /
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /favicon.ico
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /xmltv.xml
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /playlist
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /channels.m3u
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /lineup.json
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /lineup.xml
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /pages/channels.ht                                                                             ml
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /pages/channels_fo                                                                             rm.html
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /discover.json
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /device.xml
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /lineup_status.jso                                                                             n
2021-05-28 20:53:28,440-DEBUG:decorators Registering GET URL: /pages/configform.                                                                             html
2021-05-28 20:53:28,441-DEBUG:decorators Registering GET URL: /config.json
2021-05-28 20:53:28,441-DEBUG:decorators Registering POST URL: /pages/channels_f                                                                             orm.html
2021-05-28 20:53:28,441-DEBUG:decorators Registering POST URL: /lineup.post
2021-05-28 20:53:28,441-DEBUG:decorators Registering POST URL: /pages/configform                                                                             .html
2021-05-28 20:53:28,441-DEBUG:decorators Registering GET URL: /html/
2021-05-28 20:53:28,441-DEBUG:decorators Registering GET URL: /images/
2021-05-28 20:53:28,441-DEBUG:decorators Registering GET URL: /modules/
2021-05-28 20:53:28,441-DEBUG:decorators Registering GET URL: /temp/
2021-05-28 20:53:28,441-DEBUG:web_handler Now listening for requests. Number of                                                                              listeners=8
2021-05-28 20:54:04,348-WARNING:web_tuner Unknown request to /Locast/watch/709
2021-05-28 20:54:04,348-WARNING:web_handler [172.17.0.4] "GET /Locast/watch/709 HTTP/1.1" 501 -
rocky4546 commented 3 years ago

This now makes sense. I will run some tests and get back to you.

rocky4546 commented 3 years ago

Tested with a "+" in the email address. Product had no issues and worked cleanly. I have made a small change to print the emails that are in the config.ini vs locast.org, so you can tell what is going on. My gut right now is the login-token in the config.ini is for a different email address than the login-username shows.

Cookie-Monster-Coder commented 3 years ago

Yeah, that's what it was. Had an old email in the config file while the new updated email was in locast.org. According to Locast you had to use your old one to login.

"If you change your email address, it will apply to communications only. You will need to use your original email address to login."

They probability changed it to allow new emails now.