ProtocolError 400 Bad Request trying to setup for first time

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
txcraiggreenbutton

Posts: 4
Joined: Fri Jan 03, 2020 1:27 am
Location:

HTPC Specs: Show details

ProtocolError 400 Bad Request trying to setup for first time

#1

Post by txcraiggreenbutton » Fri Jan 03, 2020 1:42 am

I signed up for Schedules Direct 7-day trial and installed EPG123 v1.3.4. I am seeing errors similar to those described here: viewtopic.php?f=99&t=12518&p=134406&hil ... 00#p134406

After logging in I get the popup about "there are no lineups in your SD-JSON account. You must add at least one lineup" then I see the "Subscribed Lineups" window but clicking "Add New" does nothing.

I saw another post that recommended waiting for SD servers to sync. I have waited 24 hours and still the same errors. The trace log is below:

Any ideas on what could be causing this?

Thanks
Craig

Code: Select all

[1/2/2020 7:31:28 PM] ===============================================================================
[1/2/2020 7:31:28 PM]  Activating the epg123 configuration GUI. version 1.3.4.0
[1/2/2020 7:31:28 PM] ===============================================================================
[1/2/2020 7:31:38 PM] [ INFO] Token request successful. serverID: 20141201.web.1
[1/2/2020 7:31:38 PM] [ INFO] Status request successful. account expires: 2020-01-09T04:03:37Z , lineups: 0/4 , lastDataUpdate: 2020-01-02T23:22:15Z
[1/2/2020 7:31:38 PM] [ INFO] system status: Online , message: No known issues.
[1/2/2020 7:31:38 PM] [WARNG] Your Schedules Direct account expires in 06 days 02 hours 31 minutes.
[1/2/2020 7:31:40 PM] [ INFO] SD API WebException Thrown. Message: The remote server returned an error: (400) Bad Request. , Status: ProtocolError
[1/2/2020 7:31:40 PM] [ INFO] SD responded with error code: 4102 , message: No lineups have been added to this account. , serverID: 20141201.web.1 , datetime: 2020-01-03T01:31:39Z
[1/2/2020 7:31:40 PM] [ INFO] SD API WebException Thrown. Message: The remote server returned an error: (400) Bad Request. , Status: ProtocolError
[1/2/2020 7:31:40 PM] [ INFO] SD responded with error code: 4102 , message: No lineups have been added to this account. , serverID: 20141201.web.1 , datetime: 2020-01-03T01:31:39Z
[1/2/2020 7:31:40 PM] [ERROR] Failed to complete request. Exiting
[1/2/2020 7:31:40 PM] [ERROR] Did not receive a response from Schedules Direct for a client lineup listings.
[1/2/2020 7:31:43 PM] [ INFO] Successfully retrieved list of available countries from Schedules Direct.
[1/2/2020 7:31:43 PM] [ERROR] Unhandled thread exception caught from epg123.exe. message: Object reference not set to an instance of an object.
[1/2/2020 7:37:35 PM] [ INFO] SD API WebException Thrown. Message: The remote server returned an error: (400) Bad Request. , Status: ProtocolError
[1/2/2020 7:37:35 PM] [ INFO] SD responded with error code: 4102 , message: No lineups have been added to this account. , serverID: 20141201.web.1 , datetime: 2020-01-03T01:37:34Z
[1/2/2020 7:37:35 PM] [ INFO] SD API WebException Thrown. Message: The remote server returned an error: (400) Bad Request. , Status: ProtocolError
[1/2/2020 7:37:35 PM] [ INFO] SD responded with error code: 4102 , message: No lineups have been added to this account. , serverID: 20141201.web.1 , datetime: 2020-01-03T01:37:34Z
[1/2/2020 7:37:35 PM] [ERROR] Failed to complete request. Exiting
[1/2/2020 7:37:35 PM] [ERROR] Did not receive a response from Schedules Direct for a client lineup listings.

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Fri Jan 03, 2020 1:49 am

This is to be expected until you add a lineup to your account. When it opens the Lineup Search windows, it performs a search immediately based on the country and postal code you used for WMC Setup. If you used an invalid postal code, or a postal code that has never been used before with Schedules Direct, it can take some time to get a return.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

txcraiggreenbutton

Posts: 4
Joined: Fri Jan 03, 2020 1:27 am
Location:

HTPC Specs: Show details

#3

Post by txcraiggreenbutton » Fri Jan 03, 2020 2:54 am

"until you add a lineup to your account" <-- Do you mean my SD account? I was under the impression that there was no configuration at Schedules Direct for SD-JSON. In fact their page says: "With the new SD-JSON service, lineups are managed within the application." I do have my zip code 78737 associated with my SD account, which should be a fairly mainstream zip code and I did add an SD-DD lineup at SD for my zip code and it shows the proper local channels for my zip. I have since deleted the SD-DD lineup at SD website but my problems persist. Actually now that I have deleted my SD-DD lineup, I don't see anywhere on SD site where I can set or view my zip code.

