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: 
tim_beynart
Channel Surfer

Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

Ok I have to implement Comscore in a SceneGraph app. All I have from the vendor is a BrightScript file we've been using in our SDK1 app. 
So I include their file in a task like this, where my code is comscore.brs and the vendor code is comscore_4.1503.03.brs:
<?xml version="1.0" encoding="utf-8" ?>
<component name = "comscore" extends = "task" >
  <interface>
    <function name="setConfig" />
  </interface>
  <script type="text/brightscript" uri="pkg:/components/cpc/tasks/metrics/comscore.brs"/>
  <script type="text/brightscript" uri="pkg:/components/cpc/tasks/metrics/vendor/comscore_4.1503.03.brs"/>
</component>


This is a Task Node added to a Group Node added to the Home Scene. When I run the app I get this infuriating error:
BRIGHTSCRIPT: ERROR: roUrlTransfer: creating MAIN|TASK-only component failed on RENDER thread: pkg:/components/cpc/tasks/metrics/vendor/comscore_4.1503.03.brs(719)


How can my task code be running on a render thread? I am calling methods on thei library from functions defined in comscore.brs and triggered using the "continuous server" approach to a task (using observeField with a port). 
WTF is this error??
0 Kudos
10 REPLIES 10
tim_beynart
Channel Surfer

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

OK found my issue.
I was calling a function using callFunc on my Task, and this in turn used the library code. Apparently callFunc activity does not happen inside the sandbox of a Task.
Once I refactored my code to abandon callFunc and instead use a field observer it started behaving.
0 Kudos
RokuNB
Roku Guru

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

What do you mean by "Comscore" here?
If that's comScore vCE by any chance, so it happens RAF supports that already (inquire within 🙂 ).
0 Kudos
tim_beynart
Channel Surfer

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

We have to use Comscore Application tag and Streaming Tag. I just use the library they provide and call the their API, it's dead simple and it took one day to port the SDK1 code to SceneGraph.
Where are the docs for RAF? All I saw was a reference to Comscore in some release notes, but no details. It was easier to just use what I have on hand, which is already familiar.
0 Kudos
Tyler_Smith
Binge Watcher

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

0 Kudos
tim_beynart
Channel Surfer

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

@Tyler,
Yeah I have basically memorized that page, but my point is that there is no documentation beyond this single sentence:
Added support for comScore vCE campaign measurement service
0 Kudos
RokuNB
Roku Guru

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

I don't know the operational details but logical first step is contacting comScore ops regarding the (server-side) account setup for using vCE with Roku. Seems good idea also contacting Roku directly, since our partner support likely knows the right comScore contacts.
0 Kudos
tim_beynart
Channel Surfer

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

Thanks, I should have added that the docs also point me to a Roku email to talk to a person about integration.
Our Comscore implementation is different from vCE, though. 
0 Kudos
kirankumar3003
Reel Rookie

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

I think there are multiple issues causing the same error because I am not using callFunc anywhere in my app and I am still seeing the error. It is so frustrating. In my case I am creating a roUrlTransfer object and using it in the very next line to set the url where the app crashes(intermittently). interesting thing is I see "BRIGHTSCRIPT ERROR: creating MAIN|TASK-only component failed on RENDER thread" in the terminal just before the crash but it says that the actual cause of the crash is 'Dot' operator attempted on invalid component because apparently the request object is invalid !! No clue how the request object could be invalid. Any thoughts appreciated.

0 Kudos
sj_dev
Binge Watcher

Re: Brightscript in Tasks, I am clueless, seeing "RENDER Thread" errors

@tim_beynart Can you please share what to do exactly in the task. We also have comscore.brs with us, but not sure how should it be implemented using tasks

0 Kudos