Node-red webpage enables prevent-sleep in OSX/Firefox

Hi All,

After breaking my head on why my macbook would not sleep I figured out Node-red is the culprite.

I use 1.0.6 right now but this was also there in 1.0.2 Firefox version 75.0
When I open the node-red web page the following task is spawned in FF:
FirefoxCP Web Content and preventing sleep is set to yes.

Basically this tells my laptop not to go to sleep even if the lid is closed.

Could I ask that this be a toggle switch of turned off?

which toggle switch ? where is it ? that sounds like a browser issue ? Do you have any browser plugins enabled ? What happens if you start firefox in safe mode ?

It's not a toggle switch (yet). Basically somewhere in the HTML code "do not sleep" has been added. This causes firefox to keep the laptop alive and not be able to go into sleep mode. I have restarted without add-ons and the effect is the same. As soon as I open the Node-Red webpage FF jumps into not sleep mode.

It isn't as simple as that. This isn't a flag you just set in the code. At this point, I have absolutely no idea what in the editor is triggering this behaviour.

It will require some research to figure out what exactly is doing it and why. Only then can we figure out a way to prevent it - if that makes sense to do.

Do you have anything to do with video on/in your flow ?

Not that I know of. Tonight I will setup a container and import the config to see if one of the plugins might be causing it. I will let you know.

OK... that was fun!

Figured out that if I enable node-red-contrib-play-audio 2.4.0 then Preventing sleep activates on firefox. I will file a bug report with them.

Thanx for helping out!

I think that may be browser related then - There were some bugs raised a while back from people saying - "my pc goes to sleep when I'm watching a video" etc... so the default is to stay on if full screen and media is active. Not sure how to override that at the page level.

just posted a bug on the play-audio plugin, let's see what happens. Weird thing is the plugin is enabled but I have never created a flow that uses is. so just enabling the plugin enables Preventing sleep.

Well as I’m one of the authors I suspect not much :slight_smile: unless someone else has a clue how to fix Firefox

but it was a lucky Friday... so it's fixed in v2.5.0

:grinning:Fixed! thanx a lot.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.