"it performs a search immediately based on the country and postal code you used for WMC Setup" <-- Hmmm, what is this WMC Setup you refer to? Did you mean to say SD Setup? The only steps I have taken is 1) signed up for SD 2) started epg123.exe - then I ran into this issue. So far I have not involved my WMC in any of this. Should I have?

Here is what I expected - having "no lineups added to this account" seemed normal since I am just starting. I assumed that clicking "Add New" on the "Subscribed Lineups" window would give me a chance to add something to my empty list of subscribed lineups. I can see in Fiddler that it is not even making a web call when I click "Add New" plus you said it searches automatically when the window opens. So I was thinking about it wrong. Since the title of the window is "Subscribed Lineups" and I have zero subscribed lineups, I did not expect that the list should be populated. Maybe a better title would be "Available Lineups".

So, when epg123 asks SD for /lineups (available lineups for my SD account) it is returning 400 Bad Request because "No lineups have been added to this account". However there is no possible way to add a lineup using epg123.exe and I don't see any way on the SD site to "add a lineup to my account", except for their legacy SD-DD XML support which does not apply to epg123. And of course they say that lineups are managed within the application.

So I'm left scratching my head wondering how I proceed. It seems unlikely my zip code has never been used (lots of techies around the Austin, TX area). Maybe I should open a support issue with SD?

Oh and thanks so much for responding to my post and creating this app. I really appreciate it!

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#4

Post by garyan2 » Fri Jan 03, 2020 3:17 am

I see clarifications are needed:

When you first login with your Schedules Direct account in the configuration GUI, it will provide a prompt that you have no lineups in your account. When you click [OK], it will automatically open the 'Subscribed Lineups' window which will be empty because you have no lineups in your account. Clicking the [Add New] button will open a new window titled 'Lineup Search' but before it is visible, it will read the WMC registry and find what country and postal code was used the last time you completed a WMC TV Setup and do a search automatically based on that.

The question is why is that failing? I verified searching US zipcode 78737 brings up all the available lineups to add.

You can take a look at your registry entries to see if something is wrong.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Settings\ProgramGuide
"strCountryCode" = "US"
"strLocation" = "78737"
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#5

Post by Space » Fri Jan 03, 2020 4:17 am

txcraiggreenbutton wrote: Fri Jan 03, 2020 2:54 am ...

"it performs a search immediately based on the country and postal code you used for WMC Setup" <-- Hmmm, what is this WMC Setup you refer to? Did you mean to say SD Setup? The only steps I have taken is 1) signed up for SD 2) started epg123.exe - then I ran into this issue. So far I have not involved my WMC in any of this. Should I have?
...
Yes. Did you follow the step by step instructions?

txcraiggreenbutton

Posts: 4
Joined: Fri Jan 03, 2020 1:27 am
Location:

HTPC Specs: Show details

#6

Post by txcraiggreenbutton » Fri Jan 03, 2020 4:36 am

Aha, I am not on a WMC computer. I did not read anywhere that this was a requirement. In fact at http://epg123.garyan2.net/install/ the server section does not list WMC as a requirement, whereas the client section does. I am attempting to setup an EPG123 server on a non-WMC PC, and then the plan was to setup the EPG123 clients on each WMC PC accessing the file the server generates.

So, armed with this knowledge I tried this on one of my WMC PCs and I was able to get the "Lineup Search" dialog to appear after clicking "Add New" and I got the Antenna listing for my zip code. Woohoo, thanks for helping!

If indeed being on a WMC PC is not a hard requirement for the server component (why should it be?) then I think there is a small bug here to report for my non-WMC scenario: after clicking "Add New", nothing happens. If you see in the log this line:

Code: Select all

Unhandled thread exception caught from epg123.exe. message: Object reference not set to an instance of an object.
I bet you a beer that when I click "Add New" and you can't read the registry key, you end up getting the nullref exception and that prevents the " Lineup Search" dialog from appearing. Since that dialog has controls that would allow me to enter country and ZIP, that means WMC registry settings should be optional and I should be able to launch the "Lineup Search" dialog even on a non-WMC PC.

Image

Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#7

Post by Space » Fri Jan 03, 2020 4:45 am

A server only install should not require WMC, not sure if there is a bug that prevents it from working properly.

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#8

Post by garyan2 » Fri Jan 03, 2020 7:20 am

Checked the code, and tested on a bench, and this is a bug that will be fixed in next release. So when it goes to do its automatic lookup, if the registry doesn't exist it will not open the form. That was definitely not intended. In the mean time, if you need to add a lineup, you will have to do it on a machine that has, or has had, WMC setup on it.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

txcraiggreenbutton

Posts: 4
Joined: Fri Jan 03, 2020 1:27 am
Location:

HTPC Specs: Show details

#9

Post by txcraiggreenbutton » Sat Jan 04, 2020 2:53 am

Yep I am all up and running now using a WMC PC. Thanks for all your help and the incredibly rapid response!

Post Reply