Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gentijo
Visitor

help with roUrlTransfer object.

My ROKU app is a mash up of the registration example and the deviantart example.
Fetching the registration code from my web site works just fine, but now when I try to
fetch the rss feed, the http.GetToString() fails with a reason code of Sync-Wait interrupted.
I am still using the devian art rss URL in my prototype, so its not on my server side..
I know I am missing something simple, but I just can't find it.. below is the code and
debugger output. Any help would be appreciated

Thank You
John Gentilin

The problem code is..
print "GetPhotoListFromFeed: ";feed_url

'Original version
'm.http.SetUrl(feed_url)
'xml=m.http.GetToString()
'print "URL output " + xml

'Second Attempt using reg code as example
'http = NewHttp(feed_url)
'http.AddParam("cmd","GetRegCode")
'http.AddParam("deviceType","ROKU")
'http.AddParam("deviceID", sn)

'Third attempt
http = CreateObject("roUrlTransfer")
http.SetPort(CreateObject("roMessagePort"))
http.SetUrl(feed_url)

rsp = http.GetToString()
print "RSS Output " + rsp
print "Failure Reason: " + http.GetFailureReason()

rss=CreateObject("roXMLElement")
if not rss.Parse(rsp) then stop


Debugger Output
------ Running ------
Checking Device Registration
device already linked, skipping registration process
running slideshow
Setup Slideshow
Display Now Playing
GetPhotoListFromFeed: http://backend.deviantart.com/rss.xml?q=special%3Add
RSS Output
Failure Reason: Sync-wait interrupted

/tmp/plugin/HDAAAAuef1H0/pkg:/source/Slideshow.brs(81): runtime error f7: STOP

081: if not rss.Parse(rsp) then stop

Backtrace:
Function getphotolistfromfeed(feed_url As Untyped) As Object
Function displaynowplayinglist() As Void
Function runslideshow() As Void
Function main() As Void

Local Variables:
feed_url &h54 String val:http://backend.deviantart.com/rss.xml?q=special%3Add
global &h07 rotINTERFACE:ifGlobal
m &h06 bsc:roAssociativeArray, refcnt=5
http &h16 bsc:roUrlTransfer, refcnt=1
rsp &h14 String val:
rss &h16 bsc:roXMLElement, refcnt=1
pl &h30 Untyped val:Uninitialized
item &h30 Untyped val:Uninitialized
0 Kudos
2 REPLIES 2
nmaves
Visitor

Re: help with roUrlTransfer object.

I now see this once in a while and can't figure out why?

Did you ever figure this out?
0 Kudos
chaklasiyanikun
Roku Guru

Re: help with roUrlTransfer object.

Does anyone figure this out? or how many times takes to wait in gettostring() for finding a response. I got this same error after a only 3 second.
0 Kudos