Roku Direct Publisher

Roku Direct Publisher - the easiest way to create a great TV experience. Learn more about how to create a Roku channel and share your experiences with others.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Baradanikto
Roku Guru

Feed URL Validation Error

I've seen this question asked on this forum before without much feedback.  I've converted my MRSS feed into a JSON feed using a Powershell script I wrote.  I tested the resulting JSON file using one of the recommended validaters and it came up clean.  I upload the JSON file to my Amazon S3 bucket and tried to reference it from the Feed URL page on the developer's portal.  When I try to save the Feed URL, I get:


The feed URL(s) could not be validated.
The server returned an unsupported content type. Was expecting 'application/rss+xml', 'text/xml', 'application/xml' or 'application/json' but received 'binary/octet-stream'.

At first, I thought it might have something to do with the file extension, so, I changed it from ".json" to ".rss".  That did not work.  Then, I tried playing around with the CORS stuff for the bucket and that didn't help either.


  1. Can I host my json feed with an Amazon S3 bucket?

  2. What is the correct file extension for the feed file? .rss?
FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
0 Kudos
20 REPLIES 20
belltown
Roku Guru

Re: Feed URL Validation Error

The extension has nothing to do with anything. However, some web hosting providers are smart enough to assume that a ".json" file applies to a Content-Type of application/json, and serve the content with that Content-Type.

What's important is the HTTP Content-Type header returned by the server. It appears that Direct Publisher is looking for a specific Content-Type header of application/json, for example.

I don't know anything about Amazon S3, but when researching this problem trying search for "Content-Type" http header (sometimes also referred to as a mime-type). Look for a way you can specify a specific Content-Type for a particular file or file extension, either from a control panel or settings value, or some other url that will serve the same content with a different Content-Type. You'd probably get better help on StackOverflow under the 'amazon-web-services' and 'amazon-s3' tags.
0 Kudos
Baradanikto
Roku Guru

Re: Feed URL Validation Error

belltown,

Thanks for the reply.  It was just enough info to point me in the right direction.  I figured out the problem and have corrected it.  Here's the jist.

When uploading a JSON file to Amazon S3, the content type does not default to "json".  I had to add that as a bit of meta data as part of the upload.  Their interface allows you to make changes to the meta data as part of the upload.

Unfortunately, that has not fully resolved my problem.  I now get a cryptic message:


The feed URL(s) could not be validated.
JSON (SyntaxError: Unexpected token � in JSON at position 0)

from the Roku portal when trying to validate the feed file.  And, as I stated, the file validates fine through the online validaters.
FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
0 Kudos
belltown
Roku Guru

Re: Feed URL Validation Error

It looks like you're making progress. If you or the Roku DP uploader is seeing a strange-looking character or two at the start of the file, then you need to check the file's encoding.

I would imagine that DP expects the Json files to be encoded in UTF-8 without a Byte-Order Mark (BOM). It's possible you have a BOM at the start of the file. That may be a result of the way the file was encoded before you uploaded it (especially if you're on a Windows computer using certain text editors), or as a result of the way AWS is choosing to serve the file. First, what OS and text editor are you using to generate your .json file. Second, is there anywhere in your AWS control panel that you can specify an encoding (sometimes called a "charset") for the file? If you can specify an encoding somewhere in the AWS control panel/meta-data, etc., then set it to "UTF-8".
0 Kudos
fin313
Visitor

Re: Feed URL Validation Error

On a similar note, I keep getting this error message:

The feed URL(s) could not be validated.
  • There was a transport-level error - (Unknown ERROR).

    I'm no JSON coding expert, but the JSON formatter says my code is valid.  Any idea how to remedy (or links to other threads that might assist)?
    Thanks.  🙂 
  • 0 Kudos
    37mediagroup
    Roku Guru

    Re: Feed URL Validation Error

    "Baradanikto" wrote:
    belltown,

    Thanks for the reply.  It was just enough info to point me in the right direction.  I figured out the problem and have corrected it.  Here's the jist.

    When uploading a JSON file to Amazon S3, the content type does not default to "json".  I had to add that as a bit of meta data as part of the upload.  Their interface allows you to make changes to the meta data as part of the upload.

    Unfortunately, that has not fully resolved my problem.  I now get a cryptic message:


    The feed URL(s) could not be validated.
    JSON (SyntaxError: Unexpected token � in JSON at position 0)

    from the Roku portal when trying to validate the feed file.  And, as I stated, the file validates fine through the online validaters.

    Just a thought to help troubleshoot.  Try hosting the file at myjson.com and see if it passes the Roku checklist validator. That will at least let you know if its a file error or Amazon S3 specific. Secondly, some people mention the Header section of the feed?  Try checking the sample Roku feed and just paste that into yours again (provider name, language, last updated etc).
    Just a thought.
    0 Kudos
    Baradanikto
    Roku Guru

    Re: Feed URL Validation Error

    I've made some more progress.  I was able to upload the json file specifying a different content-type of "application/json".  However, this only helped a little.  I still get the "unexpected token" error message "at position 0", but, it no longer has a funny character in the message.  I'll assume that the content-type correction helped that.  

    I took some advice and used myjson.com to try my feed and it spits back I have "no valid items in my feed".  And, "27 items have error: Required shortFormVideo content is missing."  I've validated the syntax using the online services.  Is there a specific schema just for Roku validation?  Pasnow makes reference to a "Roku checklist validator".  Where is that?  Is that one of the online services that Roku recommends to check your syntax?  BTW.....my feed does include "shortFormVideo" tags and "content" tags.  The only potential discrepancy I see is the order of my json tags.  Does anyone know if the order of the tags is significant?  For example, my header contains a "providerName", but, it's not the first tag.  I would hope the order of the tags is NOT significant.

    Lastly, I posted on the Amazon S3 forum because I may have found that they will not serve json files.  It appears they may only server xml.  I've asked for someone to clarify that.  I'll report back on that when I have an answer.

    Oh, I forgot to mention, I wrote a powershell script that converts my xml feed to json.  It runs on Windows 7.
    FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
    0 Kudos
    destruk
    Streaming Star

    Re: Feed URL Validation Error

    To remove problematic characters in your json file tun this regex to remove them, then save the result --
    in php --
    $json=json_decode(preg_replace('/[\x00-\x1F\x80-\xFF]/','',$source),true);

    Where $source is the contents of your input file.
    0 Kudos
    fin313
    Visitor

    Re: Feed URL Validation Error

    Having same error as Baradanikto.  Validator says JSON code is valid, but Roku direct-publisher repeats error message:  "No valid items in the feed."
    Very discouraging after spending lengthy amounts of time trying to get it right.  Stuck like he is--any thoughts appreciated.
    0 Kudos
    37mediagroup
    Roku Guru

    Re: Feed URL Validation Error

    Does it give anything below it?  Like "No valid images in 1 feed" or something? Also check to see if the top header content begins similar to the Roku sample feed. These are just guessing but maybe double thru some of the semantics.  See if a paste into a myjson.com url works? Could it be a file format issue? 
    0 Kudos
    Need Assistance?
    Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

    Become a Roku Streaming Expert!

    Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.