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

SOLVED: StaticAnalysis Error:: "end of playlist" status message of roAudioPlayerEvent is deprecated.

Jump to solution

Hello, hopefully someone can help me here.

I'm developing a Roku app that plays different audio streams, using an Audio node.  When I submit my Beta application for Static Analysis, it always fails with the Error:  "end of playlist" status message of "roAudioPlayerEvent" is deprecated.

I'm confused because I don't use the status message of the Audio node.  My Audio node usage is:

  • creating the Audio node
  • creating and assigning its Content Node
  • reading the player state, so the application can determine appropriate Ui display/features
  • setting the player control field, to stop/start audio playback
  • setting the player content's url field to change stream sources

Why would I be failing the static analysis, and how can I resolve ?

Thank you !

 

 

0 Kudos
1 Solution

Accepted Solutions
crazeekennee
Channel Surfer

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

I stumbled upon a fix . .and it wasn't all what I expected.  Here's what i did:

I copied the entire project to another directory, and started off by making a zipfile with minimal content, uploading to the Roku player, downloading the package file, uploading to the Beta Channel, saving, and running Static Analysis.  As long as I had the image files specified in the manifest, Static Analysis reported zero Errors.  I worked my way up to zipping a complete (and exact) copy of the project, and Static Analysis reported zero errors.

For comparison, I re-zipped and uploaded a new package file from the original project .. and the error came back again.   Weird, since the projects were exactly the same, built on identical copies of the same source code.

The only difference were in the names of the zipfiles themselves.  One had a "_2" appended on the end, like project.zip and project_2.zip.  That's it.

I went back to my original project, changed the zipfile name, re-zipped, uploaded to my Roku, downloaded the Packaged file, uploaded it to my Beta channel .. and it passed Static Analysis.

So, the workaround is to .. change the name of your zipfile before sideloading on your Roku device ???   I have no idea why it works .. maybe something is cached somewhere, and tied to the zipfile name .. ?

But, tl;dr .. I'm not seeing any errors on Static Analysis.

Hopefully this very strange workaround helps someone else down the line.  Back to developing !

View solution in original post

0 Kudos
10 REPLIES 10
renojim
Community Streaming Expert

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&q

Jump to solution

You can't use the old roAudioPlayerEvent on an audio node.  It's not clear if you're trying to or not.  Does "roAudioPlayerEvent" and/or "end of playlist" appear in your code?

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
crazeekennee
Channel Surfer

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

Hello renojim,

Thank you for your response !   No, I am neither using a roAudioPlayerEvent nor does "end of playlist" appear in my code.  That's what's confusing me .. I don't know how I'm triggering this error. 

Here's where I initialize the Audio node:

sub initializeAudioPlayer()
    m.constants = getConstants()
    m.audioPlayer = createObject("roSGNode", "Audio")
    m.audioPlayer.id = "AudioPlayer"
    audiocontent = createObject("RoSGNode", "ContentNode")
    m.audioPlayer.content = audiocontent
end sub

 

When the user inputs a new control signal (Play/Stop), I read the Audio player state, and use it to determine what signal to send the player:

if m.audioPlayer.state = m.constants.PLAYER_STATE_STOPPED
   startAudioPlayer()
end if

...

if m.audioPlayer.state <> m.constants.PLAYER_STATE_STOPPED
   stopAudioPlayer()
end if

 

And I start/stop the player like so:

sub stopAudioPlayer()
    m.audioPlayer.control = m.constants.PLAYER_CONTROL_STOP
end sub

sub startAudioPlayer()
    m.audioplayer.content.url = m.currentlyPlayingShow.streamurl
    m.audioPlayer.control = m.constants.PLAYER_CONTROL_PLAY
end sub

sub toggleAudioPlayer()
    if m.audioPlayer.state = m.constants.PLAYER_STATE_STOPPED
        startAudioPlayer()
    else if m.audioPlayer.state = m.constants.PLAYER_STATE_PLAYING
        stopAudioPlayer()
    end if
end sub

 

In one of my UI Logic components, we do Observe the Audio Player state.

m.audioPlayer.ObserveField("state", "OnAudioPlayerStateChange")

 

Could the error be triggered by reading m.audioPlayer.state directly or Observing it ?

Any advice is most welcome !

 

0 Kudos
renojim
Community Streaming Expert

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

I don't think there's anything wrong with your code.  Doesn't Static Analysis give you the line number and file name where the error occurs?  I don't think Static Analysis is very sophisticated - it just scans your source code looking for certain strings.  I just tried an experiment where all I had to do was add print "end of playlist" to my code and I triggered that error, but it told me exactly where it was.

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
crazeekennee
Channel Surfer

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

Totally agree that line number, or even file name would be super helpful, but Static Analysis isn't providing those to me .. just giving the error.  Screenshot attached.

At this point, I'm just going to start removing code  blocks and seeing what might be triggering it.  Not sure what else to do, as we don't use the event, and don't even have the word "playlist" in our app.

Do we know if a Static Analysis error actually blocks an app from being Published, or does the manual review process look at the validity or each "error" raised ? 

Thank you, again !

 

Screenshot 2024-02-25 at 6.57.40 AM.png

0 Kudos
renojim
Community Streaming Expert

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

Is that screenshot from a phone?  I've seen Roku web pages act differently if the screen isn't big enough to display everything and the path and line number would be displayed after the message.  I'm wondering if it's just getting truncated to 5 lines.  If I get a chance I'll try my package again that triggers the error

I think any Error would block publication or more accurately wouldn't enable the "Publish" button.

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
crazeekennee
Channel Surfer

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

Not from a phone.  Viewing on my MacBook Air, 15.4"screen at 1440x932 resolution.  Attaching a zoomed out view of my browser window.

I'm going to try making an empty project and adding one file at a time, and hopefully that'll let me know which file contains the culprit.  The zipfiles won't be functional, but at this point, i don't care.  Totally frustrating, but I thank you for your response !

0 Kudos
crazeekennee
Channel Surfer

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

I stumbled upon a fix . .and it wasn't all what I expected.  Here's what i did:

I copied the entire project to another directory, and started off by making a zipfile with minimal content, uploading to the Roku player, downloading the package file, uploading to the Beta Channel, saving, and running Static Analysis.  As long as I had the image files specified in the manifest, Static Analysis reported zero Errors.  I worked my way up to zipping a complete (and exact) copy of the project, and Static Analysis reported zero errors.

For comparison, I re-zipped and uploaded a new package file from the original project .. and the error came back again.   Weird, since the projects were exactly the same, built on identical copies of the same source code.

The only difference were in the names of the zipfiles themselves.  One had a "_2" appended on the end, like project.zip and project_2.zip.  That's it.

I went back to my original project, changed the zipfile name, re-zipped, uploaded to my Roku, downloaded the Packaged file, uploaded it to my Beta channel .. and it passed Static Analysis.

So, the workaround is to .. change the name of your zipfile before sideloading on your Roku device ???   I have no idea why it works .. maybe something is cached somewhere, and tied to the zipfile name .. ?

But, tl;dr .. I'm not seeing any errors on Static Analysis.

Hopefully this very strange workaround helps someone else down the line.  Back to developing !

0 Kudos
renojim
Community Streaming Expert

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

Glad you got it fixed.  That's one of the strangest things I've ever seen!

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
RokuBen
Community Moderator
Community Moderator

Re: Static Analysis Error:: "end of playlist" status message of "roAudioPlayerEvent&a

Jump to solution

I've let our dev team that works on static analysis know about this weirdness.

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.