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: 
YoJae
Visitor

No such node error on SceneGraphTutorial

I just started converting my channels to SceneGraph and downloaded sample channel from here: SceneGraphTutorial.zip.
But when I try to run it i get a runtime error: BRIGHTSCRIPT: ERROR: roSGScreen.CreateScene: No such node SceneGraphTutorialScene: pkg:/source/main.brs(11)
The screen is stuck with "Loading..." on it.
sub Main()
  showChannelSGScreen()
end sub

sub showChannelSGScreen()
  screen = CreateObject("roSGScreen")
  m.port = CreateObject("roMessagePort")
  screen.setMessagePort(m.port)
  scene = screen.CreateScene("SceneGraphTutorialScene") ' <- LINE 11
  screen.show()

  while(true)
    msg = wait(0, m.port)
    msgType = type(msg)

    if msgType = "roSGScreenEvent"
      if msg.isScreenClosed() then return
    end if
  end while
end sub


There is a components/tutorialpanelsetscene.xml which has
<?xml version = "1.0" encoding = "utf-8" ?>

<!--********** Copyright 2016 Roku Corp.  All Rights Reserved. **********-->

<component name = "SceneGraphTutorialScene" extends = "OverhangPanelSetScene" >

  <script type = "text/brightscript" >

    <![CDATA[

    sub init()
      m.top.backgroundURI = "pkg:/images/rsgde_bg_hd.jpg"
     . . .

Am I doing something wrong? Any help appreciated
Best, YoJae
0 Kudos
8 REPLIES 8
destruk
Streaming Star

Re: No such node error on SceneGraphTutorial

While OverhangPanelSetScene is supposed to be a basic built-in predefined component for scenegraph, see here:
https://sdkdocs.roku.com/display/sdkdoc ... elSetScene

The zip you linked to works fine on my roku's here - it's possible you don't have the minimum firmware revision required to extend that node.

You might try changing the extends for this specific case to simply be - extends="Scene" and see if that works.  Otherwise it would be helpful to post the full debug log and any compile errors that show up.  Also keep in mind that when learning a new OS or SDK or programming language they usually don't begin chapter one of the course with "everything and the kitchen sink" as well as post-graduate sample code all rolled into one.  They start with "Hello World" - a simple short program that prints something to the screen and then each topic is split into a subsequent chapter.  While your demo there shows practically every conceivable thing the roku can possibly do in scenegraph it most likely isn't any way to actually learn how things work.  As you didn't write the code, you won't know where things are, where they fit together, what methods are available, etc without probably printing out every included file and going over it with a highlighter.

Roku does have over 30 sample apps explaining in detail every little piece available, maybe starting with one of those and grabbing what you require from others will bump you along development of your app.
0 Kudos
destruk
Streaming Star

Re: No such node error on SceneGraphTutorial

Also - I'm certain that nobody else finds it confusing how they insist on using "Screen" and "Scene" all the time.  As they sound so similar it'd make more sense to keep straight with perhaps something like "Display" and "Scene" IMO.  I also don't really find much reference to a graph of any kind in Scenegraph - it's like Roku put a bunch of words in a hat and picked two and said, yup, let's call it scenegraph - second choice was XML-Layout-Realtime-Compile, or XLRC.... no rhyme or reason to anything.
0 Kudos
YoJae
Visitor

Re: No such node error on SceneGraphTutorial

"destruk" wrote:
While OverhangPanelSetScene is supposed to be a basic built-in predefined component for scenegraph, see here:
https://sdkdocs.roku.com/display/sdkdoc ... elSetScene

The zip you linked to works fine on my roku's here - it's possible you don't have the minimum firmware revision required to extend that node.

You might try changing the extends for this specific case to simply be - extends="Scene" and see if that works.  Otherwise it would be helpful to post the full debug log and any compile errors that show up.  Also keep in mind that when learning a new OS or SDK or programming language they usually don't begin chapter one of the course with "everything and the kitchen sink" as well as post-graduate sample code all rolled into one.  They start with "Hello World" - a simple short program that prints something to the screen and then each topic is split into a subsequent chapter.  While your demo there shows practically every conceivable thing the roku can possibly do in scenegraph it most likely isn't any way to actually learn how things work.  As you didn't write the code, you won't know where things are, where they fit together, what methods are available, etc without probably printing out every included file and going over it with a highlighter.

Roku does have over 30 sample apps explaining in detail every little piece available, maybe starting with one of those and grabbing what you require from others will bump you along development of your app.

Thank you very much for suggestions. I agree that you should start with Hello World, just hoped this would magically work.
Tried everything from the above. My Roku is 4200X - Roku 3 with latest firmware (7.6.0 b4125-04).
If I try to create built-in OverhangPanelSetScene, the channel starts with empty scene and no error.
But when I launch the channel and try to create scene from components/ directory, (e.g. using simple RectangleExample from Roku SDK) I always receive BRIGHTSCRIPT: ERROR: roSGScreen.CreateScene: No such node RectangleExample: pkg:/source/main.brs(11)
To me it looks like Packager cannot include any custom xml graph scene.
Again, any suggestions will be helpful.
Best,
Gary
0 Kudos
destruk
Streaming Star

Re: No such node error on SceneGraphTutorial

What if you try working with this sample zip?
https://sdkdocs.roku.com/download/attac ... 429&api=v2
0 Kudos
YoJae
Visitor

Re: No such node error on SceneGraphTutorial

"destruk" wrote:
What if you try working with this sample zip?
https://sdkdocs.roku.com/download/attac ... 429&api=v2

After a long head scratching and deploying to numerous devices I realized that the artifact was wrong. The root of the problem - my build.gradle did not include components folder for zip-up. Once I included it everything worked. 
Thanks a lot, destruk for your help and support.
Best,
Gary
0 Kudos
destruk
Streaming Star

Re: No such node error on SceneGraphTutorial

You're welcome.
0 Kudos
lock_4815162342
Channel Surfer

Re: No such node error on SceneGraphTutorial

Thanks, I had the same issue. This was helpful. 
0 Kudos
pmaior32
Newbie

Re: No such node error on SceneGraphTutorial

I had this same error and it drove me crazy trying to find the issue. 

It ended up being the components folder was spelled incorrectly with a capital C.

Arghh

I was following the tutorial that said to create the folders. I should have copied and pasted!!!

past that issue, now the rest.... debug is a huge help.   Use putty to open telnet to port 8085 you need to pick other in the format. not ssh..

Live and learn.  

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.