NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 7 8 9 10 11 … 34 Next »
Schedules Direct Token Issue

 
  • 0 Vote(s) - 0 Average
Schedules Direct Token Issue
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#1
2023-02-04, 01:35 PM
Hello,

I've searched but was unable to find a solution to my problem. Hopefully someone can shed some light on this.

For some reason my channels mapped to SD have stopped downloading the EPG. My SD account is active and appears to be working fine in other apps. Here's what I'm seeing in my NextPVR log. The key message is " Token has expired. Request new token." 

Anyone know how to fix this?

Thanks

2023-02-04 08:59:14.935 [DEBUG][112] SD(https://json.schedulesdirect.org/20141201/schedules)
2023-02-04 08:59:14.935 [DEBUG][112] token header: fb7426d4a6ca2a58cede9554xxxxxxxx
2023-02-04 08:59:15.160 [DEBUG][104] Got request [192.168.2.195]: /services/service (system.epg.status)
2023-02-04 08:59:15.160 [DEBUG][104] method=system.epg.status
2023-02-04 08:59:15.160 [DEBUG][104] parameters:
2023-02-04 08:59:15.160 [DEBUG][104]   method: system.epg.status
2023-02-04 08:59:15.160 [DEBUG][104]   format: json
2023-02-04 08:59:15.160 [DEBUG][104]   sid: 88045f1d-aa1f-4fb8-8c72-320a8204d5fe
2023-02-04 08:59:15.160 [DEBUG][104]   client_ip: 192.168.2.195
2023-02-04 08:59:15.160 [DEBUG][104]   user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.78
2023-02-04 08:59:15.160 [DEBUG][104]   host_callback: ...
2023-02-04 08:59:15.160 [DEBUG][104] {"stat": "ok", "status": "Requesting channel listings 0-10 of 103 from Schedules Direct", "updating": true}
2023-02-04 08:59:15.172 [ERROR][112] System.Net.WebException: The remote server returned an error: (403) Forbidden.
  at System.Net.HttpWebRequest.GetResponse()
  at NShared.SchedulesDirectJSONEPGSource.DoPOSTRequest(String url, String token, String body, Boolean retry)
2023-02-04 08:59:15.172 [ERROR][112] SD http code: Forbidden
2023-02-04 08:59:15.172 [ERROR][112] {"response":"TOKEN_EXPIRED","code":4006,"serverID":"20141201.web","message":"Token has expired. Request new token.","datetime":"2023-02-04T12:59:15Z"}
2023-02-04 08:59:15.172 [DEBUG][112] Got /schedules:
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#2
2023-02-04, 01:37 PM
I did find this but from what I can tell NextPVR has a Token, I'm just not sure why it's expired?

https://github.com/SchedulesDirect/JSON-...in-a-token
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#3
2023-02-04, 02:33 PM
I restarted NextPVR on my server and it seems to have resolved the issue. Not sure what caused it.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#4
2023-02-04, 02:56 PM
Schedules Direct made some security changes preventing multiple uses of tokens

- you need the latest version of NextPVR to re-request a token on failure.

- there is an issue if you have multiple PVR backends, or utilities or more than one instance of NextPVR potentially calling SD.

- some users have trouble getting tokens because of their provider not providing fixed IPv4 address to SD. This requires a support ticket to SD.

Martin
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#5
2023-02-16, 09:17 PM
Thanks for the info Martin. Unfortunately the problem keeps coming back.

- I'm running the latest version of NextPVR for Linux. v6.1.1.221106. I don't see where NextPVR is requesting a new token. See the log snip below.
- I'm only running the one instance of NextPVR. Nothing else I have uses SD.
- Not sure about the IP address. I run over a VPN but when I disable the VPN I get the same result. The message returned from SD is clear that it's an expired token.

Is there a newer release of NextPVR that I should be running?


2023-02-16 17:01:58.515 [DEBUG][46] SD using existing token
2023-02-16 17:01:58.516 [DEBUG][46] Requesting /schedules
2023-02-16 17:01:58.516 [DEBUG][46] SD(https://json.schedulesdirect.org/20141201/schedules)
2023-02-16 17:01:58.516 [DEBUG][46] token header: f3a34f3b89b0c1d2166540416c922982
2023-02-16 17:01:58.742 [ERROR][46] System.Net.WebException: The remote server returned an error: (403) Forbidden.
  at System.Net.HttpWebRequest.GetResponse()
  at NShared.SchedulesDirectJSONEPGSource.DoPOSTRequest(String url, String token, String body, Boolean retry)
2023-02-16 17:01:58.743 [ERROR][46] SD http code: Forbidden
2023-02-16 17:01:58.743 [ERROR][46] {"response":"TOKEN_EXPIRED","code":4006,"serverID":"20141201.web","message":"Token has expired. Request new token.","datetime":"2023-02-16T21:01:58Z"}
2023-02-16 17:01:58.743 [DEBUG][46] Got /schedules:
2023-02-16 17:01:58.743 [ERROR][46] Unexpected error processing chunk: Newtonsoft.Json.JsonReaderException: Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path '', line 1, position 1.
  at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
  at Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)
  at NShared.SchedulesDirectJSONEPGSource.ProcessChunk(List`1 channelsChunk, IEPGUpdateCallback callback)
  at NShared.SchedulesDirectJSONEPGSource.UpdateEPG(IEPGUpdateCallback callback, Boolean manuallyInitiated)
2023-02-16 17:01:58.743 [DEBUG][46] SD using existing token
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#6
2023-02-16, 09:46 PM
This cannot be fixed by NextPVR you need to contact Schedules Direct as a lineup issue as I posted above 

Martin
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#7
2023-02-16, 10:12 PM
Martin,

OK but SD works fine in other apps like EPG123. I'm only having issues with NextPVR. I'll post something over in SD to see what comes of it.

Thanks
K
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#8
2023-02-16, 11:23 PM (This post was last modified: 2023-02-16, 11:26 PM by mvallevand.)
Don't post in their forum create a lineup ticket.

If you are using other apps that is part of the problem. I am assuming you are using the current version of NextPVR. On the expired token it requests a new one. Full logs are better than snippets though.

Martin
TheKenR
Offline

Junior Member

Canada
Posts: 39
Threads: 8
Joined: Apr 2022
#9
2023-02-17, 11:48 PM (This post was last modified: 2023-02-17, 11:50 PM by TheKenR.)
Ok I got in touch with Schedules Direct support. The problem is apparently with my VPN service. For each request my VPN is changing the IP address which is NOT what's suppose to happen. So I opened a ticket with them to hopefully resolve this. While I wait for my VPN to fix their problem, I created an EPGUpdate script to turn off my VPN and a PostEPGUpdate to turn it back on. This should work but when I tested it I noticed NextPVR is not requesting a new Token for the 403 error (note the "SD using existing token" in the log right after the 403 response from SD). When I restart the NextPVR process it DOES detect the 403 and request a new token on the first update. So this seems to be another problem. I'll let it settle for 48 hours so it can get back on it's once per day schedule and see if anything changes.

2023-02-17 19:38:32.689 [DEBUG][37] Doing EPG update from Schedules Direct JSON
2023-02-17 19:38:32.689 [DEBUG][37] SD using existing token
2023-02-17 19:38:32.693 [DEBUG][37] SD using existing token
2023-02-17 19:38:32.745 [DEBUG][37] Requesting /schedules
2023-02-17 19:38:32.745 [DEBUG][37] SD(https://json.schedulesdirect.org/20141201/schedules)
2023-02-17 19:38:32.745 [DEBUG][37] token header: 17f5367bb8ca62dfeb6cb15833cac5f8
2023-02-17 19:38:32.919 [ERROR][37] System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at NShared.SchedulesDirectJSONEPGSource.DoPOSTRequest(String url, String token, String body, Boolean retry)
2023-02-17 19:38:32.919 [ERROR][37] SD http code: Forbidden
2023-02-17 19:38:32.920 [ERROR][37] {"response":"TOKEN_EXPIRED","code":4006,"serverID":"20141201.web","message":"Token has expired. Request new token.","datetime":"2023-02-17T23:38:32Z"}
2023-02-17 19:38:32.920 [DEBUG][37] Got /schedules:
2023-02-17 19:38:32.920 [ERROR][37] Unexpected error processing chunk: Newtonsoft.Json.JsonReaderException: Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path '', line 1, position 1.
at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)
at NShared.SchedulesDirectJSONEPGSource.ProcessChunk(List`1 channelsChunk, IEPGUpdateCallback callback)
at NShared.SchedulesDirectJSONEPGSource.UpdateEPG(IEPGUpdateCallback callback, Boolean manuallyInitiated)
2023-02-17 19:38:32.920 [DEBUG][37] SD using existing token
2023-02-17 19:38:32.950 [DEBUG][37] Requesting /schedules
2023-02-17 19:38:32.950 [DEBUG][37] SD(https://json.schedulesdirect.org/20141201/schedules)
2023-02-17 19:38:32.950 [DEBUG][37] token header: 17f5367bb8ca62dfeb6cb15833cac5f8
2023-02-17 19:38:33.101 [ERROR][37] System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#10
2023-02-17, 11:52 PM
Did I mention that I hate snippets. Sub did put in code to request a new token and I want to confirm a few things.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Direct access to recordings TugboatBill 1 124 2025-05-05, 11:04 PM
Last Post: mvallevand
  Guide data issue using NextPVR in a Proxmox LXC njc 10 772 2025-03-23, 01:40 PM
Last Post: njc
  Recording Plyback Timeline Issue JeffH 11 565 2025-01-17, 03:20 PM
Last Post: mvallevand
  Wake after Suspend issue with dvbt devices (LE12 Kodi 21) ShadowMask 41 4,377 2024-02-09, 07:11 AM
Last Post: ShadowMask
  Schedules Direct not downloading. WagMan 2 616 2023-04-16, 01:55 AM
Last Post: WagMan
  Yay! DST issue :-( TheRealRoland 3 703 2023-03-12, 04:45 PM
Last Post: mvallevand
  Recent streaming issue with Matt Huisman Aus TV streams ballfam 74 10,386 2023-03-08, 10:35 PM
Last Post: mvallevand
  [SOLVED] Schedules Direct won't populate my lineup NinthWave 5 826 2023-01-25, 04:03 AM
Last Post: mvallevand
  Schedule Direct is not updating mfalcian@comcast.net 6 917 2022-12-08, 09:43 PM
Last Post: mfalcian@comcast.net
  IPv6 Installation Issue Delboy 16 2,006 2022-10-13, 08:07 PM
Last Post: Delboy

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode