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

Billing usage was specified during channel publishing but was not found in BrightScript code

I am getting this error in static analysis while publishing app.
"Billing usage was specified during channel publishing but was not found in BrightScript code."
I have added billing code in my Home Scene.
Please help.
0 Kudos
16 REPLIES 16
kjlake
Channel Surfer

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

I, too, am having the same issue.  Can anyone recommend a solution?

Thanks.
0 Kudos
ashishMaz
Visitor

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

Submit your app with this error and Roku store will accept it. You don't need to do anything.
Sometimes Roku AI does not work to verify Brighscript.

 
0 Kudos
ibliskavka
Channel Surfer

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

This does not seam to work anymore. Schedule publishing is greyed out.

I am using ChannelStore to query subscription status and submit an order but the static analysis tool is not picking it up.

0 Kudos
renojim
Community Streaming Expert

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

When you query roChannelStore and wait for the response, check the type of the returned message.  I have this in my code, so I must have dealt with this before.

 while true
     msg = wait(0,port)
     print type(msg)
     if msg <> invalid and type(msg) = "roChannelStoreEvent" then  ' check for type is just to pass Static Analysis
      ...
end while
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
ibliskavka
Channel Surfer

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

Simply adding that check did not pass static analysis.

I am not using the roChannelStore object, I am only using the <ChannelStore/> component.

Does static analysis only support roChannelStore?

0 Kudos
ibliskavka
Channel Surfer

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

RESOLVED!
I found the solution in the scenegraph-master-sample repo/Subscriptions repo.

' to handle Roku Pay we need to create channelStore object in the global node
m.global.AddField("channelStore", "node", false)
m.global.channelStore = CreateObject("roSGNode", "ChannelStore")

I was using a <ChannelStore> element in the XML.

0 Kudos
renojim
Community Streaming Expert

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

Thanks for letting us know!  I was going to suggest just creating a dummy roChannelStore element to get past the analysis.  May have been a hack, but probably would have worked.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
sandeepthakur
Binge Watcher

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

I am also getting same error. Can someone tell me how  can I resolve this error,

0 Kudos
sandeepthakur
Binge Watcher

Re: Billing usage was specified during channel publishing but was not found in BrightScript code

How did you resolve this?

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.