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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issues with the Registration SDK example on sideload

We have a live app in the Channel Store using a modified version of the SDK Registration example that is working fine.

We're updating that app with some new features to support a new version of the related website (and have not made any changes to the ScreenRegister) but in testing the new version on a sideloaded channel the Registration process doesn't seem to be working.

The only thing that has really changed is the server of the web site and some other code in the app. We have an API on the server that facilitates registration. I'm wondering if there is something going on with the dev channel being sideloaded. Here's what I've noticed:

  • The API returns a registration code and checks to see if the user has entered it in the web app... all standard.

  • If I use the API calls directly from a browser to get the registration code and check the registration status it works.

  • When I use the same API calls inside the app, it gets the registration code correctly the first time.

  • However, then it's like the response is cached or something because "Get New Reg Code" just returns the same code every time.

  • Every periodic check for the registered status returns false (I'm thinking because the first check returned false.

Am I missing something obvious? Does this behave differently when sideloaded? Or does the rsp from
rsp = http.Http.GetToString()
need to get flushed somehow for each next request? Why does it feel like the response is cached and it's not actually going back out to the remote server each time?

0 Kudos

Re: Issues with the Registration SDK example on sideload

Actually, quick update / correction. It doesn't work on the published version any more either.

One of two possibilities:

1) The problem has something to do with our registration APIs new home on a new server. But why would manual URL tests work in browser to retrieve the right values but the same identical URLs logged as being tried by the roku channel fail?

2) Maybe something changed with the way rsp = http.Http.GetToString() is handled in the last few months?

I'm having cache exclusions added for our API urls... maybe the server is caching the responses...
0 Kudos

Re: Issues with the Registration SDK example on sideload

OK! After narrowing it down and a lot of experimenting, I determined that it was indeed some crazy server caching going on. I was able to beat it with cachebusting like this right before the http request:

http.AddParam("rnd", tostr(Rnd(8)))

Solved! Maybe it will help someone else.
0 Kudos